IonicWind Software

Aurora Compiler => Coding Help - Aurora 101 => Topic started by: ExMember001 on December 09, 2007, 08:55:17 PM

Title: WndProc question
Post by: ExMember001 on December 09, 2007, 08:55:17 PM
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?
Title: Re: WndProc question
Post by: Ionic Wind Support Team on December 09, 2007, 09:11:22 PM
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:


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.
Title: Re: WndProc question
Post by: ExMember001 on December 09, 2007, 09:17:44 PM
Thanks !
Problem Solved!!  ;D