March 28, 2024, 02:19:56 PM

News:

IonicWind Snippit Manager 2.xx Released!  Install it on a memory stick and take it with you!  With or without IWBasic!


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:


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