我试图找出为什么我的应用程序有一个小的、几个像素的边框。
我的理解是WS_POPUP
应该解决这个问题;
DWORD wndExStyle = WS_EX_OVERLAPPEDWINDOW;
DWORD wndStyle = WS_POPUP | WS_SYSMENU;
g_hWnd = CreateWindowEx(wndExStyle, wcl.lpszClassName, L"junk",
wndStyle, 0, 0, 0, 0, 0, 0, wcl.hInstance, 0);
//Somewhere later
pfd.dwFlags = PFD_DRAW_TO_WINDOW | PFD_SUPPORT_OPENGL | PFD_DOUBLEBUFFER;
wglCreateContextAttribsARB(g_hDC, 0, attribList);
//Finally
ShowWindow(g_hWnd, SW_MAXIMIZE);
UpdateWindow(g_hWnd);
编辑 1:删除 WS_BORDER