Search Results - CodeGuru Forums
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com

Search:

Type: Posts; User: LarryChen

Page 1 of 40 1 2 3 4

Search: Search took 0.07 seconds.

  1. Replies
    1
    Views
    309

    A question regarding clustered index

    According to the definition of clustered index, a clustered index is a special type of index that reorders the way records in the table are physically stored. It seems clustered index reorders...
  2. Re: How to use TextOut without processing WM_PAINT?

    Actually the tough part is that I can't access message processing in main window. As the result, in order to process WM_PAINT for child window, I have to process it in another thread. Since child...
  3. Re: How to use TextOut without processing WM_PAINT?

    Yes, my child window IS a modeless dialog. What do you mean "your child window messages even being processed in other thread"? What is exactly "other thread" here? Basically I have two threads. One...
  4. Re: How to use TextOut without processing WM_PAINT?

    If child window messages are processed in the main thread, it will block parent window messages. As the result, parent window will hang there. Thanks.
  5. Re: How to use TextOut without processing WM_PAINT?

    Because parent window belongs to the main thread and for some reasons I can't access the parent window message processing. So in order to process child window message, I have to have sub thread to...
  6. Re: How to use TextOut without processing WM_PAINT?

    Ok, I have a parent window and a child window. The parent window belongs to the main thread and the child window belongs to a sub thread. The window messages in topic are processed in the sub...
  7. Re: How to use TextOut without processing WM_PAINT?

    May I ask why window message processing should be performed in the main UI thread? What kind of problems I might run into if I choose not to process messages in main thread? Thanks
  8. Re: How to use TextOut without processing WM_PAINT?

    Basically window message processing is put in another thread. So if I put the drawing job(for example, TextOut) in WM_PAINT, the main thread won't be very responsive since WM_PAINT is processed very...
  9. Re: How to use TextOut without processing WM_PAINT?

    I thought I already explained to you... Yes, initially I thought I can make use of WM_INITDIALOG or WM_SHOWWINDOW to draw text and then I realized that is not the way to go. I already forget the...
  10. Re: How to use TextOut without processing WM_PAINT?

    Check this out. https://msdn.microsoft.com/en-us/library/windows/desktop/dd162492(v=vs.85).aspx
    I just don't know exactly how to do that. Any ideas? Thanks.
  11. Re: How to use TextOut without processing WM_PAINT?

    Basically the documents say that both WM_INITDIALOG and WM_SHOWWINDOW are processed before WM_PAINT, so TextOut within either WM_INITDIALOG or WM_SHOWWINDOW won't do anything. But my questions IS...
  12. Re: How to use TextOut without processing WM_PAINT?

    Did you mean that since WM_PAINT is processed after, then whatever is done within WM_INITDIALOG or WM_SHOWWINDOW will be erased because WM_PAINT does nothing? If that is the case, is it still...
  13. How to use TextOut without processing WM_PAINT?

    I call TextOut within WM_PAINT and it works. But if I call TextOut within WM_INITDIALOG or WM_SHOWWINDOW, it doesn't work. Here is the code,


    RECT rect;
    ::GetClientRect(hwnd, &rect);
    HDC hdc =...
  14. Replies
    13
    Views
    593

    Re: A question regarding creating a window

    It turns out the first argument of CreateDialog wasn't set up properly. Now I am able to create the dialog. But modeless dialog is not a solution. Basically in order to display the dialog all the...
  15. Replies
    13
    Views
    593

    Re: A question regarding creating a window

    Yes. Is there other things I should be aware of? Thanks.
  16. Replies
    13
    Views
    593

    Re: A question regarding creating a window

    Thanks for your replies. I think the problem is that when I called CreateDialog, it returns NULL handle because of the error ERROR_RESOURCE_TYPE_NOT_FOUND. I already included the dialog template in...
  17. Replies
    13
    Views
    593

    Re: A question regarding creating a window

    Ok, I created a modoless dialog,


    HWND g_hDlg = NULL;

    g_hDlg = CreateDialogA(NULL, MAKEINTRESOURCEA(IDD_MYDLG), NULL, (DLGPROC)DlgProc);

    DWORD ret = GetLastError();
    char s[64];
  18. Replies
    13
    Views
    593

    A question regarding creating a window

    This is a typical way to create a window,


    LRESULT CALLBACK WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
    {
    switch(msg)
    {
    case WM_CLOSE:
    ...
  19. Re: Is there any way to change the background color of a messagebox?

    Even I return TRUE in processing WM_ERASEBKGND, it still doesn't work. The window looks transparent but I expect it to be red. What went wrong? Thanks.
  20. Re: Is there any way to change the background color of a messagebox?

    SO I changed the code,



    LRESULT CALLBACK WindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
    {
    HDC hdc;

    switch (uMsg)
    {
  21. Re: Is there any way to change the background color of a messagebox?

    Now I created my own custom window and then within window procedure I tried to process the window message WM_ERASEBKGND, here is the code,


    LRESULT CALLBACK WindowProc(HWND hwnd, UINT uMsg,...
  22. Re: Is there any way to change the background color of a messagebox?

    Yes, it succeeds. Actually I can make use of the callback function CallWndRetProc to change the position of the dialog but I can't change the color of the dialog within the same callback function...
  23. Re: Is there any way to change the background color of a messagebox?

    The call to SetWindowHookEx and the call to the callback function CallWndRetProc are in the same process.
  24. Is there any way to change the background color of a messagebox?

    Here is what I did,


    oldHook = ::SetWindowsHookEx(WH_CALLWNDPROCRET, CallWndRetProc, NULL, ::GetCurrentThreadId());

    MessageBox(...);

    UnhookWindowsHookEx(oldHook);

    Then within the...
  25. Replies
    3
    Views
    696

    A question regarding a debug error.

    Here is the code,


    void MergeArray(int arr[], int l, int m, int r)
    {
    int* b = new int[r-1+1];

    int i, j;

    int index = 0;
Results 1 to 25 of 993
Page 1 of 40 1 2 3 4


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center