May 23, 2019, 07:14:56 am

News:

Own IWBasic 2.x ? -----> Get your free upgrade to 3.x now.........


WndProc question

Started by ExMember001, December 09, 2007, 08:55:17 pm

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

ExMember001

I have to use WndProc in my window class to get WM_GETMINMAXINFO message
the problem is, when i use the WndProc in my class , some message include in the window class doesnt work anymore...
like OnSize and OnPaint ect...

My question is, is it possible to use WndProc with Other window class methods like OnSize or OnPaint?
or should i process all the messages through WndProc?

Ionic Wind Support Team

You need to call the base class version of the method for messages you don't handle.

For example this is the WndProc for the MouseLeave_Win example:

Code Select

HoverWindow::WndProc(unsigned int message, unsigned int wparam, unsigned int lparam),int
{
POINT pt;
select message
{
case WM_MOUSEHOVER:
bHover = true;
SetWindowColor(RGB(255,0,0));
StartTimer(2500); //close the popup after a few seconds
popup->ShowWindow(SWSHOW);
case WM_MOUSELEAVE:
bHover = false;
SetWindowColor(RGB(255,255,255));
StopTimer();
popup->ShowWindow(SWHIDE);

}
return CWindow!!WndProc(message,wParam,lParam);
}


Note the calling of the base class method at the end.

Paul.
Ionic Wind Support Team

ExMember001