[ros-diffs] [gedmurphy] 23426: merge r23425 from trunk. It'll remove confusion if a user stumbles across this app when playing around.

gedmurphy at svn.reactos.org gedmurphy at svn.reactos.org
Wed Aug 2 23:58:07 CEST 2006


Author: gedmurphy
Date: Thu Aug  3 01:58:06 2006
New Revision: 23426

URL: http://svn.reactos.org/svn/reactos?rev=23426&view=rev
Log:
merge r23425 from trunk.
It'll remove confusion if a user stumbles across this app when playing around.

Modified:
    branches/ros-branch-0_3_0/reactos/base/applications/imagesoft/En.rc
    branches/ros-branch-0_3_0/reactos/base/applications/imagesoft/floatwindow.c
    branches/ros-branch-0_3_0/reactos/base/applications/imagesoft/mainwnd.c
    branches/ros-branch-0_3_0/reactos/base/applications/imagesoft/precomp.h

Modified: branches/ros-branch-0_3_0/reactos/base/applications/imagesoft/En.rc
URL: http://svn.reactos.org/svn/reactos/branches/ros-branch-0_3_0/reactos/base/applications/imagesoft/En.rc?rev=23426&r1=23425&r2=23426&view=diff
==============================================================================
--- branches/ros-branch-0_3_0/reactos/base/applications/imagesoft/En.rc (original)
+++ branches/ros-branch-0_3_0/reactos/base/applications/imagesoft/En.rc Thu Aug  3 01:58:06 2006
@@ -32,9 +32,9 @@
   END
   POPUP "&View"
   BEGIN
-    MENUITEM "&Tools",           ID_TOOLS, CHECKED
-    MENUITEM "&Colors",          ID_COLOR, CHECKED
-    MENUITEM "&History",         ID_HISTORY, CHECKED
+    MENUITEM "&Tools",           ID_TOOLS
+    MENUITEM "&Colors",          ID_COLOR
+    MENUITEM "&History",         ID_HISTORY
     MENUITEM "&Status Bar",      ID_STATUSBAR, CHECKED
   END
   POPUP "&Image"

Modified: branches/ros-branch-0_3_0/reactos/base/applications/imagesoft/floatwindow.c
URL: http://svn.reactos.org/svn/reactos/branches/ros-branch-0_3_0/reactos/base/applications/imagesoft/floatwindow.c?rev=23426&r1=23425&r2=23426&view=diff
==============================================================================
--- branches/ros-branch-0_3_0/reactos/base/applications/imagesoft/floatwindow.c (original)
+++ branches/ros-branch-0_3_0/reactos/base/applications/imagesoft/floatwindow.c Thu Aug  3 01:58:06 2006
@@ -49,7 +49,7 @@
 }
 
 
-VOID
+BOOL
 FloatToolbarCreateToolsGui(PMAIN_WND_INFO Info)
 {
     HWND hTb;
@@ -67,39 +67,45 @@
                          NULL,
                          hInstance,
                          NULL);
-
-    SendMessage(hTb,
-                TB_SETEXTENDEDSTYLE,
-                0,
-                TBSTYLE_EX_HIDECLIPPEDBUTTONS);
-
-    SendMessage(hTb,
-                TB_BUTTONSTRUCTSIZE,
-                sizeof(ToolsButtons[0]),
-                0);
-
-    SendMessage(hTb,
-                TB_SETBITMAPSIZE,
-                0,
-                (LPARAM)MAKELONG(16, 16));
-
-    hImageList = InitImageList(NumButtons,
-                               IDB_TOOLSRECTSEL);
-
-    ImageList_Destroy((HIMAGELIST)SendMessage(hTb,
-                                              TB_SETIMAGELIST,
-                                              0,
-                                              (LPARAM)hImageList));
-
-    SendMessage(hTb,
-                TB_ADDBUTTONS,
-                NumButtons,
-                (LPARAM)ToolsButtons);
-
-    SendMessage(hTb,
-                TB_AUTOSIZE,
-                0,
-                0);
+    if (hTb != NULL)
+    {
+        SendMessage(hTb,
+                    TB_SETEXTENDEDSTYLE,
+                    0,
+                    TBSTYLE_EX_HIDECLIPPEDBUTTONS);
+
+        SendMessage(hTb,
+                    TB_BUTTONSTRUCTSIZE,
+                    sizeof(ToolsButtons[0]),
+                    0);
+
+        SendMessage(hTb,
+                    TB_SETBITMAPSIZE,
+                    0,
+                    (LPARAM)MAKELONG(16, 16));
+
+        hImageList = InitImageList(NumButtons,
+                                   IDB_TOOLSRECTSEL);
+
+        ImageList_Destroy((HIMAGELIST)SendMessage(hTb,
+                                                  TB_SETIMAGELIST,
+                                                  0,
+                                                  (LPARAM)hImageList));
+
+        SendMessage(hTb,
+                    TB_ADDBUTTONS,
+                    NumButtons,
+                    (LPARAM)ToolsButtons);
+
+        SendMessage(hTb,
+                    TB_AUTOSIZE,
+                    0,
+                    0);
+
+        return TRUE;
+    }
+
+    return FALSE;
 }
 
 
@@ -158,7 +164,7 @@
 }
 
 
-VOID
+BOOL
 FloatToolbarCreateColorsGui(PMAIN_WND_INFO Info)
 {
     HWND hColorPicker;
@@ -183,6 +189,8 @@
                                   NULL,
                                   hInstance,
                                   NULL);
+    if (hColorPicker == NULL)
+        return FALSE;
 
     hHueSlider = CreateWindowEx(0,
                                 WC_STATIC,
@@ -196,6 +204,8 @@
                                 NULL,
                                 hInstance,
                                 NULL);
+    if (hHueSlider == NULL)
+        return FALSE;
 
     hMouseButton = CreateWindowEx(0,
                                   WC_COMBOBOX,
@@ -206,16 +216,16 @@
                                   NULL,
                                   hInstance,
                                   NULL);
+    if (hMouseButton == NULL)
+        return FALSE;
+
     //MakeFlatCombo(hMouseButton);
 
     /* temp, just testing */
-    if (hMouseButton != NULL)
-    {
-        SendMessage(hMouseButton, CB_ADDSTRING, 0, (LPARAM)_T("Primary"));
-        SendMessage(hMouseButton, CB_ADDSTRING, 0, (LPARAM)_T("Secondary"));
-        SendMessage(hMouseButton, CB_SETCURSEL, 0, 0);
-
-    }
+    SendMessage(hMouseButton, CB_ADDSTRING, 0, (LPARAM)_T("Primary"));
+    SendMessage(hMouseButton, CB_ADDSTRING, 0, (LPARAM)_T("Secondary"));
+    SendMessage(hMouseButton, CB_SETCURSEL, 0, 0);
+
 
     hMore = CreateWindowEx(WS_EX_STATICEDGE,
                            WC_BUTTON,
@@ -228,6 +238,8 @@
                            NULL,
                            hInstance,
                            NULL);
+    if (hMore == NULL)
+        return FALSE;
 
     hMoreBitmap = (HBITMAP)LoadImage(hInstance,
                                      MAKEINTRESOURCE(IDB_COLORSMORE),
@@ -255,10 +267,12 @@
         ReleaseDC(hColorPicker, hDc);
     }
 
-}
-
-
-VOID
+    return TRUE;
+
+}
+
+
+BOOL
 FloatToolbarCreateHistoryGui(PMAIN_WND_INFO Info)
 {
     HWND hList;
@@ -275,6 +289,8 @@
                            NULL,
                            hInstance,
                            NULL);
+    if (hList == NULL)
+        return FALSE;
 
     NumButtons = sizeof(HistoryButtons) / sizeof(HistoryButtons[0]);
     hButtons = CreateWindowEx(0,
@@ -286,34 +302,40 @@
                               NULL,
                               hInstance,
                               NULL);
-
-    SendMessage(hButtons,
-                TB_BUTTONSTRUCTSIZE,
-                sizeof(ToolsButtons[0]),
-                0);
-
-    SendMessage(hButtons,
-                TB_SETBITMAPSIZE,
-                0,
-                (LPARAM)MAKELONG(10, 10));
-
-    hImageList = InitImageList(NumButtons,
-                               IDB_HISTBACK);
-
-    ImageList_Destroy((HIMAGELIST)SendMessage(hButtons,
-                                              TB_SETIMAGELIST,
-                                              0,
-                                              (LPARAM)hImageList));
-
-    SendMessage(hButtons,
-                TB_SETBUTTONSIZE,
-                0,
-                MAKELONG(18, 16));
-
-    SendMessage(hButtons,
-                TB_ADDBUTTONS,
-                NumButtons,
-                (LPARAM)HistoryButtons);
+    if (hButtons != NULL)
+    {
+        SendMessage(hButtons,
+                    TB_BUTTONSTRUCTSIZE,
+                    sizeof(ToolsButtons[0]),
+                    0);
+
+        SendMessage(hButtons,
+                    TB_SETBITMAPSIZE,
+                    0,
+                    (LPARAM)MAKELONG(10, 10));
+
+        hImageList = InitImageList(NumButtons,
+                                   IDB_HISTBACK);
+
+        ImageList_Destroy((HIMAGELIST)SendMessage(hButtons,
+                                                  TB_SETIMAGELIST,
+                                                  0,
+                                                  (LPARAM)hImageList));
+
+        SendMessage(hButtons,
+                    TB_SETBUTTONSIZE,
+                    0,
+                    MAKELONG(18, 16));
+
+        SendMessage(hButtons,
+                    TB_ADDBUTTONS,
+                    NumButtons,
+                    (LPARAM)HistoryButtons);
+
+        return TRUE;
+    }
+
+    return FALSE;
 }
 
 LRESULT CALLBACK

Modified: branches/ros-branch-0_3_0/reactos/base/applications/imagesoft/mainwnd.c
URL: http://svn.reactos.org/svn/reactos/branches/ros-branch-0_3_0/reactos/base/applications/imagesoft/mainwnd.c?rev=23426&r1=23425&r2=23426&view=diff
==============================================================================
--- branches/ros-branch-0_3_0/reactos/base/applications/imagesoft/mainwnd.c (original)
+++ branches/ros-branch-0_3_0/reactos/base/applications/imagesoft/mainwnd.c Thu Aug  3 01:58:06 2006
@@ -528,6 +528,7 @@
 MainWndCreateFloatWindows(PMAIN_WND_INFO Info)
 {
     RECT rect;
+    HMENU hMenu;
     UINT Res;
     PFLT_WND WndArr[NUM_FLT_WND]; /* temp array for looping */
     INT i;
@@ -595,19 +596,45 @@
 
     }
 
+    hMenu = GetMenu(Info->hSelf);
+
     if (Info->fltTools->hSelf != NULL)
     {
-        FloatToolbarCreateToolsGui(Info);
+        if (FloatToolbarCreateToolsGui(Info))
+        {
+            //CheckMenuItem(hMenu,
+            //              ID_TOOLS,
+            //              MF_CHECKED);
+
+            /* temp disable windows until they are useful */
+            ShowHideWindow(Info->fltTools);
+        }
     }
 
     if (Info->fltColors->hSelf != NULL)
     {
-        FloatToolbarCreateColorsGui(Info);
+        if (FloatToolbarCreateColorsGui(Info))
+        {
+            //CheckMenuItem(hMenu,
+            //              ID_COLOR,
+            //              MF_CHECKED);
+
+            /* temp disable windows until they are useful */
+            ShowHideWindow(Info->fltColors);
+        }
     }
 
     if (Info->fltHistory->hSelf != NULL)
     {
-        FloatToolbarCreateHistoryGui(Info);
+        if (FloatToolbarCreateHistoryGui(Info))
+        {
+            //CheckMenuItem(hMenu,
+            //              ID_HISTORY,
+            //              MF_CHECKED);
+
+            /* temp disable windows until they are useful */
+            ShowHideWindow(Info->fltHistory);
+        }
     }
 
 }

Modified: branches/ros-branch-0_3_0/reactos/base/applications/imagesoft/precomp.h
URL: http://svn.reactos.org/svn/reactos/branches/ros-branch-0_3_0/reactos/base/applications/imagesoft/precomp.h?rev=23426&r1=23425&r2=23426&view=diff
==============================================================================
--- branches/ros-branch-0_3_0/reactos/base/applications/imagesoft/precomp.h (original)
+++ branches/ros-branch-0_3_0/reactos/base/applications/imagesoft/precomp.h Thu Aug  3 01:58:06 2006
@@ -384,9 +384,9 @@
     BOOL bOpaque;
 } FLT_WND, *PFLT_WND;
 
-VOID FloatToolbarCreateToolsGui(PMAIN_WND_INFO Info);
-VOID FloatToolbarCreateColorsGui(PMAIN_WND_INFO Info);
-VOID FloatToolbarCreateHistoryGui(PMAIN_WND_INFO Info);
+BOOL FloatToolbarCreateToolsGui(PMAIN_WND_INFO Info);
+BOOL FloatToolbarCreateColorsGui(PMAIN_WND_INFO Info);
+BOOL FloatToolbarCreateHistoryGui(PMAIN_WND_INFO Info);
 BOOL InitFloatWndClass(VOID);
 VOID UninitFloatWndImpl(VOID);
 BOOL ShowHideWindow(PFLT_WND FltInfo);




More information about the Ros-diffs mailing list