modelessdialog.h
来自「c+++ game uploading now」· C头文件 代码 · 共 37 行
H
37 行
/**
@file
Interface of a generic win32 modeless dialog
*/
#if !defined _MODELESSDIALOG_H_
#define _MODELESSDIALOG_H_
#include "WinException.h"
namespace Win
{
/**
encapulates the win32 modeless dialog concept (ALMOST acceptable) */
class ModelessDialog
{
public:
/**
@param hInst handle to the application instance
@param lpTemplate pointer to the dialog template
@param dlgProc the dialog procedure
@exception throws Win::Exception upon failure */
ModelessDialog(HINSTANCE hInst, LPCSTR lpTemplate, DLGPROC dlgProc)
{
if(0==(_hDialog=::CreateDialog(hInst, lpTemplate, 0, dlgProc)))
throw Win::Exception("CreateDialog");
}
operator HWND()
{
return _hDialog;
}
private:
HWND _hDialog;
};
}
#endif //_MODELESSDIALOG_H_
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?