Advertisement
Guest User

123

a guest
Jun 3rd, 2017
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. ...
  3.  
  4. case WM_COMMAND:
  5.  
  6.         if ((HWND)lParam == hButton_get_data)
  7.         {
  8.  
  9.             WNDCLASS w;
  10.             memset(&w, 0, sizeof(WNDCLASS));
  11.             w.lpfnWndProc = ChildProc;
  12.             w.hInstance = hInst;
  13.             w.lpszClassName = "ChildWClass";
  14.  
  15.             RegisterClass(&w);
  16.  
  17.             child = CreateWindowEx(
  18.                 0,                              // Optional window styles.
  19.                 "some class",                     // Window class
  20.                 "child",    // Window text
  21.                 WS_CHILD | WS_BORDER | WS_VISIBLE,            // Window style
  22.                 100, 100,
  23.                 600, 700,
  24.                 hwnd,       // Parent window    
  25.                 NULL,       // Menu
  26.                 hInst,  // Instance handle
  27.                 NULL        // Additional application data
  28.             );
  29.  
  30.  
  31.  
  32.             if (!child)
  33.             {
  34.                 MessageBox(NULL, "Error", "Error", MB_OK);
  35.                 DestroyWindow(hwnd);
  36.                 break;
  37.             }
  38.  
  39.             ShowWindow(child, SW_NORMAL);
  40.             UpdateWindow(child);
  41.  
  42.         }
  43.  
  44. ...
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement