Files
daviyang35 467cab8148 Duilib官方迁移到Gitbub,没有任何新增功能与修改,仅为方便需要迁出代码的人
Duilib暂不会有新特性增加,但已经准备一段时间修改代码目录管理结构,重构Demo
闲置半年多未更新一方面忙于生计,也源于提高内功
感谢Duilib原作者同意迁移SVN官方地址,便于社区维护
最后特别感谢【Duilib官方交流群3】活跃开发者们的帮助指导,为Duilib的重构提供了很多帮助,也为我个人成长提供指导
2014-07-28 21:58:31 +08:00

51 lines
1.7 KiB
C++

//
// main.cpp
// ~~~~~~~~
//
// Copyright (c) 2011 achellies (achellies at 163 dot com)
//
// This code may be used in compiled form in any way you desire. This
// source file may be redistributed by any means PROVIDING it is
// not sold for profit without the authors written consent, and
// providing that this notice and the authors name is included.
//
// This file is provided "as is" with no expressed or implied warranty.
// The author accepts no liability if it causes any damage to you or your
// computer whatsoever. It's free, so don't hassle me about it.
//
// Beware of bugs.
//
#include "stdafx.h"
#include "..\DuiLib\Utils\WinImplBase.h"
#include "main_frame.hpp"
#if defined(WIN32) && !defined(UNDER_CE)
int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE /*hPrevInstance*/, LPSTR /*lpCmdLine*/, int nCmdShow)
#else
int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE /*hPrevInstance*/, LPTSTR lpCmdLine, int nCmdShow)
#endif
{
CPaintManagerUI::SetInstance(hInstance);
#if defined(WIN32) && !defined(UNDER_CE)
HRESULT Hr = ::CoInitialize(NULL);
#else
HRESULT Hr = ::CoInitializeEx(NULL, COINIT_MULTITHREADED);
#endif
if( FAILED(Hr) ) return 0;
MainFrame* pFrame = new MainFrame();
if( pFrame == NULL ) return 0;
#if defined(WIN32) && !defined(UNDER_CE)
pFrame->Create(NULL, _T("MenuTest"), UI_WNDSTYLE_FRAME, WS_EX_STATICEDGE | WS_EX_APPWINDOW, 0, 0, 600, 800);
#else
pFrame->Create(NULL, _T("MenuTest"), UI_WNDSTYLE_FRAME, WS_EX_TOPMOST, 0, 0, GetSystemMetrics(SM_CXSCREEN), GetSystemMetrics(SM_CYSCREEN));
#endif
pFrame->CenterWindow();
::ShowWindow(*pFrame, SW_SHOW);
CPaintManagerUI::MessageLoop();
return 0;
}