diff options
author | Kirill Volinsky <mataes2007@gmail.com> | 2013-09-21 21:58:47 +0000 |
---|---|---|
committer | Kirill Volinsky <mataes2007@gmail.com> | 2013-09-21 21:58:47 +0000 |
commit | 7c0fdf0c457d55b6bfdda0282cf5099057c715c7 (patch) | |
tree | 31389d750c1fb6a6e7ecdd9279d32c238a50ff62 /plugins/AutoShutdown/src/frame.cpp | |
parent | 4d970faf406c59e807a9ffd4d7a51f1aaad6636a (diff) |
Not needed version checks removed
git-svn-id: http://svn.miranda-ng.org/main/trunk@6172 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/AutoShutdown/src/frame.cpp')
-rw-r--r-- | plugins/AutoShutdown/src/frame.cpp | 60 |
1 files changed, 29 insertions, 31 deletions
diff --git a/plugins/AutoShutdown/src/frame.cpp b/plugins/AutoShutdown/src/frame.cpp index 3e8262d7fa..04b0a10422 100644 --- a/plugins/AutoShutdown/src/frame.cpp +++ b/plugins/AutoShutdown/src/frame.cpp @@ -180,38 +180,36 @@ static LRESULT CALLBACK FrameWndProc(HWND hwndFrame,UINT msg,WPARAM wParam,LPARA NULL);
if(dat->hwndTime==NULL) return -1; /* creation failed, calls WM_DESTROY */
/* create tooltips */
- if(IsWinVer98Plus() || IsWinVer2000Plus()) {
- TTTOOLINFO ti;
- dat->hwndToolTip=CreateWindowEx(WS_EX_TOPMOST,
- TOOLTIPS_CLASS,
- NULL,
- WS_POPUP|TTS_ALWAYSTIP|TTS_NOPREFIX,
- CW_USEDEFAULT, CW_USEDEFAULT,
- CW_USEDEFAULT, CW_USEDEFAULT,
- hwndFrame,
- NULL,
- params->hInstance,
- NULL);
- if(dat->hwndToolTip!=NULL) {
- SetWindowPos(dat->hwndToolTip,HWND_TOPMOST,0,0,0,0,SWP_NOMOVE|SWP_NOSIZE|SWP_NOACTIVATE);
- ZeroMemory(&ti,sizeof(ti));
- ti.cbSize=sizeof(ti);
- ti.hwnd=hwndFrame;
- ti.uFlags=TTF_IDISHWND|TTF_SUBCLASS|TTF_TRANSPARENT;
- ti.lpszText=LPSTR_TEXTCALLBACK; /* commctl 4.70+ */
- ti.uId=(UINT)dat->hwndTime; /* in-place tooltip */
+ TTTOOLINFO ti;
+ dat->hwndToolTip=CreateWindowEx(WS_EX_TOPMOST,
+ TOOLTIPS_CLASS,
+ NULL,
+ WS_POPUP|TTS_ALWAYSTIP|TTS_NOPREFIX,
+ CW_USEDEFAULT, CW_USEDEFAULT,
+ CW_USEDEFAULT, CW_USEDEFAULT,
+ hwndFrame,
+ NULL,
+ params->hInstance,
+ NULL);
+ if(dat->hwndToolTip!=NULL) {
+ SetWindowPos(dat->hwndToolTip,HWND_TOPMOST,0,0,0,0,SWP_NOMOVE|SWP_NOSIZE|SWP_NOACTIVATE);
+ ZeroMemory(&ti,sizeof(ti));
+ ti.cbSize=sizeof(ti);
+ ti.hwnd=hwndFrame;
+ ti.uFlags=TTF_IDISHWND|TTF_SUBCLASS|TTF_TRANSPARENT;
+ ti.lpszText=LPSTR_TEXTCALLBACK; /* commctl 4.70+ */
+ ti.uId=(UINT)dat->hwndTime; /* in-place tooltip */
+ SendMessage(dat->hwndToolTip,TTM_ADDTOOL,0,(LPARAM)&ti);
+ ti.uFlags&=~TTF_TRANSPARENT;
+ ti.uId=(UINT)dat->hwndProgress;
+ SendMessage(dat->hwndToolTip,TTM_ADDTOOL,0,(LPARAM)&ti);
+ if(dat->hwndDesc!=NULL) {
+ ti.uId=(UINT)dat->hwndDesc;
SendMessage(dat->hwndToolTip,TTM_ADDTOOL,0,(LPARAM)&ti);
- ti.uFlags&=~TTF_TRANSPARENT;
- ti.uId=(UINT)dat->hwndProgress;
+ }
+ if(dat->hwndIcon!=NULL) {
+ ti.uId=(UINT)dat->hwndIcon;
SendMessage(dat->hwndToolTip,TTM_ADDTOOL,0,(LPARAM)&ti);
- if(dat->hwndDesc!=NULL) {
- ti.uId=(UINT)dat->hwndDesc;
- SendMessage(dat->hwndToolTip,TTM_ADDTOOL,0,(LPARAM)&ti);
- }
- if(dat->hwndIcon!=NULL) {
- ti.uId=(UINT)dat->hwndIcon;
- SendMessage(dat->hwndToolTip,TTM_ADDTOOL,0,(LPARAM)&ti);
- }
}
}
/* init layout */
@@ -471,7 +469,7 @@ static LRESULT CALLBACK FrameWndProc(HWND hwndFrame,UINT msg,WPARAM wParam,LPARA if(((NMHDR*)lParam)->hwndFrom==dat->hwndToolTip)
switch(((NMHDR*)lParam)->code) {
case TTN_SHOW: /* 'in-place' tooltip on dat->hwndTime */
- if(dat->flags&FWPDF_TIMEISCLIPPED && (HWND)wParam==dat->hwndTime && IsWinVer2000Plus()) {
+ if(dat->flags&FWPDF_TIMEISCLIPPED && (HWND)wParam==dat->hwndTime) {
RECT rc;
if(GetWindowRect(dat->hwndTime,&rc)) {
SetWindowLongPtr(dat->hwndToolTip, GWL_STYLE, GetWindowLongPtr(dat->hwndToolTip, GWL_STYLE) | TTS_NOANIMATE);
|