#define IDM_FIRSTDOCUMENT 3000 // special IDs for documents start here #define IDM_LASTDOCUMENT 3999 // no more than 1000 windows //..................................................................................................................... // UMW_MDI_DESTROY // WPARAM: unused // LPARAM: unused // // Sent to main frame to notify it that an MDI child window has been destroyed // so that it can determine which menu to post in case it was the last MDI // child #define UWM_MDI_DESTROY (WM_APP + 100) //..................................................................................................................... // UWM_UPDATE_TOOLBAR // WPARAM: unused // LPARAM: unused // // Sent to the main frame window to indicate that it should update the // tool bar icons #define UWM_UPDATE_TOOLBAR (WM_APP + 101) //..................................................................................................................... // UWM_UPDATE_MENU // WPARAM: unused // LPARAM: unused // // Sent to an MDI child to indicate that there has been a change in status // that requires updating the menu (not relevant, since this is usually // handled in the OnInitMenuPopup handler) and the toolbar (which requires // the menu be up-to-date). #define UWM_UPDATE_MENU (WM_APP + 102) //..................................................................................................................... // UWM_SET_ACCELERATOR // WPARAM: unused // LPARAM: handle of new accelerator table to use // Result: HACCEL // Handle of previous accelerator table // Sent to the main frame to change the accelerator table being used #define UWM_SET_ACCELERATOR (WM_APP + 103) #define HANDLE_UWM_SET_ACCELERATOR(hwnd, wParam, lParam, fn) \ ((LRESULT)(fn)(hwnd, (HACCEL)lParam)) //..................................................................................................................... // UWM_CONTEXTMENU // WPARAM: handle of control window // LPARAM: LOWORD x-position // HIWORD y-position // // This is sent to the MDI child window, but is handled as a separate // message. Otherwise the DefMDIChildProc will route it to the main frame // window, which, because of our dispatch, gives us an infinite recursion if // the child window is not prepared to deal with it. To give us robustness, // we define a separate message which will be ignored if the child routes it // back to the parent. // #define UWM_CONTEXTMENU (WM_APP + 104) #define UWM_RESETPAINTING (WM_APP + 105) #define FORWARD_UWM_CONTEXTMENU(hwnd, hwndCtl, xPos, yPos, fn) \ (L_BOOL)(L_UINT32)(fn)((hwnd), UWM_CONTEXTMENU, (WPARAM)(HWND)hwndCtl, MAKELPARAM((xPos), (yPos))) #define FORWARD_UWM_RESETPAINTING(hwnd, fn) \ (L_BOOL)(L_UINT32)(fn)((hwnd),UWM_RESETPAINTING,0,0) L_BOOL MDI_OnContextMenu ( HWND hwnd, HWND hwndCtl, L_INT xPos, L_INT yPos, HMENU context ) ; L_VOID MDI_ConformMenus ( HMENU hMaster, HMENU hPopup ) ; HWND MDI_Create ( HWND hwnd, L_UINT32 styles, L_INT classid, L_INT titleid, L_INT nX, L_INT nY, L_INT nWidth, L_INT nHeight ); extern HWND g_MDIClientWnd ;