如题,
我的registerclass函数和createwindowex函数是这样的:
ATOM MyRegisterClass(HINSTANCE hInstance)
{
WNDCLASSEX wcex; wcex.cbSize = sizeof(WNDCLASSEX); wcex.style = CS_HREDRAW | CS_VREDRAW;
wcex.lpfnWndProc = (WNDPROC)WndProc;
wcex.cbClsExtra = 0;
wcex.cbWndExtra = 0;
wcex.hInstance = hInstance;
wcex.hIcon = LoadIcon(hInstance, (LPCTSTR)IDI_MYWINDOW);
wcex.hCursor = LoadCursor(NULL, IDC_ARROW);
wcex.hbrBackground = (HBRUSH)(COLOR_WINDOW+1);
wcex.lpszMenuName = NULL;
wcex.lpszClassName = szWindowClass;
wcex.hIconSm = LoadIcon(wcex.hInstance, (LPCTSTR)IDI_SMALL); return RegisterClassEx(&wcex);
}BOOL InitInstance(HINSTANCE hInstance, int nCmdShow)
{
HWND hWnd; hInst = hInstance; // 将实例句柄存储在全局变量中 hWnd = CreateWindowEx( 0
, szWindowClass
, NULL
, WS_VISIBLE
, CW_USEDEFAULT
, 0
, CW_USEDEFAULT
, 0
, NULL
, NULL
, hInstance
, NULL
); if (!hWnd)
{
return FALSE;
} ShowWindow(hWnd, nCmdShow);
UpdateWindow(hWnd); return TRUE;
}根本没有指定过WS_EX_CLIENTEDGE,WS_EX_WINDOWEDGE,WS_BORDER,WS_THICKFRAME和WS_CAPTION这些属性,但创建出来的窗口还是有标题栏和边框,请问如何去掉?
我的registerclass函数和createwindowex函数是这样的:
ATOM MyRegisterClass(HINSTANCE hInstance)
{
WNDCLASSEX wcex; wcex.cbSize = sizeof(WNDCLASSEX); wcex.style = CS_HREDRAW | CS_VREDRAW;
wcex.lpfnWndProc = (WNDPROC)WndProc;
wcex.cbClsExtra = 0;
wcex.cbWndExtra = 0;
wcex.hInstance = hInstance;
wcex.hIcon = LoadIcon(hInstance, (LPCTSTR)IDI_MYWINDOW);
wcex.hCursor = LoadCursor(NULL, IDC_ARROW);
wcex.hbrBackground = (HBRUSH)(COLOR_WINDOW+1);
wcex.lpszMenuName = NULL;
wcex.lpszClassName = szWindowClass;
wcex.hIconSm = LoadIcon(wcex.hInstance, (LPCTSTR)IDI_SMALL); return RegisterClassEx(&wcex);
}BOOL InitInstance(HINSTANCE hInstance, int nCmdShow)
{
HWND hWnd; hInst = hInstance; // 将实例句柄存储在全局变量中 hWnd = CreateWindowEx( 0
, szWindowClass
, NULL
, WS_VISIBLE
, CW_USEDEFAULT
, 0
, CW_USEDEFAULT
, 0
, NULL
, NULL
, hInstance
, NULL
); if (!hWnd)
{
return FALSE;
} ShowWindow(hWnd, nCmdShow);
UpdateWindow(hWnd); return TRUE;
}根本没有指定过WS_EX_CLIENTEDGE,WS_EX_WINDOWEDGE,WS_BORDER,WS_THICKFRAME和WS_CAPTION这些属性,但创建出来的窗口还是有标题栏和边框,请问如何去掉?
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货