b2科目四模拟试题多少题驾考考爆了怎么补救
b2科目四模拟试题多少题 驾考考爆了怎么补救

Windows核心编程学习一:使用DialogBoxParam显示模式

电脑杂谈  发布时间:2016-04-28 15:14:45  来源:网络整理

你是否正在寻找关于dialogboxparam的内容?让我把最实时的东西奉献给你:

/******************************************************************************* * File:FirstTry.cpp * Author:guzhoudiaoke@126.com * Time:2013-04-14 * 描述:主要尝试使用DialogBoxParam函数显式一个对话框 *******************************************************************************/ #include <Windows.h> #include <Windowsx.h> #include <tchar.h> #include "Resource.h" /* SetDlgMsgResult This macro maps to the SetWindowLong function. * SetWindowLong changes an attribute of the specified window, also sets a 32-bit (LONG) * value at the specified offset into the extra window memory of a window. * The normal HANDLE_MSG macro in WindowsX.h does not work properly for dialog * boxes because DlgProc returns a BOOL instead of an LRESULT (likeWndProcs). * This chHANDLE_DLGMSG macro corrects the problem. */ #define chHANDLE_DLGMSG(hWnd, message, fn) \ case (message): return (SetDlgMsgResult(hWnd, uMsg, \ HANDLE_##message((hWnd), (wParam), (lParam), (fn)))) void Dlg_OnCommand(HWND hwnd, int id, HWND hwndCtl, UINT codeNotify) { switch (id) { case IDCANCEL: EndDialog(hwnd, id); break; } } // 对话框过程函数 INT_PTR WINAPI Dlg_Proc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) { switch (uMsg) { chHANDLE_DLGMSG(hwnd, WM_COMMAND, Dlg_OnCommand); } return FALSE; } int WINAPI _tWinMain(HINSTANCE hinstExe, HINSTANCE, PTSTR pszCmdLine, int) { dialogboxparam(hinstExe, MAKEINTRESOURCE(IDD_FIRSTTRY), NULL, Dlg_Proc, _ttoi(pszCmdLine)); return 0; }
其中chHANDLE_DLGMSG是原书作者对HANDLE_MSG的改进,。

以上就是关于dialogboxparam的全部内容,相信你一定会非常满意。


本文来自电脑杂谈,转载请注明本文网址:
http://www.pc-fly.com/a/shenmilingyu/article-3238-1.html

    相关阅读
      发表评论  请自觉遵守互联网相关的政策法规,严禁发布、暴力、反动的言论

      热点图片
      拼命载入中...