Author: gedmurphy
Date: Sat Apr 8 03:21:12 2006
New Revision: 21515
URL:
http://svn.reactos.ru/svn/reactos?rev=21515&view=rev
Log:
- allow container windows on the docking toolbars
- hide comboboxes if toolbar is vertical
- patch from Thomas
Removed:
trunk/reactos/base/applications/imagesoft/buttons.h
Modified:
trunk/reactos/base/applications/imagesoft/imageprop.c
trunk/reactos/base/applications/imagesoft/imagesoft.rbuild
trunk/reactos/base/applications/imagesoft/imagesoft.rc
trunk/reactos/base/applications/imagesoft/mainwnd.c
trunk/reactos/base/applications/imagesoft/misc.c
trunk/reactos/base/applications/imagesoft/opensave.c
trunk/reactos/base/applications/imagesoft/precomp.h
trunk/reactos/base/applications/imagesoft/res/icons/TextAlignLeftIcon.bmp
trunk/reactos/base/applications/imagesoft/resource.h
trunk/reactos/base/applications/imagesoft/tooldock.c
Removed: trunk/reactos/base/applications/imagesoft/buttons.h
URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/base/applications/imagesoft…
==============================================================================
--- trunk/reactos/base/applications/imagesoft/buttons.h (original)
+++ trunk/reactos/base/applications/imagesoft/buttons.h (removed)
@@ -1,39 +1,0 @@
-/* iBitmap, idCommand, fsState, fsStyle, bReserved[2], dwData,
iString */
-
-TBBUTTON StdButtons[] = {
- {TBICON_NEW, ID_NEW, TBSTATE_ENABLED, BTNS_BUTTON, {0}, 0, 0}, /* new
*/
- {TBICON_OPEN, ID_OPEN, TBSTATE_ENABLED, BTNS_BUTTON, {0}, 0, 0}, /* open
*/
- {TBICON_SAVE, ID_SAVE, TBSTATE_ENABLED, BTNS_BUTTON, {0}, 0, 0}, /* save
*/
-
- {10, 0, TBSTATE_ENABLED, BTNS_SEP, {0}, 0, 0}, /*
separator */
-
- {TBICON_PRINT, ID_PRINTPRE, TBSTATE_ENABLED, BTNS_BUTTON, {0}, 0, 0 }, /* print
*/
- {TBICON_PRINTPRE, ID_PRINT, TBSTATE_ENABLED, BTNS_BUTTON, {0}, 0, 0 }, /* print
preview */
-
- {10, 0, TBSTATE_ENABLED, BTNS_SEP, {0}, 0, 0}, /*
separator */
-
- {TBICON_CUT, ID_CUT, TBSTATE_ENABLED, BTNS_BUTTON, {0}, 0, 0 }, /* cut
*/
- {TBICON_COPY, ID_COPY, TBSTATE_ENABLED, BTNS_BUTTON, {0}, 0, 0 }, /* copy
*/
- {TBICON_PASTE, ID_PASTE, TBSTATE_ENABLED, BTNS_BUTTON, {0}, 0, 0 }, /* paste
*/
-
- {10, 0, TBSTATE_ENABLED, BTNS_SEP, {0}, 0, 0}, /*
separator */
-
- {TBICON_UNDO, ID_UNDO, TBSTATE_ENABLED, BTNS_BUTTON, {0}, 0, 0 }, /* undo
*/
- {TBICON_REDO, ID_REDO, TBSTATE_ENABLED, BTNS_BUTTON, {0}, 0, 0 }, /* redo
*/
-
- {10, 0, TBSTATE_ENABLED, BTNS_SEP, {0}, 0, 0},
-};
-
-TBBUTTON TextButtons[] = {
- {TBICON_BOLD, ID_BOLD, TBSTATE_ENABLED, BTNS_BUTTON, {0}, 0, 0}, /* bold
*/
- {TBICON_ITALIC, ID_ITALIC, TBSTATE_ENABLED, BTNS_BUTTON, {0}, 0, 0}, /* italic
*/
- {TBICON_ULINE, ID_ULINE, TBSTATE_ENABLED, BTNS_BUTTON, {0}, 0, 0}, /*
underline */
-
- {10, 0, TBSTATE_ENABLED, BTNS_SEP, {0}, 0, 0}, /*
separator */
-
- {TBICON_TXTLEFT, ID_TXTLEFT, TBSTATE_ENABLED, BTNS_BUTTON, {0}, 0, 0 }, /* left
justified */
- {TBICON_TXTCENTER,ID_TXTCENTER,TBSTATE_ENABLED, BTNS_BUTTON, {0}, 0, 0 }, /*
centered */
- {TBICON_TXTRIGHT, ID_TXTRIGHT, TBSTATE_ENABLED, BTNS_BUTTON, {0}, 0, 0 }, /* right
justified */
-
- {10, 0, TBSTATE_ENABLED, BTNS_SEP, {0}, 0, 0}, /*
separator */
-};
Modified: trunk/reactos/base/applications/imagesoft/imageprop.c
URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/base/applications/imagesoft…
==============================================================================
--- trunk/reactos/base/applications/imagesoft/imageprop.c (original)
+++ trunk/reactos/base/applications/imagesoft/imageprop.c Sat Apr 8 03:21:12 2006
@@ -5,9 +5,9 @@
UINT ConvertValue(HWND hDlg, UINT EdBoxChanged, UINT LastUnitSel)
{
LONG Resolution = GetDlgItemInt(hDlg, IDC_RES_EDIT, NULL, FALSE);
- FLOAT Width = GetDlgItemInt(hDlg, IDC_WIDTH_EDIT, NULL, FALSE);
- FLOAT Height = GetDlgItemInt(hDlg, IDC_HEIGHT_EDIT, NULL, FALSE);
- USHORT CurUnit = SendMessage(hUnitType, CB_GETCURSEL, 0, 0);
+ FLOAT Width = (FLOAT)GetDlgItemInt(hDlg, IDC_WIDTH_EDIT, NULL, FALSE);
+ FLOAT Height = (FLOAT)GetDlgItemInt(hDlg, IDC_HEIGHT_EDIT, NULL, FALSE);
+ USHORT CurUnit = (USHORT)SendMessage(hUnitType, CB_GETCURSEL, 0, 0);
/* if the user typed in the resolution box */
if ((EdBoxChanged == IDC_RES_EDIT) && (CurUnit != PIXELS))
Modified: trunk/reactos/base/applications/imagesoft/imagesoft.rbuild
URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/base/applications/imagesoft…
==============================================================================
--- trunk/reactos/base/applications/imagesoft/imagesoft.rbuild (original)
+++ trunk/reactos/base/applications/imagesoft/imagesoft.rbuild Sat Apr 8 03:21:12 2006
@@ -7,7 +7,6 @@
<define name="__USE_W32API" />
<define name="_WIN32_IE">0x0600</define>
<define name="_WIN32_WINNT">0x0501</define>
- <library>ntdll</library>
<library>kernel32</library>
<library>gdi32</library>
<library>user32</library>
Modified: trunk/reactos/base/applications/imagesoft/imagesoft.rc
URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/base/applications/imagesoft…
==============================================================================
--- trunk/reactos/base/applications/imagesoft/imagesoft.rc (original)
+++ trunk/reactos/base/applications/imagesoft/imagesoft.rc Sat Apr 8 03:21:12 2006
@@ -2,15 +2,15 @@
#include <commctrl.h>
#include "resource.h"
-#define REACTOS_STR_FILE_DESCRIPTION "ReactOS image editor\0"
-#define REACTOS_STR_INTERNAL_NAME "imagesoft\0"
-#define REACTOS_STR_ORIGINAL_FILENAME "imagesoft.exe\0"
+#define REACTOS_STR_FILE_DESCRIPTION "ReactOS image editor\0"
+#define REACTOS_STR_INTERNAL_NAME "imagesoft\0"
+#define REACTOS_STR_ORIGINAL_FILENAME "imagesoft.exe\0"
#include <reactos/version.rc>
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
1 24 DISCARDABLE "manifest.xml"
-
+
STRINGTABLE DISCARDABLE
BEGIN
IDS_APPNAME "ImageSoft"
Modified: trunk/reactos/base/applications/imagesoft/mainwnd.c
URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/base/applications/imagesoft…
==============================================================================
--- trunk/reactos/base/applications/imagesoft/mainwnd.c (original)
+++ trunk/reactos/base/applications/imagesoft/mainwnd.c Sat Apr 8 03:21:12 2006
@@ -1,11 +1,54 @@
#include <precomp.h>
-#include "buttons.h"
static const TCHAR szMainWndClass[] = TEXT("ImageSoftWndClass");
#define ID_MDI_FIRSTCHILD 50000
#define ID_MDI_WINDOWMENU 5
#define NUM_FLT_WND 3
+
+/* toolbar buttons */
+TBBUTTON StdButtons[] = {
+/* iBitmap, idCommand, fsState, fsStyle, bReserved[2], dwData,
iString */
+ {TBICON_NEW, ID_NEW, TBSTATE_ENABLED, BTNS_BUTTON, {0}, 0, 0}, /* new
*/
+ {TBICON_OPEN, ID_OPEN, TBSTATE_ENABLED, BTNS_BUTTON, {0}, 0, 0}, /* open
*/
+ {TBICON_SAVE, ID_SAVE, TBSTATE_ENABLED, BTNS_BUTTON, {0}, 0, 0}, /* save
*/
+
+ {10, 0, TBSTATE_ENABLED, BTNS_SEP, {0}, 0, 0}, /*
separator */
+
+ {TBICON_PRINT, ID_PRINTPRE, TBSTATE_ENABLED, BTNS_BUTTON, {0}, 0, 0 }, /* print
*/
+ {TBICON_PRINTPRE, ID_PRINT, TBSTATE_ENABLED, BTNS_BUTTON, {0}, 0, 0 }, /* print
preview */
+
+ {10, 0, TBSTATE_ENABLED, BTNS_SEP, {0}, 0, 0}, /*
separator */
+
+ {TBICON_CUT, ID_CUT, TBSTATE_ENABLED, BTNS_BUTTON, {0}, 0, 0 }, /* cut
*/
+ {TBICON_COPY, ID_COPY, TBSTATE_ENABLED, BTNS_BUTTON, {0}, 0, 0 }, /* copy
*/
+ {TBICON_PASTE, ID_PASTE, TBSTATE_ENABLED, BTNS_BUTTON, {0}, 0, 0 }, /* paste
*/
+
+ {10, 0, TBSTATE_ENABLED, BTNS_SEP, {0}, 0, 0}, /*
separator */
+
+ {TBICON_UNDO, ID_UNDO, TBSTATE_ENABLED, BTNS_BUTTON, {0}, 0, 0 }, /* undo
*/
+ {TBICON_REDO, ID_REDO, TBSTATE_ENABLED, BTNS_BUTTON, {0}, 0, 0 }, /* redo
*/
+
+ {10, 0, TBSTATE_ENABLED, BTNS_SEP, {0}, 0, 0},
+};
+
+TBBUTTON TextButtons[] = {
+ {10, 0, TBSTATE_ENABLED, BTNS_SEP, {0}, 0, 0}, /*
separator */
+
+ {TBICON_BOLD, ID_BOLD, TBSTATE_ENABLED, BTNS_BUTTON, {0}, 0, 0}, /* bold
*/
+ {TBICON_ITALIC, ID_ITALIC, TBSTATE_ENABLED, BTNS_BUTTON, {0}, 0, 0}, /* italic
*/
+ {TBICON_ULINE, ID_ULINE, TBSTATE_ENABLED, BTNS_BUTTON, {0}, 0, 0}, /*
underline */
+
+ {10, 0, TBSTATE_ENABLED, BTNS_SEP, {0}, 0, 0}, /*
separator */
+
+ {TBICON_TXTLEFT, ID_TXTLEFT, TBSTATE_ENABLED, BTNS_BUTTON, {0}, 0, 0 }, /* left
justified */
+ {TBICON_TXTCENTER,ID_TXTCENTER,TBSTATE_ENABLED, BTNS_BUTTON, {0}, 0, 0 }, /*
centered */
+ {TBICON_TXTRIGHT, ID_TXTRIGHT, TBSTATE_ENABLED, BTNS_BUTTON, {0}, 0, 0 }, /* right
justified */
+
+ {10, 0, TBSTATE_ENABLED, BTNS_SEP, {0}, 0, 0}, /*
separator */
+};
+
+
/* menu hints */
static const MENU_HINT MainMenuHintTable[] = {
@@ -111,7 +154,7 @@
{
const TBBUTTON *Buttons = NULL;
UINT NumButtons = 0;
- UINT StartImageRes;
+ UINT StartImageRes = 0;
HWND hWndClient = NULL;
UNREFERENCED_PARAMETER(Context);
@@ -207,6 +250,40 @@
}
}
+ switch (Dockbar->BarId)
+ {
+ case ID_TOOLBAR_TEXT:
+ {
+ HWND hWndCombo;
+
+ /* drop combo box into container window */
+ hWndCombo = CreateWindowEx(0,
+ WC_COMBOBOX,
+ NULL,
+ WS_CHILD | WS_VISIBLE | CBS_DROPDOWN,
+ 0, 0, 120, 25,
+ hParent,
+ NULL,
+ hInstance,
+ NULL);
+ if (hWndCombo != NULL)
+ {
+ SetParent(hWndCombo,
+ hWndClient);
+
+ if (!ToolbarInsertSpaceForControl(hWndClient,
+ hWndCombo,
+ 0,
+ ID_TXTFONTNAME,
+ TRUE))
+ {
+ DestroyWindow(hWndCombo);
+ }
+ }
+ break;
+ }
+ }
+
if (hWndClient != NULL)
{
*hwnd = hWndClient;
@@ -275,6 +352,15 @@
}
}
return TRUE;
+}
+
+static VOID
+TbCustomControlChange(HWND hWndToolbar,
+ HWND hWndControl,
+ BOOL Vert)
+{
+ /* the toolbar changed from horizontal to vertical or vice versa... */
+ return;
}
static VOID CALLBACK
@@ -317,6 +403,9 @@
0,
(LPARAM)dwStyle);
+ ToolbarUpdateControlSpaces(rbi->hwndChild,
+ TbCustomControlChange);
+
if (SendMessage(rbi->hwndChild,
TB_GETMAXSIZE,
0,
@@ -630,6 +719,7 @@
InitMainWnd(PMAIN_WND_INFO Info)
{
CLIENTCREATESTRUCT ccs;
+ INT statwidths[] = {110, -1};
/* FIXME - create controls and initialize the application */
@@ -646,6 +736,12 @@
(HMENU)IDC_STATUSBAR,
hInstance,
NULL);
+
+ if (Info->hStatus != NULL)
+ SendMessage(Info->hStatus,
+ SB_SETPARTS,
+ sizeof(statwidths)/sizeof(int),
+ (LPARAM)statwidths);
/* create the MDI client window */
ccs.hWindowMenu = GetSubMenu(GetMenu(Info->hSelf),
@@ -921,11 +1017,33 @@
case WM_NOTIFY:
{
+ UINT BarId;
+ LPNMHDR pnmhdr = (LPNMHDR)lParam;
if (!TbdHandleNotifications(&Info->ToolDocks,
- (LPNMHDR)lParam,
+ pnmhdr,
&Ret))
{
- /* FIXME - handle other notifications */
+ if (TbdDockBarIdFromClientWindow(&Info->ToolDocks,
+ pnmhdr->hwndFrom,
+ &BarId))
+ {
+ switch (BarId)
+ {
+ case ID_TOOLBAR_TEXT:
+ switch (pnmhdr->code)
+ {
+ case TBN_DELETINGBUTTON:
+ {
+ LPNMTOOLBAR lpnmtb = (LPNMTOOLBAR)lParam;
+
+ ToolbarDeleteControlSpace(pnmhdr->hwndFrom,
+ &lpnmtb->tbButton);
+ break;
+ }
+ }
+ break;
+ }
+ }
}
break;
}
Modified: trunk/reactos/base/applications/imagesoft/misc.c
URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/base/applications/imagesoft…
==============================================================================
--- trunk/reactos/base/applications/imagesoft/misc.c (original)
+++ trunk/reactos/base/applications/imagesoft/misc.c Sat Apr 8 03:21:12 2006
@@ -47,7 +47,7 @@
uID);
if (ln++ > 0)
{
- (*lpTarget) = (LPWSTR)LocalAlloc(LMEM_FIXED,
+ (*lpTarget) = (LPTSTR)LocalAlloc(LMEM_FIXED,
ln * sizeof(TCHAR));
if ((*lpTarget) != NULL)
{
@@ -207,3 +207,169 @@
{
MessageBox(NULL, _itot(num, NULL, 10), NULL, 0);
}
+
+/*
+ * Toolbar custom control routines
+ */
+
+typedef struct _TBCUSTCTL
+{
+ HWND hWndControl;
+ INT iCommand;
+ BOOL HideVertical : 1;
+ BOOL IsVertical : 1;
+} TBCUSTCTL, *PTBCUSTCTL;
+
+BOOL
+ToolbarDeleteControlSpace(HWND hWndToolbar,
+ const TBBUTTON *ptbButton)
+{
+ if ((ptbButton->fsStyle & TBSTYLE_SEP) &&
+ ptbButton->dwData != 0)
+ {
+ PTBCUSTCTL cctl = (PTBCUSTCTL)ptbButton->dwData;
+
+ DestroyWindow(cctl->hWndControl);
+
+ HeapFree(ProcessHeap,
+ 0,
+ cctl);
+ return TRUE;
+ }
+
+ return FALSE;
+}
+
+VOID
+ToolbarUpdateControlSpaces(HWND hWndToolbar,
+ ToolbarChangeControlCallback ChangeCallback)
+{
+ BOOL Vert;
+ DWORD nButtons, i;
+ TBBUTTON tbtn;
+
+ Vert = ((SendMessage(hWndToolbar,
+ TB_GETSTYLE,
+ 0,
+ 0) & CCS_VERT) != 0);
+
+ nButtons = SendMessage(hWndToolbar,
+ TB_BUTTONCOUNT,
+ 0,
+ 0);
+
+ for (i = 0;
+ i != nButtons;
+ i++)
+ {
+ if (SendMessage(hWndToolbar,
+ TB_GETBUTTON,
+ (WPARAM)i,
+ (LPARAM)&tbtn))
+ {
+ if ((tbtn.fsStyle & TBSTYLE_SEP) && tbtn.dwData != 0)
+ {
+ PTBCUSTCTL cctl = (PTBCUSTCTL)tbtn.dwData;
+
+ cctl->IsVertical = Vert;
+
+ if (cctl->HideVertical)
+ {
+ ShowWindow(cctl->hWndControl,
+ (Vert ? SW_HIDE : SW_SHOW));
+ goto ShowHideSep;
+ }
+ else if (cctl->IsVertical != Vert)
+ {
+ ChangeCallback(hWndToolbar,
+ cctl->hWndControl,
+ Vert);
+
+ShowHideSep:
+ /* show/hide the separator */
+ SendMessage(hWndToolbar,
+ TB_HIDEBUTTON,
+ (WPARAM)cctl->iCommand,
+ (LPARAM)Vert && cctl->HideVertical);
+ }
+ }
+ }
+ }
+}
+
+BOOL
+ToolbarInsertSpaceForControl(HWND hWndToolbar,
+ HWND hWndControl,
+ INT Index,
+ INT iCmd,
+ BOOL HideVertical)
+{
+ PTBCUSTCTL cctl;
+ RECT rcControl, rcItem;
+
+ cctl = HeapAlloc(ProcessHeap,
+ 0,
+ sizeof(TBCUSTCTL));
+ if (cctl == NULL)
+ return FALSE;
+
+ cctl->HideVertical = HideVertical;
+ cctl->hWndControl = hWndControl;
+ cctl->iCommand = iCmd;
+
+ if (GetWindowRect(hWndControl,
+ &rcControl))
+ {
+ TBBUTTON tbtn = {0};
+
+ tbtn.iBitmap = rcControl.right - rcControl.left;
+ tbtn.idCommand = iCmd;
+ tbtn.fsStyle = TBSTYLE_SEP;
+ tbtn.dwData = (DWORD_PTR)cctl;
+
+ if (SendMessage(hWndToolbar,
+ TB_GETSTYLE,
+ 0,
+ 0) & CCS_VERT)
+ {
+ if (HideVertical)
+ tbtn.fsState |= TBSTATE_HIDDEN;
+
+ cctl->IsVertical = TRUE;
+ }
+ else
+ cctl->IsVertical = FALSE;
+
+ if (SendMessage(hWndToolbar,
+ TB_INSERTBUTTON,
+ (WPARAM)Index,
+ (LPARAM)&tbtn))
+ {
+ if (SendMessage(hWndToolbar,
+ TB_GETITEMRECT,
+ (WPARAM)Index,
+ (LPARAM)&rcItem))
+ {
+ SetWindowPos(hWndControl,
+ NULL,
+ rcItem.left,
+ rcItem.top,
+ rcItem.right - rcItem.left,
+ rcItem.bottom - rcItem.top,
+ SWP_NOZORDER);
+
+ ShowWindow(hWndControl,
+ SW_SHOW);
+
+ return TRUE;
+ }
+ else if (tbtn.fsState & TBSTATE_HIDDEN)
+ {
+ ShowWindow(hWndControl,
+ SW_HIDE);
+ }
+ }
+ }
+
+ return FALSE;
+}
Modified: trunk/reactos/base/applications/imagesoft/opensave.c
URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/base/applications/imagesoft…
==============================================================================
--- trunk/reactos/base/applications/imagesoft/opensave.c (original)
+++ trunk/reactos/base/applications/imagesoft/opensave.c Sat Apr 8 03:21:12 2006
@@ -37,7 +37,7 @@
_T("TAG Image File Format (*tif)\0*.tif\0") \
_T("Portable Network Graphics
(*png)\0*.png\0\0");*/
- static TCHAR Filter[] = _T("Windows Bitmap (*bmp)\0*.bmp\0");
+ static TCHAR Filter[] = _T("Windows Bitmap (*.bmp)\0*.bmp\0");
ofn.lpstrFilter = Filter;
ofn.lpstrFile = szFileName;
Modified: trunk/reactos/base/applications/imagesoft/precomp.h
URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/base/applications/imagesoft…
==============================================================================
--- trunk/reactos/base/applications/imagesoft/precomp.h (original)
+++ trunk/reactos/base/applications/imagesoft/precomp.h Sat Apr 8 03:21:12 2006
@@ -19,7 +19,10 @@
#ifndef RBN_CHEVRONPUSHED
#define RBN_CHEVRONPUSHED (RBN_FIRST - 10)
#endif
-ULONG DbgPrint(PCH Format,...);
+
+#ifdef _MSC_VER
+#pragma warning(disable : 4100)
+#endif
#define MAX_KEY_LENGTH 256
#define NUM_MAINTB_IMAGES 10
@@ -152,8 +155,8 @@
BOOL InitImageEditWindowImpl(VOID);
VOID UninitImageEditWindowImpl(VOID);
+
/* tooldock.c */
-
typedef enum
{
TOP_DOCK = 0,
@@ -251,6 +254,9 @@
const DOCKBAR *Dockbar,
PVOID Context,
const DOCKBAR_ITEM_CALLBACKS *DockbarCallbacks);
+BOOL TbdDockBarIdFromClientWindow(PTOOLBAR_DOCKS TbDocks,
+ HWND hWndClient,
+ UINT *Id);
BOOL TbdHandleNotifications(PTOOLBAR_DOCKS TbDocks,
LPNMHDR pnmh,
LRESULT *Result);
@@ -334,6 +340,21 @@
VOID MessageBoxInt(INT num);
+BOOL ToolbarDeleteControlSpace(HWND hWndToolbar,
+ const TBBUTTON *ptbButton);
+
+typedef VOID (*ToolbarChangeControlCallback)(HWND hWndToolbar,
+ HWND hWndControl,
+ BOOL Vert);
+VOID ToolbarUpdateControlSpaces(HWND hWndToolbar,
+ ToolbarChangeControlCallback ChangeCallback);
+
+BOOL ToolbarInsertSpaceForControl(HWND hWndToolbar,
+ HWND hWndControl,
+ INT Index,
+ INT iCmd,
+ BOOL HideVertical);
+
/* opensave.c */
VOID FileInitialize(HWND hwnd);
BOOL DoOpenFile(HWND hwnd, LPTSTR lpFileName, LPTSTR lpName);
Modified: trunk/reactos/base/applications/imagesoft/res/icons/TextAlignLeftIcon.bmp
URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/base/applications/imagesoft…
==============================================================================
Binary files - no diff available.
Modified: trunk/reactos/base/applications/imagesoft/resource.h
URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/base/applications/imagesoft…
==============================================================================
--- trunk/reactos/base/applications/imagesoft/resource.h (original)
+++ trunk/reactos/base/applications/imagesoft/resource.h Sat Apr 8 03:21:12 2006
@@ -35,6 +35,7 @@
#define ID_TXTLEFT 2033
#define ID_TXTCENTER 2034
#define ID_TXTRIGHT 2035
+#define ID_TXTFONTNAME 2036
#define ID_REFRESH 3000
#define ID_HELP 3001
Modified: trunk/reactos/base/applications/imagesoft/tooldock.c
URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/base/applications/imagesoft…
==============================================================================
--- trunk/reactos/base/applications/imagesoft/tooldock.c (original)
+++ trunk/reactos/base/applications/imagesoft/tooldock.c Sat Apr 8 03:21:12 2006
@@ -261,6 +261,30 @@
{
/* Nothing to do */
}
+}
+
+BOOL
+TbdDockBarIdFromClientWindow(PTOOLBAR_DOCKS TbDocks,
+ HWND hWndClient,
+ UINT *Id)
+{
+ PDOCKBAR_ITEM Item;
+ BOOL Ret = FALSE;
+
+ Item = TbDocks->Items;
+ while (Item != NULL)
+ {
+ if (Item->hWndClient == hWndClient)
+ {
+ *Id = Item->DockBar.BarId;
+ Ret = TRUE;
+ break;
+ }
+
+ Item = Item->Next;
+ }
+
+ return Ret;
}
BOOL
@@ -976,13 +1000,13 @@
BOOL KeepActive = *(BOOL*)wParam;
HWND hWndActivate = *(HWND*)lParam;
PDOCKBAR_ITEM Item;
-DbgPrint("-- 0x%p --\n", hWnd);
+
Item = TbDocks->Items;
while (Item != NULL)
{
if (Item->hWndTool != NULL &&
Item->hWndTool == hWndActivate)
- {DbgPrint("Activate toolbars (0x%p)\n", hWndActivate);
+ {
KeepActive = TRUE;
SynchronizeSiblings = FALSE;
break;
@@ -1000,7 +1024,7 @@
if (Item->hWndTool != NULL &&
Item->hWndTool != hWnd &&
Item->hWndTool != hWndActivate)
- {DbgPrint("WM_NCACTIVE %p (wnd %p)\n", KeepActive,
Item->hWndTool);
+ {
SendMessage(Item->hWndTool,
WM_NCACTIVATE,
(WPARAM)KeepActive,