一个关于函数 DialogBox 的奇怪问题

ywhbn 2005-11-17 09:09:10
我新建一个Win32 Application 工程,
在WinMain的开始就调用 DialogBox 显示自己定义的一个Dialog,

在自己电脑上运行正常,
在别人电脑上 DialogBox函数 总是运行失败,说是找不到窗口类别(Cannot find window class).
...全文
87 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
ywhbn 2005-11-17
  • 打赏
  • 举报
回复
实在想不通, 没有人碰到过类似的问题吗
ywhbn 2005-11-17
  • 打赏
  • 举报
回复
TO: thisisll(速度八十迈)

我的操作系统是 Windows XP, 是用 VC++ 6.0编译的
我在Windows 2000 SP4, 和 Windows XP SP2 试过,都不行
thisisll 2005-11-17
  • 打赏
  • 举报
回复
int DialogBox(
HINSTANCE hInstance,
LPCTSTR lpTemplate,
HWND hWndParent,
DLGPROC lpDialogFunc);

Requirements

Runs on Versions Defined in
Windows CE OS 1.0 and later Winuser.h

你看看他的机子哪里不合适?
ywhbn 2005-11-17
  • 打赏
  • 举报
回复
问题已解决,原来是因为Dialog里面包含了 HotKey控件,程序里却没有调用InitCommonControlsEx 进行注册.

15,979

社区成员

发帖
与我相关
我的任务
社区描述
VC/MFC 界面
社区管理员
  • 界面
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧