1. We have moved from vBulletin to XenForo and you are viewing the site in the middle of the move. Though the functional aspect of everything is working fine, we are still working on other changes including the new design on Xenforo.
    Dismiss Notice

MessageBox or Dialogs erase text in window

Discussion in 'Win32' started by mestree, May 17, 2011.

  1. mestree

    mestree New Member

    Joined:
    May 17, 2011
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    0
    Hi I am using windows CE 6.0 for my development and when I write text in main window, the text appear normal, but when I send a MesageBox() or change a dialog visible or not all text in window are erased, for example I write
    ExtTextOut(hdcP, rt.left, rt.top, ETO, &rt, szText, _tcslen(szText), NULL);
    all time that I send
    ShowWindow(hDialog, SW_HIDE); or MessageBox(hwndT, _T("This is a PRESS message"),_T("Hi!"), MB_OK);
    it call
    case WM_PAINT:
    {
    RECT rcClient;
    PAINTSTRUCT ps;
    HDC hdc = BeginPaint(hwnd, &ps);
    EndPaint(hwnd, &ps);
    }
    and the text in window are erased. What is happening? What can I do for not erase text in window?
     
  2. fashionbop

    fashionbop New Member

    Joined:
    Sep 11, 2009
    Messages:
    27
    Likes Received:
    1
    Trophy Points:
    0
    Occupation:
    Shopping from China
    Location:
    Guangzhou, China
    Home Page:
    1.
    case WM_PAINT:
    {
    RECT rcClient;
    PAINTSTRUCT ps;
    HDC hdc = BeginPaint(hwnd, &ps);
    ExtTextOut(hdcP, rt.left, rt.top, ETO, &rt, szText, _tcslen(szText), NULL);
    EndPaint(hwnd, &ps);
    }

    2.call ValidateRect (hWnd,NUL,FALSE) ---- see MSDN
     

Share This Page