1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43
|
class Calibration
{
public:
Calibration(void);
~Calibration(void);
bool Initialize(HINSTANCE hInstance, HWND hWnd);
private:
HWND hWnd;
INT_PTR CALLBACK Initialize_CallBack(
HWND hDlg,
UINT message,
WPARAM wParam,
LPARAM lParam);
};
#include "Calibration.h"
#define BOOST_BIND_ENABLE_STDCALL
#include <boost/bind.hpp>
INT_PTR CALLBACK Calibration::Initialize_CallBack(
HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
{
// use of hWnd
}
bool Calibration::Initialize(HINSTANCE hInstance, HWND hWnd)
{
this->hWnd = hWnd;
if (DialogBox( hInstance,
MAKEINTRESOURCE(IDD_DIALOG_DISPLAY_SIZE),
hWnd,
boost::bind(
&Calibration::Initialize_CallBack,
boost::ref(this),
2)
) != IDOK){
return false;
}
return true;
} |
Partager