- case WM_HSCROLL:
- {
-#ifdef __WIN32__
- WORD code = LOWORD(wParam);
- WORD pos = HIWORD(wParam);
- HWND control = (HWND)lParam;
-#else
- WORD code = (WORD)wParam;
- WORD pos = LOWORD(lParam);
- HWND control = (HWND)HIWORD(lParam);
-#endif
- MSWOnHScroll(code, pos, (WXHWND) control);
- break;
- }
- case WM_VSCROLL:
- {
-#ifdef __WIN32__
- WORD code = LOWORD(wParam);
- WORD pos = HIWORD(wParam);
- HWND control = (HWND)lParam;
-#else
- WORD code = (WORD)wParam;
- WORD pos = LOWORD(lParam);
- HWND control = (HWND)HIWORD(lParam);
-#endif
- MSWOnVScroll(code, pos, (WXHWND) control);
- break;
- }
-#ifdef __WIN32__
- case WM_CTLCOLORBTN:
- {
- int nCtlColor = CTLCOLOR_BTN;
- HWND control = (HWND)lParam;
- HDC pDC = (HDC)wParam;
- return (DWORD)MSWOnCtlColor((WXHDC) pDC, (WXHWND) control, nCtlColor,
- message, wParam, lParam);
- break;
- }
- case WM_CTLCOLORDLG:
- {
- int nCtlColor = CTLCOLOR_DLG;
- HWND control = (HWND)lParam;
- HDC pDC = (HDC)wParam;
- return (DWORD)MSWOnCtlColor((WXHDC) pDC, (WXHWND) control, nCtlColor,
- message, wParam, lParam);\
- break;
- }
- case WM_CTLCOLORLISTBOX:
- {
- int nCtlColor = CTLCOLOR_LISTBOX;
- HWND control = (HWND)lParam;
- HDC pDC = (HDC)wParam;
- return (DWORD)MSWOnCtlColor((WXHDC) pDC, (WXHWND) control, nCtlColor,
- message, wParam, lParam);
- break;
- }
- case WM_CTLCOLORMSGBOX:
- {
- int nCtlColor = CTLCOLOR_MSGBOX;
- HWND control = (HWND)lParam;
- HDC pDC = (HDC)wParam;
- return (DWORD)MSWOnCtlColor((WXHDC) pDC, (WXHWND) control, nCtlColor,
- message, wParam, lParam);
- break;
- }
- case WM_CTLCOLORSCROLLBAR:
- {
- int nCtlColor = CTLCOLOR_SCROLLBAR;
- HWND control = (HWND)lParam;
- HDC pDC = (HDC)wParam;
- return (DWORD)MSWOnCtlColor((WXHDC) pDC, (WXHWND) control, nCtlColor,
- message, wParam, lParam);
- break;
- }
- case WM_CTLCOLORSTATIC:
- {
- int nCtlColor = CTLCOLOR_STATIC;
- HWND control = (HWND)lParam;
- HDC pDC = (HDC)wParam;
- return (DWORD)MSWOnCtlColor((WXHDC) pDC, (WXHWND) control, nCtlColor,
- message, wParam, lParam);
- break;
- }
- case WM_CTLCOLOREDIT:
- {
- int nCtlColor = CTLCOLOR_EDIT;
- HWND control = (HWND)lParam;
- HDC pDC = (HDC)wParam;
- return (DWORD)MSWOnCtlColor((WXHDC) pDC, (WXHWND) control, nCtlColor,
- message, wParam, lParam);
- break;
- }
-#else
- case WM_CTLCOLOR:
- {
- HWND control = (HWND)LOWORD(lParam);
- int nCtlColor = (int)HIWORD(lParam);
- HDC pDC = (HDC)wParam;
- return (DWORD)MSWOnCtlColor((WXHDC) pDC, (WXHWND) control, nCtlColor,
- message, wParam, lParam);
- break;
- }
-#endif
- case WM_SYSCOLORCHANGE:
- {
- // Return value of 0 means, we processed it.
- if (MSWOnColorChange((WXHWND) hWnd, message, wParam, lParam) == 0)
- return 0;
- else
- return MSWDefWindowProc(message, wParam, lParam );
- break;
- }
- case WM_PALETTECHANGED:
- {
- return MSWOnPaletteChanged((WXHWND) (HWND) wParam);
- break;
- }
- case WM_QUERYNEWPALETTE:
- {
- return MSWOnQueryNewPalette();
- break;
- }
- case WM_ERASEBKGND:
- {
- // Prevents flicker when dragging
- if (IsIconic(hWnd)) return 1;