#ifndef _DIALOG_H #define _DIALOG_H #ifdef ORIGIN_COM_SUPPORT #include #include #endif// ORIGIN_COM_SUPPORT /** >User Interface Controls */ class Dialog { public: Dialog(LPCTSTR DlgName, LPCTSTR DllName); Dialog(UINT nDlgID, LPCTSTR DllName); BOOL Attach(LPCTSTR DlgName, LPCTSTR DllName); BOOL Attach(UINT nDlgID, LPCTSTR DllName); /**# Call this member function to invoke the modal dialog box and return the dialog-box result when done. Example: MyDlg.DoModal(GetWindow()); Return: The ID of the button click to close the dialog box, or -1 if the dialog cannot be loaded for whatever reason. Parameters: hWndParent = Specifies the parent window, or NULL to use the active window dwOptions = flags to control the dialog. Including, DLG_OPTIONS_SHIFT_SHOW_DEFAULT_TRUE This flag is for dialogs that contains a check box for Show-only-if-shift-key-is-down, If this flag is on, the default value for this check box will be true. Please note that once the dialog is open and closed normally, this setting (ShiftShow) will be saved into Origin.ini, so this parameter is used only when the dialog is opened the first time. DLG_OPTIONS_USE_OPS This flag can be used to turn on the recording mechanism in Dialog Builder. Please note that only controls that have a string table entry will participate in recording. */ int DoModal(HWND hWndParent=NULL, DWORD dwOptions = 0); BOOL Create(HWND hWndParent=NULL, DWORD dwOptions = 0); BOOL IsShiftShow(BOOL bDefault=FALSE); /** This function installs a system timer. Example: SetTimer(1001,300); Return: The timer identifier of the new timer if the function is successful. An application passes this value to the KillTimer member function to kill the timer. Nonzero if successful; otherwise 0. Parameters: nIDEvent = Specifies a nonzero timer identifier. nElapse = Specifies the time-out value, in milliseconds. Remarks: Every time a time-out occurs, the dialog will receive a WM_TIMER message. */ int SetTimer( int nIDEvent, uint nElapse); /** This function kills a system timer. Example: KillTimer(1001); Return: Specifies the outcome of the function. The value is nonzero if the event was killed. It is 0 if the KillTimer function could not find the specified timer event. Parameters: nIDEvent = The value of the timer event passed to SetTimer. Remarks: Kills the timer event identified by nIDEvent from the earlier call to SetTimer. Any pending WM_TIMER messages associated with the timer are removed from the message queue. */ BOOL KillTimer( int nIDEvent ); /** */ void Close(int nModalRet = -1); Window GetWindow(); #ifdef ORIGIN_COM_SUPPORT Control GetItem(int ID, int nPageID = 0); protected: Msgmap m_msgmap; #endif// ORIGIN_COM_SUPPORT }; class PropertyPage : public Dialog { public: PropertyPage(); BOOL Attach(int nResID, Dialog& dlgParentOwner); #ifdef ORIGIN_COM_SUPPORT Control GetItem(int ID); #endif// ORIGIN_COM_SUPPORT }; #endif // _DIALOG_H