diff options
Diffstat (limited to 'src/w32dlib/dialog.h')
-rw-r--r-- | src/w32dlib/dialog.h | 45 |
1 files changed, 17 insertions, 28 deletions
diff --git a/src/w32dlib/dialog.h b/src/w32dlib/dialog.h index bbc1d51..ea9ce4b 100644 --- a/src/w32dlib/dialog.h +++ b/src/w32dlib/dialog.h @@ -28,7 +28,7 @@ namespace W32DLib { /// \brief The base Dialog class. /// - class Dialog : public W32DLibCallbackInterface + class Dialog : public Window { public: @@ -59,12 +59,11 @@ namespace W32DLib /// virtual void OnClose(); - /// \brief Returns the HWND for the dialog. + /// \brief Enables or disables all Controls in the dialog. /// - /// This call will only work while the dialog is on display. - /// The behaviour is undefined if it is called at any other time. + /// Overrides Window::Enable. /// - HWND GetHWND(); + void Enable(bool enable); /// \brief Displays a modal dialog. /// @@ -88,15 +87,6 @@ namespace W32DLib /// void Close(INT_PTR result); - /// \brief Sets the title in a dialog box - /// - /// This call will only work while the dialog is on display. - /// The behaviour is undefined if it is called at any other time. - /// - /// \param text The title - /// - void SetTitle(const char *text); - protected: /// \brief Adds a control to the dialog. @@ -106,27 +96,26 @@ namespace W32DLib /// void AddControl(Control *control); + /// \brief Handles windows messages. + /// + /// \param wnd The window handle + /// \param msg The message + /// \param wp Additional parameters. Depends on the value of msg. + /// \param lp Additional parameters. Depends on the value of msg. + /// \return TRUE if the message has been handled. + /// \sa Window::InstanceProc + /// + virtual BOOL InstanceProc(HWND wnd, + UINT msg, + WPARAM wp, + LPARAM lp); private: typedef std::vector<Control*> ControlSet; - typedef std::map<HWND,Dialog*> ProcSet; - HWND m_wnd; bool m_open; ControlSet m_cset; - static ProcSet m_procset; - - BOOL InstanceDialogProc(HWND wnd, - UINT msg, - WPARAM wp, - LPARAM lp); - - static BOOL CALLBACK DialogProc(HWND wnd, - UINT msg, - WPARAM wp, - LPARAM lp); - }; // class Dialog }; // namespace w32dlib |