⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 modelessdialog.h

📁 c+++ game uploading now
💻 H
字号:
/**
 @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 + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -