Skip to main content
gamedev.net
🔒 Locked

Hiding a window

Started by Zeblar Nagrim Jan 17, 2002 at 4:00 PM 3 replies 350+ views
Original Post
Zeblar Nagrim
Zeblar Nagrim
Which message is responsible for drawing a control item in win32? It doesn´t seems to be WM_PAINT...
  

case WM_PAINT:

  CChildWnd* pDialog;
  pDialog = GetChildFromID(IDD_DIALOG2);

  if(pDialog != NULL)
  {
    HWND hwnd = pDialog->m_hWnd;
    HWND control = GetDlgItem(hwnd, IDC_STATICLABEL);

    if(control != NULL)
    {
      if(p_hWnd == control)
      {
       // This never happend.

       return 0; // return zero (do not paint)

     }
  }
 }

 break;

  
Zeblar Nagrim, Lord of Chaos
jwace81
jwace81
If you are wanting to hide a window, then why not just call ShowWindow(hWnd, SW_HIDE) for that window. Then it will not be shown.

j.w.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.