还是第一喜欢的C++

妈的,没想到上一篇就那么点新内容 ,我还把整段代码贴上去了。。
BOOL CALLBACK AboutDlgProc(HWND hDlg, UINT msg, WPARAM wparam, LPARAM lparam)
{
	switch (msg)
	{
	case WM_INITDIALOG:
		break;
	case WM_COMMAND:
		switch (LOWORD(wparam))
		{
		case IDOK:
			EndDialog(
				hDlg, //Handle to the dialog to end.
				0);   //Return code.
			break;
		case IDCANCEL:
			EndDialog(
				hDlg, //Handle to the dialog to end.
				0);   //Return code.
			break;
		default:
			break;
		}

	}

	return true;
}
DialogBox(_hInstance, MAKEINTRESOURCE(IDD_DIALOG1), hwnd, AboutDlgProc);//BOOL BACK AboutDlgProc is our callback

We need to get a handle to the window and then call the dialog box function like this

这个MAKEINTRESOURCE 跟这个source.h的具体联系是什么 ,但是书上说source.h isautomatically created for us, we can manually edit it to name the dialog appropriately  。 这应该是这个M什么的是个文件吧。



评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值