|
-
December 2nd, 2003, 05:12 PM
#6
OnPaint() ?
Maybe you'll find something in MFC about subclassing, I don't know.
Without MFC it looks so:
1. WNDPROC wpOrigProc = (WNDPROC) SetWindowLong( hWnd, GWL_WNDPROC, (LONG) NewProc);
2. INT_PTR CALLBACK NewProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
if (uMsg == WM_LBUTTONDOWN) {
} else if ( WhatYouWant ) {
} else {
return CallWindowProc(wpOrigLinkProc, hWnd, uMsg, wParam, lParam);
}
}
3 . don't forget about:
::SetWindowLong(hWnd, GWL_WNDPROC, (LONG)wpOrigProc);
Why you don't want to disturb the "parent" ? 
That's the shortest way to change the color.
Good luck
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|