static void status_OnCommand( HWND hwnd, int id, HWND hctl, UINT codeNotify) { char buffer[255]; struct statusWindowData *theData; theData = (struct statusWindowData *) GetWindowLongPtr(hwnd,GWLP_USERDATA); if (theData == NULL) { return; } switch (id) { case ID_FILE_PRINT: sprintf(buffer,"%s Window",theData->baseName); PrintWindowDriver(GetWindowInstance(hMainFrame),hwnd,buffer); return; case ID_FILE_SAVE: case ID_FILE_SAVE_AS: SaveStatusWindow(hwnd); return; } FORWARD_WM_COMMAND(hwnd,id,hctl,codeNotify,DefMDIChildProc); }
static BOOL PrintFile( HWND hWnd) { char title[128]; GetWindowText(hWnd,title,127); PrintWindowDriver(GetWindowInstance(hMainFrame),hWnd,title); return(TRUE); }