Changeset 394 for AE/Installer


Ignore:
Timestamp:
Jul 6, 2009, 7:53:15 PM (10 years ago)
Author:
gumby
Message:

(Red)Added Win7 Taskbar Progress

File:
1 edited

Legend:

Unmodified
Added
Removed
  • AE/Installer/trunk/source/main_window.cpp

    r393 r394  
     1#ifndef NTDDI_VERSION           
     2#define NTDDI_VERSION NTDDI_WIN7
     3#endif
     4#ifdef WIN32
     5 #include <windows.h>
     6#include <shobjidl.h>
     7HWND Handle;
     8
     9ITaskbarList *pTaskbarList;
     10ITaskbarList3 *pTaskbarList3;
     11#endif
     12
    113/*
    214 AE/Mod Installer
     
    11321144        ////@end MainWindow content construction
    11331145
     1146        Handle = (HWND)GetHWND();
     1147        ::CoCreateInstance(CLSID_TaskbarList, NULL, CLSCTX_INPROC_SERVER, IID_ITaskbarList, (void **)&pTaskbarList);
     1148
     1149
    11341150        if ( exists( "../../GameDataFolder/level0_Final.sep" ) ) {
    11351151                strImportOption = "-import:sep";
     
    14001416void setProgressBar( int i ) {
    14011417        //TheProgressBar->SetValue(
    1402 
     1418#ifdef WIN32
     1419       
     1420
     1421
     1422if (SUCCEEDED(pTaskbarList->QueryInterface(IID_ITaskbarList3, (void **)&pTaskbarList3)))
     1423{
     1424       
     1425        pTaskbarList3->SetProgressValue(Handle,i, 1000);
     1426        if ( i == 0 ) {
     1427
     1428        pTaskbarList3->SetProgressState(Handle,TBPF_NOPROGRESS);
     1429        }
     1430}
     1431
     1432
     1433#endif
    14031434        TheProgressBar->SetValue(i);
    14041435
Note: See TracChangeset for help on using the changeset viewer.