// TearoffMenu.h // // Revision Log // // Date Who SAR Notes // ========== === ======= ===================================== // 2001-10-12 mph Initial coding by Mark Henri of // MPH Software - markhenri@attbi.com // // Note: when trapping a mouse hit in a client window, you'll // need to add the screen coord offset of the left top corner // of the window to the point to get the screen offset necessary // for this class. For example-- // // RECT rt; // GetWindowRect(GetHwnd(), &rt); // p.x += rt.left; // p.y += rt.top; // CTearoffMenu m(GetInstance(), GetHwnd(), IDR_TEAROFF, p.x, p.y); // #ifndef TEAROFFMENU_H__ #define TEAROFFMENU_H__ #include class CTearoffMenu { public: CTearoffMenu(); CTearoffMenu(HINSTANCE i, HWND hwnd, UINT mid, int x, int y, UINT flags=TPM_LEFTALIGN | TPM_RIGHTBUTTON); CTearoffMenu(HINSTANCE i, HWND hwnd, UINT mid, HWND hButton=NULL, UINT flags=TPM_LEFTALIGN | TPM_RIGHTBUTTON); virtual ~CTearoffMenu(); void Run(HINSTANCE i, HWND hwnd, UINT mid, HWND hButton=NULL, UINT flags=TPM_LEFTALIGN | TPM_RIGHTBUTTON); void Run(HINSTANCE i, HWND hwnd, UINT mid, int x, int y, UINT flags=TPM_LEFTALIGN | TPM_RIGHTBUTTON); private: CTearoffMenu(CTearoffMenu& o); // no copy allowed }; #endif // !defined(AFX_TEAROFFMENU_H__A49118C1_A191_11D5_8C26_00201831DFA6__INCLUDED_)