Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

WindowProcedure()

Status
Not open for further replies.

nbgoku

Programmer
May 25, 2004
108
US
hi im trying to detect when the main window is moved (mother window, not child) ... ive gotten teh following code below from some tutorials, the thing is they didnt use classes in the tutorials, im trying to get this function to work with classes, any help would be great


CODE
LRESULT CALLBACK WindowProcedure(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) {

switch(msg)
{
case WM_MOVE:

MessageBox(hWnd, "WM_MOVE: The Window Moved", "Goodbye!", MB_OK);
return 0;
}
return DefWindowProc(hWnd, msg, wParam, lParam);
}


i have a CDialog, and a CPostfilterDlg, should this be in the code somewhere, like


CODE
CPostfilterDlg::LRESULT CALLBACK WindowProcedure(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
...
return CDialog::DefWindowProc(hWnd, msg, wParam, lParam);

i dont know how to declare a LRESULT CALLBACK in the .h file, how do i do that?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top