Advertisement
Guest User

Untitled

a guest
Jun 22nd, 2021
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.57 KB | None | 0 0
  1. case WM_INITDIALOG:
  2. {
  3.     ...
  4.    
  5.     // Add Status Bar
  6.     HWND hStatus = CreateWindowExW(0, STATUSCLASSNAMEW, nullptr, WS_CHILD | WS_VISIBLE | SBARS_SIZEGRIP,
  7.         0, 0, 0, 0, hWnd,
  8.         reinterpret_cast<HMENU>(IDC_STATUS_BAR), GetModuleHandleW(nullptr), nullptr);
  9.  
  10.     int status_parts[] = { 100, 160, 300 ,-1 };
  11.        
  12.     SendMessageW(hStatus, SB_SETPARTS, 2, reinterpret_cast<LPARAM>(&status_parts));
  13.     SendMessageW(hStatus, SB_SETTEXT, 0, reinterpret_cast<LPARAM>(L"Test"));
  14.        
  15.     return TRUE;
  16. }
  17. case WM_SIZE:
  18. {
  19.     SendMessageW(GetDlgItem(hWnd, IDC_STATUS_BAR), WM_SIZE, 0, 0);
  20.     return TRUE;
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement