ViewVC Help
View File | Revision Log | View Changeset | Root Listing
root/Oni2/AE/Installer/trunk/source/main_window.cpp
(Generate patch)

Comparing AE/Installer/trunk/source/main_window.cpp (file contents):
Revision 392 by gumby, Mon Jul 6 14:44:10 2009 UTC vs.
Revision 396 by gumby, Mon Jul 6 19:18:00 2009 UTC

# Line 1 | Line 1
1 + #ifndef NTDDI_VERSION          
2 + #define NTDDI_VERSION NTDDI_WIN7
3 + #endif
4 + #ifdef WIN32
5 + #include <windows.h>
6 + #include <shobjidl.h>
7 + HWND Handle;
8 +
9 + ITaskbarList *pTaskbarList;
10 + ITaskbarList3 *pTaskbarList3;
11 + #endif
12 +
13   /*
14   AE/Mod Installer
15   by Gumby and Iritscen
# Line 306 | Line 318 | int globalizeData(void)
318                          logfile << (strOniSplit + " " + strImportOption + " ../GameDataFolder/level" + levels[i] + "_Final packages/VanillaDats/level" + levels[i] + "_Final/level"
319                                  + levels[i] + "_Final/level" + levels[i] + "_Final.oni >> Globalize.log").c_str() << '\n';
320                          string sys_str = (strOniSplit + " " + strImportOption + " ../GameDataFolder/level" + levels[i] + "_Final packages/VanillaDats/level" + levels[i] + "_Final/level"
321 <                                + levels[i] + "_Final/level" + levels[i] + "_Final.oni >> Globalize2.log");
321 >                                + levels[i] + "_Final/level" + levels[i] + "_Final.oni >> Globalize.log");
322                                  system(sys_str.c_str() );
323                          setProgressBar( (int)(1000 * (float)(parts_done) / (float)(total_steps) ));
324                          parts_done++;
# Line 1131 | Line 1143 | void MainWindow::CreateControls()
1143      Mods_CheckboxList->Connect(Mods_CheckboxList1, wxEVT_CREATE, wxWindowCreateEventHandler(MainWindow::ModList_OnCreate), NULL, this);
1144          ////@end MainWindow content construction
1145  
1146 +        Handle = (HWND)GetHWND();
1147 +        ::CoCreateInstance(CLSID_TaskbarList, NULL, CLSCTX_INPROC_SERVER, IID_ITaskbarList, (void **)&pTaskbarList);
1148 +
1149 +
1150          if ( exists( "../../GameDataFolder/level0_Final.sep" ) ) {
1151                  strImportOption = "-import:sep";
1152                  splitInstances = NOT_SPLIT;
# Line 1399 | Line 1415 | void MainWindow::OnInstallButtonClick( w
1415  
1416   void setProgressBar( int i ) {
1417          //TheProgressBar->SetValue(
1418 + #ifdef WIN32
1419 +        
1420  
1421 +
1422 + if (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
1434          TheProgressBar->SetValue(i);
1435  
1436   }

Diff Legend

Removed lines
+ Added lines
< Changed lines (old)
> Changed lines (new)