foobar2000 SDK  2015-01-14
Public Member Functions | Private Member Functions | Private Attributes
win32_accelerator

#include <win-objects.h>

Public Member Functions

 win32_accelerator ()
 
 ~win32_accelerator ()
 
HACCEL get () const
 
void load (HINSTANCE p_inst, const TCHAR *p_id)
 
void release ()
 

Private Member Functions

 PFC_CLASS_NOT_COPYABLE (win32_accelerator, win32_accelerator)
 

Private Attributes

HACCEL m_accel
 

Detailed Description

Definition at line 179 of file win-objects.h.

Constructor & Destructor Documentation

win32_accelerator::win32_accelerator ( )
inline

Definition at line 181 of file win-objects.h.

181 : m_accel(NULL) {}
win32_accelerator::~win32_accelerator ( )
inline

Definition at line 182 of file win-objects.h.

182 {release();}

Member Function Documentation

HACCEL win32_accelerator::get ( ) const
inline

Definition at line 183 of file win-objects.h.

183 {return m_accel;}
void win32_accelerator::load ( HINSTANCE  p_inst,
const TCHAR *  p_id 
)

Definition at line 264 of file win-objects.cpp.

264  {
265  release();
266  SetLastError(NO_ERROR);
267  m_accel = LoadAccelerators(p_inst,p_id);
268  if (m_accel == NULL) {
269  throw exception_win32(GetLastError());
270  }
271 }
win32_accelerator::PFC_CLASS_NOT_COPYABLE ( win32_accelerator  ,
win32_accelerator   
)
private
void win32_accelerator::release ( )

Definition at line 273 of file win-objects.cpp.

273  {
274  if (m_accel != NULL) {
275  DestroyAcceleratorTable(m_accel);
276  m_accel = NULL;
277  }
278 }

Field Documentation

HACCEL win32_accelerator::m_accel
private

Definition at line 188 of file win-objects.h.


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