testlibgdiplusce.cpp

来自「Windows Mobile平台上使用GDI+。GDI+功能很强大」· C++ 代码 · 共 58 行

CPP
58
字号
// TestLibGDIPlusCE.cpp : main source file for ImageView.exe
//

#include "stdafx.h"

#if (_WTL_VER < 0x0750) 
	#error TestLibGDIPlusCE requires WTL version 7.5 or higher
#endif

#include <atlframe.h>
#include <atlctrls.h>
#include <atldlgs.h>

#define _ATL_USE_CSTRING_FLOAT
#include <atlmisc.h>
#include <atlscrl.h>

#include <atlwince.h>

#include "resource.h"

#include "MainFrm.h"

CAppModule _Module;
ULONG_PTR _gdiplusToken;

int WINAPI _tWinMain(HINSTANCE hInstance, HINSTANCE /*hPrevInstance*/, LPTSTR lpstrCmdLine, int nCmdShow)
{

	HRESULT hRes = CMainFrame::ActivatePreviousInstance(hInstance, lpstrCmdLine );
	
	if(FAILED(hRes) || S_FALSE == hRes)
	{
		return hRes;
	}

	hRes = ::CoInitializeEx(NULL, COINIT_MULTITHREADED);
	ATLASSERT(SUCCEEDED(hRes));

	AtlInitCommonControls(ICC_DATE_CLASSES);
	SHInitExtraControls();

	hRes = _Module.Init(NULL, hInstance);
	ATLASSERT(SUCCEEDED(hRes));

	// Initialize GDI+
	Gdiplus::GdiplusStartupInput gdiplusStartupInput;
	Gdiplus::GdiplusStartup(&_gdiplusToken, &gdiplusStartupInput, NULL);

	int nRet = CMainFrame::AppRun(lpstrCmdLine, nCmdShow);

	_Module.Term();
	Gdiplus::GdiplusShutdown(_gdiplusToken);
	::CoUninitialize();

	return nRet;
}

⌨️ 快捷键说明

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