[强]VC 6.0 可以这样创建对话框
2006-12-12 10:24
274 查看
// 看看代码吧
#include "stdafx.h"
#include "resource.h"
#include <windows.h>
static unsigned char dlg_14[] =
{
0xc0,0x20,0xc8,0x80,0x00,0x00,0x00,0x00,
0x04,0x00,0x00,0x00,0x00,0x00,0xb4,0x00,0x39,
0x00,0x00,0x00,0x00,0x00,0x47,0x00,0x6f,
0x00,0x74,0x00,0x6f,0x00,0x20,0x00,0x6c,
0x00,0x69,0x00,0x6e,0x00,0x65,0x00,0x00,
0x00,0x08,0x00,0x4d,0x00,0x53,0x00,0x20,
0x00,0x53,0x00,0x68,0x00,0x65,0x00,0x6c,
0x00,0x6c,0x00,0x20,0x00,0x44,0x00,0x6c,
0x00,0x67,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x02,0x50,0x00,0x00,0x00,0x00,0x07,
0x00,0x09,0x00,0x32,0x00,0x0a,0x00,0xb0,
0x04,0xff,0xff,0x82,0x00,0x26,0x00,0x4c,
0x00,0x69,0x00,0x6e,0x00,0x65,0x00,0x20,
0x00,0x4e,0x00,0x75,0x00,0x6d,0x00,0x62,
0x00,0x65,0x00,0x72,0x00,0x3a,0x00,0x00,
0x00,0x00,0x00,0x80,0x00,0x81,0x50,0x00,
0x00,0x00,0x00,0x37,0x00,0x07,0x00,0x39,
0x00,0x0c,0x00,0x02,0x01,0xff,0xff,0x81,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,
0x00,0x01,0x50,0x00,0x00,0x00,0x00,0x07,
0x00,0x22,0x00,0x32,0x00,0x0e,0x00,0x01,
0x00,0xff,0xff,0x80,0x00,0x4f,0x00,0x4b,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x01,0x50,0x00,0x00,0x00,0x00,0x4e,
0x00,0x22,0x00,0x32,0x00,0x0e,0x00,0x02,
0x00,0xff,0xff,0x80,0x00,0x43,0x00,0x61,
0x00,0x6e,0x00,0x63,0x00,0x65,0x00,0x6c,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
};
LRESULT CALLBACK DlgProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
int main(int argc, char* argv[])
{
HMODULE hModule = ::GetModuleHandle(NULL);
HINSTANCE hInst = hModule;
HRSRC hRsrc = ::FindResource(hInst, MAKEINTRESOURCE(IDD_DIALOG1), RT_DIALOG);
HGLOBAL hGlobal = ::LoadResource(hModule, hRsrc);
DialogBoxIndirectParam(hInst, (LPCDLGTEMPLATE)dlg_14, NULL, (DLGPROC)DlgProc, NULL);
return 0;
}
LRESULT CALLBACK DlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
switch(uMsg)
{
case WM_CLOSE:
::EndDialog(hDlg, IDOK);
return TRUE;
break;
}
return 0;
}
#include "stdafx.h"
#include "resource.h"
#include <windows.h>
static unsigned char dlg_14[] =
{
0xc0,0x20,0xc8,0x80,0x00,0x00,0x00,0x00,
0x04,0x00,0x00,0x00,0x00,0x00,0xb4,0x00,0x39,
0x00,0x00,0x00,0x00,0x00,0x47,0x00,0x6f,
0x00,0x74,0x00,0x6f,0x00,0x20,0x00,0x6c,
0x00,0x69,0x00,0x6e,0x00,0x65,0x00,0x00,
0x00,0x08,0x00,0x4d,0x00,0x53,0x00,0x20,
0x00,0x53,0x00,0x68,0x00,0x65,0x00,0x6c,
0x00,0x6c,0x00,0x20,0x00,0x44,0x00,0x6c,
0x00,0x67,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x02,0x50,0x00,0x00,0x00,0x00,0x07,
0x00,0x09,0x00,0x32,0x00,0x0a,0x00,0xb0,
0x04,0xff,0xff,0x82,0x00,0x26,0x00,0x4c,
0x00,0x69,0x00,0x6e,0x00,0x65,0x00,0x20,
0x00,0x4e,0x00,0x75,0x00,0x6d,0x00,0x62,
0x00,0x65,0x00,0x72,0x00,0x3a,0x00,0x00,
0x00,0x00,0x00,0x80,0x00,0x81,0x50,0x00,
0x00,0x00,0x00,0x37,0x00,0x07,0x00,0x39,
0x00,0x0c,0x00,0x02,0x01,0xff,0xff,0x81,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,
0x00,0x01,0x50,0x00,0x00,0x00,0x00,0x07,
0x00,0x22,0x00,0x32,0x00,0x0e,0x00,0x01,
0x00,0xff,0xff,0x80,0x00,0x4f,0x00,0x4b,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x01,0x50,0x00,0x00,0x00,0x00,0x4e,
0x00,0x22,0x00,0x32,0x00,0x0e,0x00,0x02,
0x00,0xff,0xff,0x80,0x00,0x43,0x00,0x61,
0x00,0x6e,0x00,0x63,0x00,0x65,0x00,0x6c,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
};
LRESULT CALLBACK DlgProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
int main(int argc, char* argv[])
{
HMODULE hModule = ::GetModuleHandle(NULL);
HINSTANCE hInst = hModule;
HRSRC hRsrc = ::FindResource(hInst, MAKEINTRESOURCE(IDD_DIALOG1), RT_DIALOG);
HGLOBAL hGlobal = ::LoadResource(hModule, hRsrc);
DialogBoxIndirectParam(hInst, (LPCDLGTEMPLATE)dlg_14, NULL, (DLGPROC)DlgProc, NULL);
return 0;
}
LRESULT CALLBACK DlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
switch(uMsg)
{
case WM_CLOSE:
::EndDialog(hDlg, IDOK);
return TRUE;
break;
}
return 0;
}
相关文章推荐
- 孙鑫VC学习笔记:第十讲画图 创建设置画笔的对话框 并且可以预览效果
- VC++创建个性的对话框之MFC篇
- VC++创建个性的对话框之MFC篇
- 点击客户区,创建非模态对话框,马上可以移动这个对话框
- VC++创建个性的对话框之MFC篇(转)
- 你造么? REST API 文档还可以这样创建!
- VC如何动态创建picture组件,按坐标创建在视图上,并且可以加入位图(从资源中加也可以)!
- VC创建模态对话框
- VC++ 6.0如何创建与调用动态链接库
- c# sqlite 数据库加密2010-05-29 10:55用了ADO.NET 2.0 SQLite Data Provider 这样可以直接利用它来创建一个加密的sqlite数据库。
- Creating Dialogbased Windows Application (2) / 创建基于对话框的Windows应用程序(二)Button的应用、新建子窗体 / VC++, Windows
- Creating Dialogbased Windows Application (3) / 创建基于对话框的Windows应用程序(三)Checkbox的应用、窗体置顶、设置图标 / VC++, Windows
- 创建可以定时自动关闭的对话框
- VS2005终于可以创建VC++的智能设备应用程序项目
- vc调用com组件,一般继承cwnd,可以这样获取组件中的接口,
- 创建视图,主要是字段要和表的字段一一对应,可以为没有字段建立别名,这样就能保证一一对应了
- VC 6.0 中添加简单的基于对话框的工程
- VC++ 对话框创建显示Toolbar,并加载图标!
- vc创建选择目录对话框以及遍历目录下所有文件
- Creating Dialogbased Windows Application (4) / 创建基于对话框的Windows应用程序(四)Edit Control、Combo Box的应用、Unicode转ANSI、Open File Dialog、文件读取、可变参数、文本框自动滚动 / VC++, Windows