foobar2000 SDK  2015-08-03
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 183 of file win-objects.h.

Constructor & Destructor Documentation

win32_accelerator::win32_accelerator ( )
inline

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

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

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

186 {release();}

Member Function Documentation

HACCEL win32_accelerator::get ( ) const
inline

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

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

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

271  {
272  release();
273  SetLastError(NO_ERROR);
274  m_accel = LoadAccelerators(p_inst,p_id);
275  if (m_accel == NULL) {
276  throw exception_win32(GetLastError());
277  }
278 }
win32_accelerator::PFC_CLASS_NOT_COPYABLE ( win32_accelerator  ,
win32_accelerator   
)
private
void win32_accelerator::release ( )

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

280  {
281  if (m_accel != NULL) {
282  DestroyAcceleratorTable(m_accel);
283  m_accel = NULL;
284  }
285 }

Field Documentation

HACCEL win32_accelerator::m_accel
private

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


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