gpt4 book ai didi

Windows mobile 6 窗口注册失败

转载 作者:可可西里 更新时间:2023-11-01 10:37:42 26 4
gpt4 key购买 nike

当我尝试部署代码(win32 智能手机项目)时,注册失败错误弹出,应用程序退出。但是,如果我将 wc.lpszMenuName 的右侧更改为 NULL,则在没有菜单的情况下一切正常。 win mobile 6不支持这个功能吗?

int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
LPTSTR lpCmdLine, int nCmdShow)
{

WNDCLASS wc;
HWND hwnd;
MSG Msg;



wc.style = 0;
wc.lpfnWndProc = WndProc;
wc.cbClsExtra = 0;
wc.cbWndExtra = 0;
wc.hInstance = hInstance;
wc.hIcon = NULL;
wc.hCursor = LoadCursor(NULL, IDC_ARROW);
wc.hbrBackground = (HBRUSH)(COLOR_WINDOW+1);
wc.lpszMenuName = MAKEINTRESOURCE(IDR_MENU1);
wc.lpszClassName = g_szClassName;


if(!RegisterClass(&wc))
{
MessageBox(NULL, L"Window Registration Failed!", L"Error!",
MB_ICONEXCLAMATION | MB_OK);
return 0;
}
// ...
}

最佳答案

你看过the WNDCLASS documentation for WinMo了吗? ?在备注部分下,它特别指出:

lpszMenuName is not supported and must be NULL.

我相信您真正需要的是 a MenuBar control .

关于Windows mobile 6 窗口注册失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16036154/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com