如果我不用 visual c++ (MFC), 而用 Directx and c++ 我該如何做? thank you so much thanks,炎龙大哥
i use the function Sleep(5000) when i run my game, it become the black screen for 5 seconds, after 5 seconds, my game start. so Sleep() don't support multithread, is it correct?
我該如何做?
thank you so much
thanks,炎龙大哥
when i run my game, it become the black screen for 5 seconds,
after 5 seconds, my game start.
so Sleep() don't support multithread, is it correct?
你的sleep是用在主线程的吧?这样会使整个界面停止响应的。如果用在工作线程里,肯定不会有问题。
可惜我不会DX,不然
{
int No=1;//位图的号码
switch(msg)
{
case WM_CREATE:
SetTimer(hWnd, 1, 5000, NULL);
break;
case WM_TIMER:
KillTimer(hWnd, 1);
No++;
PrintBitmap(No);//显示第No个位图
SetTimer(hWnd, 1, 5000, NULL);
break;
}
return DefWindowProc(hWnd, msg, wParam, lParam);
}