Having trouble overriding WndProc in VC8 Managed C++ Windows Form
C / C++ / MFC
1
Posts
1
Posters
0
Views
1
Watching
-
I have a VC8 Managed C++ Windows Form project. In it I try to overide thd WndProc like below, but when debugging the function is never called. I'm not sure why, has the method of doing this changed since VC7.1?
void WndProc(System::Windows::Forms::Message MsgByRef)
{
switch (MsgByRef.Msg)
{
case WM_PAINT:
{
PAINTSTRUCT kPS;
HDC hDC = BeginPaint((HWND)MsgByRef.HWnd.ToPointer(),&kPS);EndPaint((HWND)MsgByRef.HWnd.ToPointer(),&kPS); } } Form::DefWndProc(MsgByRef);
}