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:
    http://www.fashion-bop.com
    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

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice