i want to overload the windows procedure to control ,how does application deal with the message sent. now,the development tool i used is Borland C++ Builder 6.0.You also give me the samples in another development tool.
thanks
classicalhacker
i want to overload the windows procedure to control ,how does application deal with the message sent. now,the development tool i used is Borland C++ Builder 6.0.You also give me the samples in another development tool.
thanks
classicalhacker
To overload the procedure just do this --
Obviously hwnd is the window handle and OldWndProc is the old window procedure, instead of using DefWindowProc in your NewWndProc use CallWindowProc, it is the same but the first param is the OldWndProc and then it's just hwnd,msg,wParam,lParam as normal.Code:WNDPROC OldWndProc = SetWindowLong( hwnd, GWL_PROC, (LONG)NewWndProc );
Have a look at the WindowProc property and WndProc method in TForm.