foobar2000 SDK  2015-08-03
Public Member Functions | Private Member Functions | Private Attributes
registerclass_scope_delayed

#include <win32_misc.h>

Public Member Functions

 registerclass_scope_delayed ()
 
 ~registerclass_scope_delayed ()
 
ATOM get_class () const
 
bool is_registered () const
 
void toggle_off ()
 
void toggle_on (UINT p_style, WNDPROC p_wndproc, int p_clsextra, int p_wndextra, HICON p_icon, HCURSOR p_cursor, HBRUSH p_background, const TCHAR *p_classname, const TCHAR *p_menuname)
 

Private Member Functions

 registerclass_scope_delayed (const registerclass_scope_delayed &)
 
const registerclass_scope_delayedoperator= (const registerclass_scope_delayed &)
 

Private Attributes

ATOM m_class
 

Detailed Description

Definition at line 36 of file win32_misc.h.

Constructor & Destructor Documentation

registerclass_scope_delayed::registerclass_scope_delayed ( )
inline

Definition at line 38 of file win32_misc.h.

registerclass_scope_delayed::~registerclass_scope_delayed ( )
inline

Definition at line 45 of file win32_misc.h.

registerclass_scope_delayed::registerclass_scope_delayed ( const registerclass_scope_delayed )
inlineprivate

Definition at line 47 of file win32_misc.h.

47 {throw pfc::exception_not_implemented();}

Member Function Documentation

ATOM registerclass_scope_delayed::get_class ( ) const
inline

Definition at line 43 of file win32_misc.h.

43 {return m_class;}
bool registerclass_scope_delayed::is_registered ( ) const
inline

Definition at line 40 of file win32_misc.h.

40 {return m_class != 0;}
const registerclass_scope_delayed& registerclass_scope_delayed::operator= ( const registerclass_scope_delayed )
inlineprivate

Definition at line 48 of file win32_misc.h.

48 {throw pfc::exception_not_implemented();}
void registerclass_scope_delayed::toggle_off ( )

Definition at line 19 of file win32_misc.cpp.

19  {
20  if (m_class != 0) {
21  UnregisterClass((LPCTSTR)m_class,core_api::get_my_instance());
22  m_class = 0;
23  }
24 }
HINSTANCE get_my_instance()
Retrieves HINSTANCE of calling DLL.
void registerclass_scope_delayed::toggle_on ( UINT  p_style,
WNDPROC  p_wndproc,
int  p_clsextra,
int  p_wndextra,
HICON  p_icon,
HCURSOR  p_cursor,
HBRUSH  p_background,
const TCHAR *  p_classname,
const TCHAR *  p_menuname 
)

Definition at line 3 of file win32_misc.cpp.

3  {
4  toggle_off();
5  WNDCLASS wc = {};
6  wc.style = p_style;
7  wc.lpfnWndProc = p_wndproc;
8  wc.cbClsExtra = p_clsextra;
9  wc.cbWndExtra = p_wndextra;
10  wc.hInstance = core_api::get_my_instance();
11  wc.hIcon = p_icon;
12  wc.hCursor = p_cursor;
13  wc.hbrBackground = p_background;
14  wc.lpszMenuName = p_menu_name;
15  wc.lpszClassName = p_class_name;
16  WIN32_OP_CRITICAL("RegisterClass", (m_class = RegisterClass(&wc)) != 0);
17 }
HINSTANCE get_my_instance()
Retrieves HINSTANCE of calling DLL.

Field Documentation

ATOM registerclass_scope_delayed::m_class
private

Definition at line 50 of file win32_misc.h.


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