Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SetWindowSubclass(m_hWnd, SubClassProc, 0, (DWORD) this);
- LRESULT CALLBACK CMSKStatusBar::SubClassProc(HWND hWnd, UINT msg,
- WPARAM wParam, LPARAM lParam, UINT_PTR uIdSubclass,
- DWORD_PTR dwRefData)
- {
- // Call default statusbar
- DefSubclassProc(hWnd, msg, wParam, lParam);
- PAINTSTRUCT ps;
- HDC hDC;
- RECT rcClient;
- switch (msg) {
- case WM_PAINT:
- // Clear the stupid sizegrip
- GetClientRect(hWnd, &rcClient);
- rcClient.left = rcClient.right - 50;
- hDC = GetDC(hWnd);
- FillRect(hDC, &rcClient, CreateSolidBrush(RGB(70, 130, 180)));
- DeleteDC(hDC);
- return 0;
- case WM_NCHITTEST: // Override the sizegrip hittest
- return 0;
- }
- return 0;
- }
Add Comment
Please, Sign In to add comment