mirror of
https://github.com/yuanyuanxiang/SimpleRemoter.git
synced 2026-01-21 23:13:08 +08:00
Feature: Add a startup progress display to the program
This commit is contained in:
@@ -1,9 +1,10 @@
|
||||
|
||||
|
||||
// 2015Remote.cpp : 定义应用程序的类行为。
|
||||
//
|
||||
|
||||
#include "stdafx.h"
|
||||
#include "2015Remote.h"
|
||||
#include "SplashDlg.h"
|
||||
#include "2015RemoteDlg.h"
|
||||
|
||||
#ifdef _DEBUG
|
||||
@@ -245,12 +246,19 @@ BOOL CMy2015RemoteApp::InitInstance()
|
||||
|
||||
SetUnhandledExceptionFilter(&whenbuged);
|
||||
|
||||
// 创建并显示启动画面
|
||||
CSplashDlg* pSplash = new CSplashDlg();
|
||||
pSplash->Create(NULL);
|
||||
pSplash->UpdateProgressDirect(5, _T("正在初始化系统图标..."));
|
||||
|
||||
SHFILEINFO sfi = {};
|
||||
HIMAGELIST hImageList = (HIMAGELIST)SHGetFileInfo((LPCTSTR)_T(""), 0, &sfi, sizeof(SHFILEINFO), SHGFI_LARGEICON | SHGFI_SYSICONINDEX);
|
||||
m_pImageList_Large.Attach(hImageList);
|
||||
hImageList = (HIMAGELIST)SHGetFileInfo((LPCTSTR)_T(""), 0, &sfi, sizeof(SHFILEINFO), SHGFI_SMALLICON | SHGFI_SYSICONINDEX);
|
||||
m_pImageList_Small.Attach(hImageList);
|
||||
|
||||
pSplash->UpdateProgressDirect(10, _T("正在初始化公共控件..."));
|
||||
|
||||
// 如果一个运行在 Windows XP 上的应用程序清单指定要
|
||||
// 使用 ComCtl32.dll 版本 6 或更高版本来启用可视化方式,
|
||||
//则需要 InitCommonControlsEx()。否则,将无法创建窗口。
|
||||
|
||||
Reference in New Issue
Block a user