Author: gedmurphy
Date: Sun Nov 12 23:13:39 2006
New Revision: 24728
URL:
http://svn.reactos.org/svn/reactos?rev=24728&view=rev
Log:
- fix a bug freeing memory for floating windows.
- ShowHideWindow needs no more than a Window handle
Modified:
trunk/reactos/base/applications/imagesoft/floatwindow.c
trunk/reactos/base/applications/imagesoft/mainwnd.c
trunk/reactos/base/applications/imagesoft/precomp.h
Modified: trunk/reactos/base/applications/imagesoft/floatwindow.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/imagesof…
==============================================================================
--- trunk/reactos/base/applications/imagesoft/floatwindow.c (original)
+++ trunk/reactos/base/applications/imagesoft/floatwindow.c Sun Nov 12 23:13:39 2006
@@ -40,12 +40,12 @@
BOOL
-ShowHideWindow(PFLT_WND FltInfo)
-{
- if (IsWindowVisible(FltInfo->hSelf))
- return ShowWindow(FltInfo->hSelf, SW_HIDE);
+ShowHideWindow(HWND hwnd)
+{
+ if (IsWindowVisible(hwnd))
+ return ShowWindow(hwnd, SW_HIDE);
else
- return ShowWindow(FltInfo->hSelf, SW_SHOW);
+ return ShowWindow(hwnd, SW_SHOW);
}
@@ -447,13 +447,13 @@
break;
case WM_CLOSE:
- ShowHideWindow(FltInfo);
+ ShowHideWindow(FltInfo->hSelf);
break;
case WM_COMMAND:
{
if (LOWORD(wParam) == IDCANCEL)
- ShowHideWindow(FltInfo);
+ ShowHideWindow(FltInfo->hSelf);
switch(LOWORD(wParam))
{
Modified: trunk/reactos/base/applications/imagesoft/mainwnd.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/imagesof…
==============================================================================
--- trunk/reactos/base/applications/imagesoft/mainwnd.c (original)
+++ trunk/reactos/base/applications/imagesoft/mainwnd.c Sun Nov 12 23:13:39 2006
@@ -378,10 +378,10 @@
{
SIZE Size;
BOOL Vert;
- DWORD dwStyle = SendMessage(rbi->hwndChild,
- TB_GETSTYLE,
- 0,
- 0);
+ DWORD dwStyle = (DWORD)SendMessage(rbi->hwndChild,
+ TB_GETSTYLE,
+ 0,
+ 0);
switch (DockTo)
{
case LEFT_DOCK:
@@ -613,7 +613,7 @@
ID_TOOLS,
MF_CHECKED);
- ShowHideWindow(Info->fltTools);
+ ShowHideWindow(Info->fltTools->hSelf);
}
}
@@ -642,10 +642,10 @@
HeapFree(ProcessHeap, 0, Info->fltTools);
if (Info->fltColors != NULL)
- HeapFree(ProcessHeap, 0, Info->fltTools);
+ HeapFree(ProcessHeap, 0, Info->fltColors);
if (Info->fltHistory != NULL)
- HeapFree(ProcessHeap, 0, Info->fltTools);
+ HeapFree(ProcessHeap, 0, Info->fltHistory);
}
@@ -893,7 +893,7 @@
{
UINT uCheck = MF_CHECKED;
- if (ShowHideWindow(Info->fltTools))
+ if (ShowHideWindow(Info->fltTools->hSelf))
uCheck = MF_UNCHECKED;
CheckMenuItem(hMenu,
@@ -911,7 +911,7 @@
{
UINT uCheck = MF_CHECKED;
- if (ShowHideWindow(Info->fltColors))
+ if (ShowHideWindow(Info->fltColors->hSelf))
uCheck = MF_UNCHECKED;
CheckMenuItem(hMenu,
@@ -929,7 +929,7 @@
{
UINT uCheck = MF_CHECKED;
- if (ShowHideWindow(Info->fltHistory))
+ if (ShowHideWindow(Info->fltHistory->hSelf))
uCheck = MF_UNCHECKED;
CheckMenuItem(hMenu,
Modified: trunk/reactos/base/applications/imagesoft/precomp.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/imagesof…
==============================================================================
--- trunk/reactos/base/applications/imagesoft/precomp.h (original)
+++ trunk/reactos/base/applications/imagesoft/precomp.h Sun Nov 12 23:13:39 2006
@@ -388,7 +388,7 @@
BOOL FloatToolbarCreateHistoryGui(PMAIN_WND_INFO Info);
BOOL InitFloatWndClass(VOID);
VOID UninitFloatWndImpl(VOID);
-BOOL ShowHideWindow(PFLT_WND FltInfo);
+BOOL ShowHideWindow(HWND hwnd);
/* font.c */
VOID FillFontStyleComboList(HWND hwndCombo);