foobar2000 SDK
2015-08-03
|
#include <win32_dialog.h>
Public Member Functions | |
__declspec (deprecated) bool create(unsigned p_id | |
Data Fields | |
HWND HINSTANCE | p_instance = core_api::get_my_instance()) |
HWND | p_parent |
Protected Member Functions | |
dialog_modeless () | |
virtual | ~dialog_modeless () |
HWND | get_wnd () const |
virtual BOOL | on_message (UINT msg, WPARAM wp, LPARAM lp)=0 |
Private Types | |
enum | { destructor_none, destructor_normal, destructor_fromwindow } |
Private Member Functions | |
BOOL | on_message_wrap (UINT msg, WPARAM wp, LPARAM lp) |
void | on_window_destruction () |
Static Private Member Functions | |
static INT_PTR CALLBACK | DlgProc (HWND wnd, UINT msg, WPARAM wp, LPARAM lp) |
Private Attributes | |
enum dialog_helper::dialog_modeless:: { ... } | m_destructor_status |
bool | m_is_in_create |
HWND | m_wnd |
This class is meant to be used with new/delete operators only. Destroying the window - outside create() / WM_INITDIALOG - will result in object calling delete this. If object is deleted directly using delete operator, WM_DESTROY handler may not be called so it should not be used (use destructor of derived class instead). Classes derived from dialog_modeless must not be instantiated in any other way than operator new().
Typical usage :
class mydialog : public dialog_helper::dialog_modeless {...}; (...) bool createmydialog() { mydialog * instance = new mydialog; if (instance == 0) return flase; if (!instance->create(...)) {delete instance; return false;} return true; }
Definition at line 69 of file win32_dialog.h.
|
private |
Enumerator | |
---|---|
destructor_none | |
destructor_normal | |
destructor_fromwindow |
Definition at line 89 of file win32_dialog.h.
|
inlineprotected |
Definition at line 79 of file win32_dialog.h.
|
protectedvirtual |
Definition at line 111 of file win32_dialog.cpp.
dialog_helper::dialog_modeless::__declspec | ( | deprecated | ) |
Creates the dialog window. This will call on_message with WM_INITDIALOG. To abort creation, you can call DestroyWindow() on our window; it will not delete the object but make create() return false instead. You should not delete the object from inside WM_INITDIALOG handler or anything else possibly called from create().
|
staticprivate |
Definition at line 162 of file win32_dialog.cpp.
|
inlineprotected |
Definition at line 80 of file win32_dialog.h.
|
protectedpure virtual |
Standard windows message handler (DialogProc-style). Use get_wnd() to retrieve our dialog window handle.
|
private |
Definition at line 154 of file win32_dialog.cpp.
|
private |
Definition at line 133 of file win32_dialog.cpp.
enum { ... } dialog_helper::dialog_modeless::m_destructor_status |
|
private |
Definition at line 90 of file win32_dialog.h.
|
private |
Definition at line 88 of file win32_dialog.h.
HWND HINSTANCE dialog_helper::dialog_modeless::p_instance = core_api::get_my_instance()) |
Definition at line 74 of file win32_dialog.h.
HWND dialog_helper::dialog_modeless::p_parent |
Definition at line 74 of file win32_dialog.h.