Guest User

Untitled

a guest
Dec 13th, 2017
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. SetWindowSubclass(m_hWnd, SubClassProc, 0, (DWORD) this);
  2.  
  3. LRESULT CALLBACK CMSKStatusBar::SubClassProc(HWND hWnd, UINT msg,
  4. WPARAM wParam, LPARAM lParam, UINT_PTR uIdSubclass,
  5. DWORD_PTR dwRefData)
  6. {
  7. // Call default statusbar
  8. DefSubclassProc(hWnd, msg, wParam, lParam);
  9.  
  10. PAINTSTRUCT ps;
  11. HDC hDC;
  12. RECT rcClient;
  13.  
  14. switch (msg) {
  15. case WM_PAINT:
  16. // Clear the stupid sizegrip
  17. GetClientRect(hWnd, &rcClient);
  18. rcClient.left = rcClient.right - 50;
  19. hDC = GetDC(hWnd);
  20. FillRect(hDC, &rcClient, CreateSolidBrush(RGB(70, 130, 180)));
  21. DeleteDC(hDC);
  22. return 0;
  23. case WM_NCHITTEST: // Override the sizegrip hittest
  24. return 0;
  25. }
  26.  
  27. return 0;
  28. }
Add Comment
Please, Sign In to add comment