Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我只是看不出这段代码有什么问题.. 它似乎与 MS 教程代码相同.. 有人可以帮我快速查看一下吗?
http://pastebin.com/hiFAR0gg
((HRESULT)0L)您正在从 InitWindow 函数返回 S_OK (#defined as )。检查返回值时,您正在检查它是否为 TRUE(非零)if (!InitWindow(...)):。0 将被解释为假,因此它未通过此测试。
((HRESULT)0L)
if (!InitWindow(...))
如果我将对 InitWindow 的调用更改为:
if (InitWindow(hInstance, nCmdShow) != S_OK) return FALSE;
它工作正常