foobar2000 SDK  2015-08-03
Public Member Functions | Data Fields | Protected Member Functions | Static Private Member Functions | Private Attributes
dialog_helper::dialogabstract

#include <win32_dialog.h>

Public Member Functions

 __declspec (deprecated) int run_modal(unsigned id
 
 __declspec (deprecated) HWND run_modeless(unsigned id
 
HWND get_wnd ()
 

Data Fields

HWND parent
 

Protected Member Functions

 dialog ()
 
 ~dialog ()
 
void end_dialog (int code)
 
virtual BOOL on_message (UINT msg, WPARAM wp, LPARAM lp)=0
 

Static Private Member Functions

static INT_PTR CALLBACK DlgProc (HWND wnd, UINT msg, WPARAM wp, LPARAM lp)
 

Private Attributes

bool m_is_modal
 
modal_dialog_scope m_modal_scope
 
HWND wnd
 

Detailed Description

Definition at line 11 of file win32_dialog.h.

Constructor & Destructor Documentation

dialog_helper::dialog::dialog ( )
inlineprotected

Definition at line 15 of file win32_dialog.h.

15 : wnd(0), m_is_modal(false) {}
dialog_helper::dialog::~dialog ( )
inlineprotected

Definition at line 16 of file win32_dialog.h.

16 { }

Member Function Documentation

dialog_helper::dialog::__declspec ( deprecated  )
dialog_helper::dialog::__declspec ( deprecated  )
INT_PTR CALLBACK dialog_helper::dialog::DlgProc ( HWND  wnd,
UINT  msg,
WPARAM  wp,
LPARAM  lp 
)
staticprivate

Definition at line 8 of file win32_dialog.cpp.

9  {
10  dialog * p_this;
11  BOOL rv;
12  if (msg==WM_INITDIALOG)
13  {
14  p_this = reinterpret_cast<dialog*>(lp);
15  p_this->wnd = wnd;
16  SetWindowLongPtr(wnd,DWLP_USER,lp);
17 
18  if (p_this->m_is_modal) p_this->m_modal_scope.initialize(wnd);
19  }
20  else p_this = reinterpret_cast<dialog*>(GetWindowLongPtr(wnd,DWLP_USER));
21 
22  rv = p_this ? p_this->on_message(msg,wp,lp) : FALSE;
23 
24  if (msg==WM_DESTROY && p_this)
25  {
26  SetWindowLongPtr(wnd,DWLP_USER,0);
27 // p_this->wnd = 0;
28  }
29 
30  return rv;
31  }
typedef BOOL(WINAPI *pPowerSetRequest_t)(__in HANDLE PowerRequest
void dialog_helper::dialog::end_dialog ( int  code)
protected

Definition at line 49 of file win32_dialog.cpp.

50  {
51  assert(m_is_modal);
52  if (m_is_modal) uEndDialog(wnd,code);
53  }
HWND dialog_helper::dialog::get_wnd ( )
inline

Definition at line 23 of file win32_dialog.h.

23 {return wnd;}
virtual BOOL dialog_helper::dialog::on_message ( UINT  msg,
WPARAM  wp,
LPARAM  lp 
)
protectedpure virtual

Field Documentation

bool dialog_helper::dialog::m_is_modal
private

Definition at line 32 of file win32_dialog.h.

modal_dialog_scope dialog_helper::dialog::m_modal_scope
private

Definition at line 34 of file win32_dialog.h.

HWND dialog_helper::dialog::parent

Definition at line 25 of file win32_dialog.h.

HWND dialog_helper::dialog::wnd
private

Definition at line 29 of file win32_dialog.h.


The documentation for this class was generated from the following files: