文章分类 - windows编程
摘要:1 void DXUTDisplaySwitchingToREFWarning() 2 { 3 if( DXUTGetShowMsgBoxOnError() ) 4 { 5 // Open the appropriate registry key 6 DWORD dwSkipWarning = 0; 7 HKEY hKey; 8 LONG lResult = RegOpenKeyEx( HKEY_CURRENT_USER, L"Software\\Microsoft\\DirectX 9.0 SDK", 0, K...
阅读全文
摘要:1 /****************************************************************************** 2 Module: Singleton.cpp 3 Notices: Copyright (c) 2008 Jeffrey Richter & Christophe Nasarre 4 ******************************************************************************/ 5 6 7 #include "resource.h" 8 9
阅读全文
摘要:在Win32中使用GetMessage和PeekMessage都可以获取对应该程序产生的消息。 他们有什么区别呢? GetMessage的一般用法是GetMessage(&msg,NULL,0,0); 这样可以接受所有的消息,GetMessage在没有产生消息的时候并不返回, 而是一直在等待,直到一个消息返回; 当消息不是WM_QUIT时,返回一个非零值,也就是说,当是WM_QUIT时会返回一个零。 如果你在使用中如下使用: While(true) { if(GetMessage(&msg,NULL,0,0)) break; TranslateMessage(&msg)
阅读全文

浙公网安备 33010602011771号