Here is what I did,
Then within the callback function CallWndRetProc, I tried to change the background color of the dialog,
But it doesn't change the background color of the dialog. I wonder what is the right way to do that? Thanks.
Code:
oldHook = ::SetWindowsHookEx(WH_CALLWNDPROCRET, CallWndRetProc, NULL, ::GetCurrentThreadId());
MessageBox(...);
UnhookWindowsHookEx(oldHook);
Code:
PAINTSTRUCT ps;
HDC hdc = BeginPaint(msg->hwnd, &ps);
::SetBkColor(hdc, RGB(255, 0, 0));
EndPaint(msg->hwnd, &ps);