stdafx.h

来自「Window Mobile Capture with DirectDraw」· C头文件 代码 · 共 53 行

H
53
字号
// stdafx.h : include file for standard system include files,
//  or project specific include files that are used frequently, but
//      are changed infrequently
//

#pragma once

// Change this value to use different versions
#define WINVER _WIN32_WCE

#define _WIN32_WCE_AYGSHELL 1

#define  _WTL_NO_CSTRING

#include <atlbase.h>
#include <atlstr.h>
#include <atlapp.h>

extern CAppModule _Module;

#include <atlwin.h>
#include <atlctrls.h>
#include <atlmisc.h>

#include <aygshell.h>
#include <atlosapice.h>
#include "Oleauto.h"
#pragma comment(lib, "aygshell.lib")

inline void DebugReport(LPWSTR szMsg, LPWSTR szFileName, int line)
{
	CString strMsg;
	strMsg.Format(L"%s\n(%s : line %d)", szMsg, szFileName, line);
	MessageBox(NULL, strMsg, L"Debug", MB_OK);
}

inline void ShowHresult(HRESULT hr)
{
	CString strMsg;
	strMsg.Format(L"hr = 0x%08x", hr);
	MessageBox(NULL, strMsg, L"Debug", MB_OK);
}

#define MYASSERT(expr) if(!(expr)) DebugReport(_CRT_WIDE(#expr),_CRT_WIDE(__FILE__),__LINE__);	

#define CKRETURN(expr, hr) MYASSERT(expr); ShowHresult(hr); return hr;

#ifdef ATLASSERT
#undef ATLASSERT
#define ATLASSERT(expr) MYASSERT(expr);
#endif

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?