From 740abc7706761ab0ea92a2954c0f4adddb245151 Mon Sep 17 00:00:00 2001 From: eru Date: Fri, 22 Oct 2010 15:45:34 +0000 Subject: [PATCH] =?utf8?q?Jumplist=E3=81=B8=E3=81=AE=E5=AF=BE=E5=BF=9C?= =?utf8?q?=EF=BC=88=E3=81=AE=E4=B8=8B=E6=BA=96=E5=82=99=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- PeerCast.root/PeerCast/ui/win32/simple/Simple.cpp | 21 ++++++++++++++++++--- PeerCast.root/PeerCast/ui/win32/simple/gui.cpp | 7 +++++++ .../PeerCast/ui/win32/simple/Simple.cpp | 21 ++++++++++++++++++--- .../PeerCast.root/PeerCast/ui/win32/simple/gui.cpp | 7 +++++++ 4 files changed, 50 insertions(+), 6 deletions(-) diff --git a/PeerCast.root/PeerCast/ui/win32/simple/Simple.cpp b/PeerCast.root/PeerCast/ui/win32/simple/Simple.cpp index 81c7324..b692056 100644 --- a/PeerCast.root/PeerCast/ui/win32/simple/Simple.cpp +++ b/PeerCast.root/PeerCast/ui/win32/simple/Simple.cpp @@ -82,6 +82,8 @@ ThreadInfo trafficDlgThread; HWND trafficDlg = NULL; FileStream fs; +bool jumpListEnabled = false; // jumplist flag (only for win7 or later) + // ƒvƒƒgƒ^ƒCƒvéŒ¾ void createGUI(HWND); LRESULT CALLBACK TrafficDlgProc(HWND, UINT, WPARAM, LPARAM); @@ -283,14 +285,27 @@ int WinMainDummy(HINSTANCE hInstance, WIN32_FIND_DATA fd; //JP-EX HANDLE hFind; //JP-EX - OSVERSIONINFO osInfo; //JP-EX - osInfo.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); //JP-EX - GetVersionEx(&osInfo); + OSVERSIONINFOEX osInfo; //JP-EX + osInfo.dwOSVersionInfoSize = sizeof(osInfo); //JP-EX + GetVersionEx(reinterpret_cast(&osInfo)); if (osInfo.dwPlatformId == VER_PLATFORM_WIN32_NT) winDistinctionNT = true; else winDistinctionNT = false; + // for Windows7 or later + if ((osInfo.wProductType == VER_NT_WORKSTATION + && osInfo.dwMajorVersion == 6 + && osInfo.dwMinorVersion == 1) + || + (osInfo.dwMajorVersion == 6 + && osInfo.dwMinorVersion > 1) + || + osInfo.dwMajorVersion > 6) + { + jumpListEnabled = true; + } + // off by default now showGUI = false; diff --git a/PeerCast.root/PeerCast/ui/win32/simple/gui.cpp b/PeerCast.root/PeerCast/ui/win32/simple/gui.cpp index 61e232d..eac84a7 100644 --- a/PeerCast.root/PeerCast/ui/win32/simple/gui.cpp +++ b/PeerCast.root/PeerCast/ui/win32/simple/gui.cpp @@ -56,6 +56,8 @@ bool shownChannels=false; WINDOWPLACEMENT winPlace; bool guiFlg = false; +extern bool jumpListEnabled; + using namespace Gdiplus; #include @@ -1534,6 +1536,11 @@ void WmCreateProc(HWND hwnd){ img_broad_ok = ::new Image(bstr); bstr = L"ST_BROAD_FULL.bmp"; img_broad_full = ::new Image(bstr); + + // jumplist + if (jumpListEnabled) + { + } } void WmPaintProc(HWND hwnd){ diff --git a/c:/Git/PeerCast.root/PeerCast/ui/win32/simple/Simple.cpp b/c:/Git/PeerCast.root/PeerCast/ui/win32/simple/Simple.cpp index 81c7324..b692056 100644 --- a/c:/Git/PeerCast.root/PeerCast/ui/win32/simple/Simple.cpp +++ b/c:/Git/PeerCast.root/PeerCast/ui/win32/simple/Simple.cpp @@ -82,6 +82,8 @@ ThreadInfo trafficDlgThread; HWND trafficDlg = NULL; FileStream fs; +bool jumpListEnabled = false; // jumplist flag (only for win7 or later) + // ƒvƒƒgƒ^ƒCƒvéŒ¾ void createGUI(HWND); LRESULT CALLBACK TrafficDlgProc(HWND, UINT, WPARAM, LPARAM); @@ -283,14 +285,27 @@ int WinMainDummy(HINSTANCE hInstance, WIN32_FIND_DATA fd; //JP-EX HANDLE hFind; //JP-EX - OSVERSIONINFO osInfo; //JP-EX - osInfo.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); //JP-EX - GetVersionEx(&osInfo); + OSVERSIONINFOEX osInfo; //JP-EX + osInfo.dwOSVersionInfoSize = sizeof(osInfo); //JP-EX + GetVersionEx(reinterpret_cast(&osInfo)); if (osInfo.dwPlatformId == VER_PLATFORM_WIN32_NT) winDistinctionNT = true; else winDistinctionNT = false; + // for Windows7 or later + if ((osInfo.wProductType == VER_NT_WORKSTATION + && osInfo.dwMajorVersion == 6 + && osInfo.dwMinorVersion == 1) + || + (osInfo.dwMajorVersion == 6 + && osInfo.dwMinorVersion > 1) + || + osInfo.dwMajorVersion > 6) + { + jumpListEnabled = true; + } + // off by default now showGUI = false; diff --git a/c:/Git/PeerCast.root/PeerCast/ui/win32/simple/gui.cpp b/c:/Git/PeerCast.root/PeerCast/ui/win32/simple/gui.cpp index 61e232d..eac84a7 100644 --- a/c:/Git/PeerCast.root/PeerCast/ui/win32/simple/gui.cpp +++ b/c:/Git/PeerCast.root/PeerCast/ui/win32/simple/gui.cpp @@ -56,6 +56,8 @@ bool shownChannels=false; WINDOWPLACEMENT winPlace; bool guiFlg = false; +extern bool jumpListEnabled; + using namespace Gdiplus; #include @@ -1534,6 +1536,11 @@ void WmCreateProc(HWND hwnd){ img_broad_ok = ::new Image(bstr); bstr = L"ST_BROAD_FULL.bmp"; img_broad_full = ::new Image(bstr); + + // jumplist + if (jumpListEnabled) + { + } } void WmPaintProc(HWND hwnd){ -- 2.11.0