Author: gedmurphy
Date: Wed Nov 15 02:15:02 2006
New Revision: 24761
URL:
http://svn.reactos.org/svn/reactos?rev=24761&view=rev
Log:
- split the main header file into seperate files as it was becoming annoying to maintain
- split the open / new file code
- Add a dialog for adjusting the brightness. The code for adjusting the brightness will
follow soon, as will many other image adjusting dialogs.
- change the menus to show the image adjustment tools which will be present
- remove the horrible image property dialog code. I'll rewrite it at a later stage
- Set Arial as the default font
- fix a few API's to be 64-bit compatable
- reduce msvc warnings
Added:
trunk/reactos/base/applications/imagesoft/imgedwnd.h
trunk/reactos/base/applications/imagesoft/mainwnd.h
trunk/reactos/base/applications/imagesoft/misc.h
trunk/reactos/base/applications/imagesoft/tooldock.h
Modified:
trunk/reactos/base/applications/imagesoft/custcombo.c
trunk/reactos/base/applications/imagesoft/floatwindow.c
trunk/reactos/base/applications/imagesoft/font.c
trunk/reactos/base/applications/imagesoft/imageprop.c
trunk/reactos/base/applications/imagesoft/imagesoft.c
trunk/reactos/base/applications/imagesoft/imagesoft.rc
trunk/reactos/base/applications/imagesoft/imgedwnd.c
trunk/reactos/base/applications/imagesoft/lang/En.rc
trunk/reactos/base/applications/imagesoft/mainwnd.c
trunk/reactos/base/applications/imagesoft/misc.c
trunk/reactos/base/applications/imagesoft/precomp.h
trunk/reactos/base/applications/imagesoft/resource.h
Modified: trunk/reactos/base/applications/imagesoft/custcombo.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/imagesof…
==============================================================================
--- trunk/reactos/base/applications/imagesoft/custcombo.c (original)
+++ trunk/reactos/base/applications/imagesoft/custcombo.c Wed Nov 15 02:15:02 2006
@@ -201,13 +201,13 @@
LONG OldComboProc;
/* Remember old window procedure */
- OldComboProc = GetWindowLong(hwndCombo, GWL_WNDPROC);
- SetWindowLong(hwndCombo,
- GWL_USERDATA,
- OldComboProc);
+ OldComboProc = GetWindowLongPtr(hwndCombo, GWL_WNDPROC);
+ SetWindowLongPtr(hwndCombo,
+ GWL_USERDATA,
+ OldComboProc);
/* Perform the subclass */
- OldComboProc = SetWindowLong(hwndCombo,
- GWL_WNDPROC,
- (LONG)FlatComboProc);
+ SetWindowLongPtr(hwndCombo,
+ GWL_WNDPROC,
+ (LONG_PTR)FlatComboProc);
}
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 Wed Nov 15 02:15:02 2006
@@ -365,10 +365,10 @@
FltInfo->bOpaque = FALSE;
- SetWindowLong(hwnd,
- GWL_EXSTYLE,
- GetWindowLong(hwnd,
- GWL_EXSTYLE) | WS_EX_LAYERED);
+ SetWindowLongPtr(hwnd,
+ GWL_EXSTYLE,
+ GetWindowLongPtr(hwnd,
+ GWL_EXSTYLE) | WS_EX_LAYERED);
/* set the tranclucency to 60% */
SetLayeredWindowAttributes(hwnd,
@@ -404,10 +404,10 @@
FltInfo->bOpaque = FALSE;
- SetWindowLong(hwnd,
- GWL_EXSTYLE,
- GetWindowLong(hwnd,
- GWL_EXSTYLE) | WS_EX_LAYERED);
+ SetWindowLongPtr(hwnd,
+ GWL_EXSTYLE,
+ GetWindowLongPtr(hwnd,
+ GWL_EXSTYLE) | WS_EX_LAYERED);
/* set the tranclucency to 60% */
SetLayeredWindowAttributes(hwnd,
@@ -426,10 +426,10 @@
{
if (FltInfo->bOpaque == FALSE)
{
- SetWindowLong(hwnd,
- GWL_EXSTYLE,
- GetWindowLong(hwnd,
- GWL_EXSTYLE) & ~WS_EX_LAYERED);
+ SetWindowLongPtr(hwnd,
+ GWL_EXSTYLE,
+ GetWindowLongPtr(hwnd,
+ GWL_EXSTYLE) & ~WS_EX_LAYERED);
RedrawWindow(hwnd,
NULL,
Modified: trunk/reactos/base/applications/imagesoft/font.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/imagesof…
==============================================================================
--- trunk/reactos/base/applications/imagesoft/font.c (original)
+++ trunk/reactos/base/applications/imagesoft/font.c Wed Nov 15 02:15:02 2006
@@ -1,5 +1,4 @@
#include <precomp.h>
-
int CALLBACK
EnumFontSizes(ENUMLOGFONTEX *lpelfe,
@@ -20,8 +19,16 @@
for (i = 0; i < (sizeof(ttsizes) / sizeof(ttsizes[0])); i++)
{
wsprintf(ach, _T("%d"), ttsizes[i]);
- idx = (INT)SendMessage(hwndCombo, CB_ADDSTRING, 0, (LPARAM)ach);
- SendMessage(hwndCombo, CB_SETITEMDATA, idx, ttsizes[i]);
+
+ idx = (INT)SendMessage(hwndCombo,
+ CB_ADDSTRING,
+ 0,
+ (LPARAM)ach);
+
+ SendMessage(hwndCombo,
+ CB_SETITEMDATA,
+ idx,
+ ttsizes[i]);
}
return 0;
}
@@ -92,25 +99,42 @@
lf.lfPitchAndFamily = 0;
/* empty the list */
- SendMessage(hwndCombo, CB_RESETCONTENT, 0, 0);
+ SendMessage(hwndCombo,
+ CB_RESETCONTENT,
+ 0,
+ 0);
/* enumerate font sizes */
- EnumFontFamiliesEx(hdc, &lf, (FONTENUMPROC)EnumFontSizes, (LONG)hwndCombo, 0);
+ EnumFontFamiliesEx(hdc,
+ &lf,
+ (FONTENUMPROC)EnumFontSizes,
+ (LPARAM)hwndCombo,
+ 0);
/* set selection to first item */
- count = (INT)SendMessage(hwndCombo, CB_GETCOUNT, 0, 0);
+ count = (INT)SendMessage(hwndCombo,
+ CB_GETCOUNT,
+ 0,
+ 0);
for(i = 0; i < count; i++)
{
- INT n = (INT)SendMessage(hwndCombo, CB_GETITEMDATA, i, 0);
+ INT n = (INT)SendMessage(hwndCombo,
+ CB_GETITEMDATA,
+ i,
+ 0);
if (n <= cursize)
nearest = i;
}
- SendMessage(hwndCombo, CB_SETCURSEL, nearest, 0);
+ SendMessage(hwndCombo,
+ CB_SETCURSEL,
+ nearest,
+ 0);
- ReleaseDC(hwndCombo, hdc);
+ ReleaseDC(hwndCombo,
+ hdc);
}
@@ -144,8 +168,11 @@
ReleaseDC(hwndCombo,
hdc);
+ /* set default to Arial */
SendMessage(hwndCombo,
- CB_SETCURSEL,
- 0,
- 0);
+ CB_SELECTSTRING,
+ -1,
+ (LPARAM)_T("Arial"));
+
+
}
Modified: trunk/reactos/base/applications/imagesoft/imageprop.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/imagesof…
==============================================================================
--- trunk/reactos/base/applications/imagesoft/imageprop.c (original)
+++ trunk/reactos/base/applications/imagesoft/imageprop.c Wed Nov 15 02:15:02 2006
@@ -1,261 +1,112 @@
#include <precomp.h>
-static HWND hImageType, hUnitType, hHeightUnit, hWidthUnit, hResUnit;
-
-UINT ConvertValue(HWND hDlg, UINT EdBoxChanged, UINT LastUnitSel)
+INT_PTR CALLBACK
+BrightnessProc(HWND hDlg,
+ UINT message,
+ WPARAM wParam,
+ LPARAM lParam)
{
- LONG Resolution = GetDlgItemInt(hDlg, IDC_RES_EDIT, NULL, FALSE);
- 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))
- {
- Width = Width / Resolution * 100;
- Height = Height / Resolution * 100;
-
-
- /* something wrong with these */
- SetDlgItemInt(hDlg, IDC_WIDTH_EDIT, Width, TRUE);
- SetDlgItemInt(hDlg, IDC_HEIGHT_EDIT, Height, FALSE);
-
- return LastUnitSel;
- }
-
-
- /* if the user changed the unit combobox */
- if (EdBoxChanged == IDC_UNIT)
- {
- switch(LastUnitSel)
- {
- case PIXELS:
- if (CurUnit == CENTIMETERS)
- ;
- else if (CurUnit == INCHES)
- ;
- break;
-
- case CENTIMETERS:
- if (CurUnit == PIXELS)
- ;
- else if (CurUnit == INCHES)
- {
- Width /= 2.54;
- Height /= 2.54;
- Resolution *= 2.54;
-
- SetDlgItemInt(hDlg, IDC_WIDTH_EDIT, Width, FALSE);
- SetDlgItemInt(hDlg, IDC_HEIGHT_EDIT, Height, FALSE);
- SetDlgItemInt(hDlg, IDC_RES_EDIT, Resolution, FALSE);
- }
- break;
-
- case INCHES:
- if (CurUnit == PIXELS)
- ;
- else if (CurUnit == CENTIMETERS)
- {
- Width *= 2.54;
- Height *= 2.54;
- Resolution /= 2.54;
-
- SetDlgItemInt(hDlg, IDC_WIDTH_EDIT, Width, FALSE);
- SetDlgItemInt(hDlg, IDC_HEIGHT_EDIT, Height, FALSE);
- SetDlgItemInt(hDlg, IDC_RES_EDIT, Resolution, FALSE);
- }
- break;
- }
- }
-
- return CurUnit;
-}
-
-
-VOID SetImageSize(HWND hDlg)
-{
- DWORD Size;
- USHORT Type = 0;
- TCHAR buf[20];
- TCHAR SizeUnit[25];
-
- FLOAT Width = GetDlgItemInt(hDlg, IDC_WIDTH_EDIT, NULL, FALSE);
- FLOAT Height = GetDlgItemInt(hDlg, IDC_HEIGHT_EDIT, NULL, FALSE);
- USHORT sel = SendMessage(hImageType, CB_GETCURSEL, 0, 0);
-
- if (sel == 0)
- Type = MONOCHROMEBITS;
- else if (sel == 1)
- Type = GREYSCALEBITS;
- else if (sel == 2)
- Type = PALLETEBITS;
- else if (sel == 3)
- Type = TRUECOLORBITS;
-
- Size = ((Width * Height * Type) / 8) / 1024;
-
- if (Size > 1000)
- {
- Size /= 1024;
- LoadString(hInstance, IDS_UNIT_MB, SizeUnit, sizeof(SizeUnit) / sizeof(TCHAR));
- }
- else
- LoadString(hInstance, IDS_UNIT_KB, SizeUnit, sizeof(SizeUnit) / sizeof(TCHAR));
-
- _sntprintf(buf, sizeof(buf) / sizeof(TCHAR), SizeUnit, Size);
- SendDlgItemMessage(hDlg, IDC_IMAGE_SIZE, WM_SETTEXT, 0, (LPARAM)buf);
-
-}
-
-INT_PTR CALLBACK
-ImagePropDialogProc(HWND hDlg,
- UINT message,
- WPARAM wParam,
- LPARAM lParam)
-{
- static PIMAGE_PROP ImageProp = NULL;
- static UINT LastUnitSel;
- TCHAR buf[35];
+ static PMAIN_WND_INFO Info = NULL;
switch (message)
{
case WM_INITDIALOG:
+ {
+ Info = (PMAIN_WND_INFO)lParam;
- ImageProp = (PIMAGE_PROP)lParam;
+ SendDlgItemMessage(hDlg,
+ IDC_BRI_FULL,
+ BM_SETCHECK,
+ BST_CHECKED,
+ 0);
- /* get handles to the windows */
- hImageType = GetDlgItem(hDlg, IDC_IMAGETYPE);
- hUnitType = GetDlgItem(hDlg, IDC_UNIT);
- hWidthUnit = GetDlgItem(hDlg, IDC_WIDTH_STAT);
- hHeightUnit = GetDlgItem(hDlg, IDC_HEIGHT_STAT);
- hResUnit = GetDlgItem(hDlg, IDC_RES_STAT);
+ SendDlgItemMessage(hDlg,
+ IDC_BRI_TRACKBAR,
+ TBM_SETRANGE,
+ TRUE,
+ (LPARAM)MAKELONG(0, 200));
- /* fill image type combo box */
- LoadString(hInstance, IDS_IMAGE_MONOCHROME, buf, sizeof(buf) /
sizeof(TCHAR));
- SendMessage(hImageType, CB_ADDSTRING, 0, (LPARAM)buf);
- LoadString(hInstance, IDS_IMAGE_GREYSCALE, buf, sizeof(buf) /
sizeof(TCHAR));
- SendMessage(hImageType, CB_ADDSTRING, 0, (LPARAM)buf);
- LoadString(hInstance, IDS_IMAGE_PALETTE, buf, sizeof(buf) / sizeof(TCHAR));
- SendMessage(hImageType, CB_ADDSTRING, 0, (LPARAM)buf);
- LoadString(hInstance, IDS_IMAGE_TRUECOLOR, buf, sizeof(buf) /
sizeof(TCHAR));
- SendMessage(hImageType, CB_ADDSTRING, 0, (LPARAM)buf);
- /* default 24bit */
- SendMessage(hImageType, CB_SETCURSEL, 3, 0);
+ SendDlgItemMessage(hDlg,
+ IDC_BRI_TRACKBAR,
+ TBM_SETPOS,
+ TRUE,
+ (LPARAM)100);
- /* fill unit combo box */
- LoadString(hInstance, IDS_UNIT_PIXELS, buf, sizeof(buf) / sizeof(TCHAR));
- SendMessage(hUnitType, CB_ADDSTRING, 0, (LPARAM)buf);
- LoadString(hInstance, IDS_UNIT_CM, buf, sizeof(buf) / sizeof(TCHAR));
- SendMessage(hUnitType, CB_ADDSTRING, 0, (LPARAM)buf);
- LoadString(hInstance, IDS_UNIT_INCHES, buf, sizeof(buf) / sizeof(TCHAR));
- SendMessage(hUnitType, CB_ADDSTRING, 0, (LPARAM)buf);
- /* default pixels */
- SendMessage(hUnitType, CB_SETCURSEL, 0, 0);
+ SetDlgItemText(hDlg,
+ IDC_BRI_EDIT,
+ _T("100"));
- /* default pixels */
- LoadString(hInstance, IDS_UNIT_PIXELS, buf, sizeof(buf) / sizeof(TCHAR));
- SendMessage(hWidthUnit, WM_SETTEXT, 0, (LPARAM)buf);
- SendMessage(hHeightUnit, WM_SETTEXT, 0, (LPARAM)buf);
- LoadString(hInstance, IDS_UNIT_DPI, buf, sizeof(buf) / sizeof(TCHAR));
- SendMessage(hResUnit, WM_SETTEXT, 0, (LPARAM)buf);
- LastUnitSel = PIXELS;
- /* temperary. Default vals should be loaded from registry */
- SendDlgItemMessage(hDlg, IDC_WIDTH_EDIT, WM_SETTEXT, 0,
(LPARAM)_T("400"));
- SendDlgItemMessage(hDlg, IDC_HEIGHT_EDIT, WM_SETTEXT, 0,
(LPARAM)_T("300"));
- SendDlgItemMessage(hDlg, IDC_RES_EDIT, WM_SETTEXT, 0,
(LPARAM)_T("50"));
- SetImageSize(hDlg);
+ return TRUE;
+ }
- break;
+ case WM_DRAWITEM:
+ {
+ LPDRAWITEMSTRUCT lpDrawItem;
+ HWND hPicPrev = GetDlgItem(hDlg, IDC_PICPREVIEW);
+ RECT ImageRect = {0};
+ HDC hdcMem;
- case WM_COMMAND:
+ lpDrawItem = (LPDRAWITEMSTRUCT)lParam;
- switch(LOWORD(wParam))
+ GetClientRect(hPicPrev,
+ &ImageRect);
+
+ hdcMem = CreateCompatibleDC(lpDrawItem->hDC);
+
+ if(lpDrawItem->CtlID == IDC_PICPREVIEW)
+ {
+ SelectObject(hdcMem,
+ Info->ImageEditors->hBitmap);
+
+ StretchBlt(lpDrawItem->hDC,
+ ImageRect.left,
+ ImageRect.top,
+ ImageRect.right,
+ ImageRect.bottom,
+ hdcMem,
+ 0,
+ 0,
+ Info->ImageEditors->Width,
+ Info->ImageEditors->Height,
+ SRCCOPY);
+
+ DeleteDC(hdcMem);
+ }
+ return TRUE;
+ }
+
+ case WM_HSCROLL:
{
- case IDOK:
+ if (LOWORD(wParam) == TB_THUMBTRACK ||
+ LOWORD(wParam) == TB_ENDTRACK)
{
- /* FIXME: default vals should be taken from registry */
+ DWORD Pos = (DWORD)SendDlgItemMessage(hDlg,
+ IDC_BRI_TRACKBAR,
+ TBM_GETPOS,
+ 0,
+ 0);
+ SetDlgItemInt(hDlg,
+ IDC_BRI_EDIT,
+ Pos,
+ FALSE);
+ }
- INT Ret = GetTextFromEdit(ImageProp->lpImageName, hDlg,
IDC_IMAGE_NAME_EDIT);
- if (Ret == 0)
- ImageProp->lpImageName = NULL;
+ return TRUE;
+ }
- ImageProp->Type = SendMessage(hImageType, CB_GETCURSEL, 0, 0);
- ImageProp->Resolution = GetDlgItemInt(hDlg, IDC_RES_EDIT, NULL,
FALSE);
- ImageProp->Width = GetDlgItemInt(hDlg, IDC_WIDTH_EDIT, NULL,
FALSE);
- ImageProp->Height = GetDlgItemInt(hDlg, IDC_HEIGHT_EDIT, NULL,
FALSE);
- ImageProp->Unit = SendMessage(hUnitType, CB_GETCURSEL, 0, 0);
-
- EndDialog(hDlg, 1);
+ case WM_COMMAND:
+ {
+ if (LOWORD(wParam) == IDOK ||
+ LOWORD(wParam) == IDCANCEL)
+ {
+ EndDialog(hDlg,
+ LOWORD(wParam));
+ return TRUE;
}
- break;
-
- case IDCANCEL:
- ImageProp = NULL;
- EndDialog(hDlg, 0);
- break;
-
- case IDC_UNIT:
- if (HIWORD(wParam) == CBN_SELCHANGE)
- {
- INT unit = SendMessage(hUnitType, CB_GETCURSEL, 0, 0);
-
- LastUnitSel = ConvertValue(hDlg, IDC_UNIT, LastUnitSel);
-
- switch (unit)
- {
- case 0: /* pixels */
- {
- LoadString(hInstance, IDS_UNIT_PIXELS, buf, sizeof(buf) /
sizeof(TCHAR));
- SendMessage(hWidthUnit, WM_SETTEXT, 0, (LPARAM)buf);
- SendMessage(hHeightUnit, WM_SETTEXT, 0, (LPARAM)buf);
- LoadString(hInstance, IDS_UNIT_DPI, buf, sizeof(buf) /
sizeof(TCHAR));
- SendMessage(hResUnit, WM_SETTEXT, 0, (LPARAM)buf);
- }
- break;
-
- case 1:
- /* cm */
- LoadString(hInstance, IDS_UNIT_CM, buf, sizeof(buf) /
sizeof(TCHAR));
- SendMessage(hWidthUnit, WM_SETTEXT, 0, (LPARAM)buf);
- SendMessage(hHeightUnit, WM_SETTEXT, 0, (LPARAM)buf);
- LoadString(hInstance, IDS_UNIT_DOTSCM, buf, sizeof(buf) /
sizeof(TCHAR));
- SendMessage(hResUnit, WM_SETTEXT, 0, (LPARAM)buf);
- break;
-
- case 2:
- /* inch */
- LoadString(hInstance, IDS_UNIT_INCHES, buf, sizeof(buf) /
sizeof(TCHAR));
- SendMessage(hWidthUnit, WM_SETTEXT, 0, (LPARAM)buf);
- SendMessage(hHeightUnit, WM_SETTEXT, 0, (LPARAM)buf);
- LoadString(hInstance, IDS_UNIT_DPI, buf, sizeof(buf) /
sizeof(TCHAR));
- SendMessage(hResUnit, WM_SETTEXT, 0, (LPARAM)buf);
- break;
- }
- }
- break;
-
- case IDC_IMAGETYPE:
- if (HIWORD(wParam) == CBN_SELCHANGE)
- SetImageSize(hDlg);
- break;
-
- case IDC_WIDTH_EDIT:
- case IDC_HEIGHT_EDIT:
- if (HIWORD(wParam) == EN_UPDATE)
- SetImageSize(hDlg);
- break;
-
- case IDC_RES_EDIT:
- if (HIWORD(wParam) == EN_UPDATE)
- ConvertValue(hDlg, IDC_RES_EDIT, LastUnitSel);
- break;
}
break;
-
- default:
- return FALSE;
}
- return TRUE;
+ return FALSE;
}
Modified: trunk/reactos/base/applications/imagesoft/imagesoft.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/imagesof…
==============================================================================
--- trunk/reactos/base/applications/imagesoft/imagesoft.c (original)
+++ trunk/reactos/base/applications/imagesoft/imagesoft.c Wed Nov 15 02:15:02 2006
@@ -3,9 +3,6 @@
HINSTANCE hInstance;
HANDLE ProcessHeap;
-#ifdef _MSC_VER
-#pragma warning(disable : 4100)
-#endif
int WINAPI
WinMain(HINSTANCE hThisInstance,
HINSTANCE hPrevInstance,
Modified: trunk/reactos/base/applications/imagesoft/imagesoft.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/imagesof…
==============================================================================
--- trunk/reactos/base/applications/imagesoft/imagesoft.rc (original)
+++ trunk/reactos/base/applications/imagesoft/imagesoft.rc Wed Nov 15 02:15:02 2006
@@ -2,10 +2,10 @@
#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"
-#include <reactos/version.rc>
+#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
@@ -24,7 +24,6 @@
IDB_MAINPRINTICON BITMAP DISCARDABLE "res/icons/std/MainPrintIcon.bmp"
IDB_MAINPRINTPREICON BITMAP DISCARDABLE "res/icons/std/MainPrintPreIcon.bmp"
IDB_MAINSAVEICON BITMAP DISCARDABLE "res/icons/std/MainSaveIcon.bmp"
-
/* text toolbar icons */
IDB_TEXTBOLD BITMAP DISCARDABLE "res/icons/text/TextBoldIcon.bmp"
Modified: trunk/reactos/base/applications/imagesoft/imgedwnd.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/imagesof…
==============================================================================
--- trunk/reactos/base/applications/imagesoft/imgedwnd.c (original)
+++ trunk/reactos/base/applications/imagesoft/imgedwnd.c Wed Nov 15 02:15:02 2006
@@ -3,7 +3,6 @@
static const TCHAR szImageEditWndClass[] = TEXT("ImageSoftEditWndClass");
#define IMAGE_FRAME_SIZE 1
-
static VOID
EditWndUpdateScrollInfo(PEDIT_WND_INFO Info)
@@ -33,119 +32,136 @@
TRUE);
}
+
+static VOID
+LoadBlankCanvas(PEDIT_WND_INFO Info)
+{
+ /* FIXME: convert this to a DIB Section */
+ /* set bitmap dimensions */
+ Info->Width = Info->OpenInfo->New.Width;
+ Info->Height = Info->OpenInfo->New.Height;
+}
+
static BOOL
-InitEditWnd(PEDIT_WND_INFO Info)
+LoadDIBImage(PEDIT_WND_INFO Info)
{
BITMAPFILEHEADER bmfh;
- PBITMAPINFO pbmi = NULL;
- PBYTE pBits;
HANDLE hFile;
BITMAP bitmap;
-
- Info->Zoom = 100;
-
- if (Info->OpenInfo != NULL)
- {
- HDC hDC = GetDC(Info->hSelf);
- Info->hDCMem = CreateCompatibleDC(hDC);
- ReleaseDC(Info->hSelf, hDC);
-
- if (Info->OpenInfo->CreateNew)
- {
- /* FIXME: convert this to a DIB Section */
- /* set bitmap dimensions */
- Info->Width = Info->OpenInfo->New.Width;
- Info->Height = Info->OpenInfo->New.Height;
-
- }
- else
- {
- DWORD InfoSize, BytesRead;
- BOOL bSuccess;
-
- hFile = CreateFile(Info->OpenInfo->Open.lpImagePath,
- GENERIC_READ,
- FILE_SHARE_READ,
- NULL,
- OPEN_EXISTING,
- FILE_FLAG_SEQUENTIAL_SCAN,
- NULL);
- if (hFile == INVALID_HANDLE_VALUE)
- return FALSE;
-
+ DWORD BytesRead;
+ BOOL bSuccess, bRet = FALSE;
+
+ hFile = CreateFile(Info->OpenInfo->Open.lpImagePath,
+ GENERIC_READ,
+ FILE_SHARE_READ,
+ NULL,
+ OPEN_EXISTING,
+ FILE_FLAG_SEQUENTIAL_SCAN,
+ NULL);
+ if (hFile == INVALID_HANDLE_VALUE)
+ return bRet;
+
+ bSuccess = ReadFile(hFile,
+ &bmfh,
+ sizeof(BITMAPFILEHEADER),
+ &BytesRead,
+ NULL);
+
+ if (bSuccess && (BytesRead == sizeof(BITMAPFILEHEADER))
+ && (bmfh.bfType == *(WORD *)"BM"))
+ {
+ PBITMAPINFO pbmi;
+ DWORD InfoSize;
+
+ InfoSize = bmfh.bfOffBits - sizeof(BITMAPFILEHEADER);
+
+ pbmi = HeapAlloc(ProcessHeap,
+ 0,
+ InfoSize);
+ if (pbmi)
+ {
bSuccess = ReadFile(hFile,
- &bmfh,
- sizeof(BITMAPFILEHEADER),
+ pbmi,
+ InfoSize,
&BytesRead,
NULL);
- if ( bSuccess && (BytesRead == sizeof(BITMAPFILEHEADER))
- /* FIXME: Why is this failing?? */
- /*&& (bmfh.bfType == *(WORD *)_T("BM"))*/)
+ if (bSuccess && (BytesRead == InfoSize))
{
- InfoSize = bmfh.bfOffBits - sizeof(BITMAPFILEHEADER);
-
- pbmi = HeapAlloc(ProcessHeap,
- 0,
- InfoSize);
-
- bSuccess = ReadFile(hFile,
- pbmi,
- InfoSize,
- &BytesRead,
- NULL);
-
- if (bSuccess && (BytesRead == InfoSize))
+ PBYTE pBits;
+
+ Info->hBitmap = CreateDIBSection(NULL,
+ pbmi,
+ DIB_RGB_COLORS,
+ (VOID *)&pBits,
+ NULL,
+ 0);
+ if (Info->hBitmap != NULL)
{
- Info->hBitmap = CreateDIBSection(NULL,
- pbmi,
- DIB_RGB_COLORS,
- (VOID *)&pBits,
- NULL,
- 0);
- if (Info->hBitmap != NULL)
- {
- ReadFile(hFile,
- pBits,
- bmfh.bfSize - bmfh.bfOffBits,
- &BytesRead,
- NULL);
- }
- else
- {
- goto fail;
- }
- }
- else
- {
- goto fail;
+ ReadFile(hFile,
+ pBits,
+ bmfh.bfSize - bmfh.bfOffBits,
+ &BytesRead,
+ NULL);
+
+ /* get bitmap dimensions */
+ GetObject(Info->hBitmap,
+ sizeof(BITMAP),
+ &bitmap);
+
+ Info->Width = bitmap.bmWidth;
+ Info->Height = bitmap.bmHeight;
+
+ bRet = TRUE;
}
}
- else
- {
- if (! bSuccess)
- GetError(0);
-
- goto fail;
- }
-
- CloseHandle(hFile);
HeapFree(ProcessHeap,
0,
pbmi);
}
+ }
+ else if (!bSuccess)
+ {
+ GetError(0);
+ }
+
+ CloseHandle(hFile);
+
+ return bRet;
+}
+
+
+static BOOL
+InitEditWnd(PEDIT_WND_INFO Info)
+{
+ Info->Zoom = 100;
+
+ if (Info->OpenInfo != NULL)
+ {
+ HDC hDC;
+
+ if (Info->hDCMem)
+ {
+ DeleteObject(Info->hDCMem);
+ Info->hDCMem = NULL;
+ }
+
+ hDC = GetDC(Info->hSelf);
+ Info->hDCMem = CreateCompatibleDC(hDC);
+ ReleaseDC(Info->hSelf, hDC);
+
+ if (Info->OpenInfo->CreateNew)
+ {
+ LoadBlankCanvas(Info);
+ }
+ else
+ {
+ LoadDIBImage(Info);
+ }
Info->OpenInfo = NULL;
}
-
- /* get bitmap dimensions */
- GetObject(Info->hBitmap,
- sizeof(BITMAP),
- &bitmap);
-
- Info->Width = bitmap.bmWidth;
- Info->Height = bitmap.bmHeight;
EditWndUpdateScrollInfo(Info);
@@ -159,18 +175,6 @@
/* FIXME - if returning FALSE, remove the image editor from the list! */
return TRUE;
-
-
-fail:
- if (! hFile)
- CloseHandle(hFile);
-
- if (! pbmi)
- HeapFree(ProcessHeap,
- 0,
- pbmi);
-
- return FALSE;
}
static VOID
@@ -452,7 +456,7 @@
}
BOOL
-CreateImageEditWindow(struct _MAIN_WND_INFO *MainWnd,
+CreateImageEditWindow(PMAIN_WND_INFO MainWnd,
POPEN_IMAGE_EDIT_INFO OpenInfo)
{
PEDIT_WND_INFO Info;
Added: trunk/reactos/base/applications/imagesoft/imgedwnd.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/imagesof…
==============================================================================
--- trunk/reactos/base/applications/imagesoft/imgedwnd.h (added)
+++ trunk/reactos/base/applications/imagesoft/imgedwnd.h Wed Nov 15 02:15:02 2006
@@ -1,0 +1,92 @@
+#define MONOCHROMEBITS 1
+#define GREYSCALEBITS 8
+#define PALLETEBITS 8
+#define TRUECOLORBITS 24
+
+#define PIXELS 0
+#define CENTIMETERS 1
+#define INCHES 2
+
+
+/* generic definitions and forward declarations */
+struct _MAIN_WND_INFO;
+struct _EDIT_WND_INFO;
+
+
+typedef enum _MDI_EDITOR_TYPE {
+ metUnknown = 0,
+ metImageEditor,
+} MDI_EDITOR_TYPE, *PMDI_EDITOR_TYPE;
+
+typedef enum
+{
+ tSelect = 0,
+ tMove,
+ tLasso,
+ tZoom,
+ tMagicWand,
+ tBrush,
+ tEraser,
+ tPencil,
+ tColorPick,
+ tStamp,
+ tFill,
+ tLine,
+ tPolyline,
+ tRectangle,
+ tRoundRectangle,
+ tPolygon,
+ tElipse,
+} TOOL;
+
+typedef struct _OPEN_IMAGE_EDIT_INFO
+{
+ BOOL CreateNew;
+ union
+ {
+ struct
+ {
+ LONG Width;
+ LONG Height;
+ } New;
+ struct
+ {
+ LPTSTR lpImagePath;
+ } Open;
+ };
+ LPTSTR lpImageName;
+ USHORT Type;
+ LONG Resolution;
+} OPEN_IMAGE_EDIT_INFO, *POPEN_IMAGE_EDIT_INFO;
+
+typedef struct _EDIT_WND_INFO
+{
+ MDI_EDITOR_TYPE MdiEditorType; /* Must be first member! */
+
+ HWND hSelf;
+ HBITMAP hBitmap;
+ HDC hDCMem;
+ struct _MAIN_WND_INFO *MainWnd;
+ struct _EDIT_WND_INFO *Next;
+ POINT ScrollPos;
+ USHORT Zoom;
+ DWORD Tool;
+
+ POPEN_IMAGE_EDIT_INFO OpenInfo; /* Only valid during initialization */
+
+ /* Canvas properties */
+ USHORT Type;
+ LONG Resolution;
+ /* size of drawing area */
+ LONG Width;
+ LONG Height;
+
+} EDIT_WND_INFO, *PEDIT_WND_INFO;
+
+
+BOOL CreateImageEditWindow(struct _MAIN_WND_INFO *MainWnd,
+ POPEN_IMAGE_EDIT_INFO OpenInfo);
+VOID SetImageEditorEnvironment(PEDIT_WND_INFO Info,
+ BOOL Setup);
+BOOL InitImageEditWindowImpl(VOID);
+VOID UninitImageEditWindowImpl(VOID);
Modified: trunk/reactos/base/applications/imagesoft/lang/En.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/imagesof…
==============================================================================
--- trunk/reactos/base/applications/imagesoft/lang/En.rc (original)
+++ trunk/reactos/base/applications/imagesoft/lang/En.rc Wed Nov 15 02:15:02 2006
@@ -10,52 +10,57 @@
BEGIN
POPUP "&File"
BEGIN
- MENUITEM "&New...", ID_NEW
- MENUITEM "&Open...", ID_OPEN
- MENUITEM SEPARATOR
- MENUITEM "&Close\tCtrl+F4", ID_CLOSE, GRAYED
- MENUITEM "C&lose all", ID_CLOSEALL, GRAYED
- MENUITEM SEPARATOR
- MENUITEM "&Save", ID_SAVE, GRAYED
- MENUITEM "Save &As...", ID_SAVEAS, GRAYED
- MENUITEM SEPARATOR
- MENUITEM "Print Pre&view", ID_PRINTPRE, GRAYED
- MENUITEM "&Print...", ID_PRINT, GRAYED
- MENUITEM SEPARATOR
- MENUITEM "Pr&operties...", ID_PROP, GRAYED
- MENUITEM SEPARATOR
- MENUITEM "E&xit\tAlt+F4", ID_EXIT
+ MENUITEM "&New...", ID_NEW
+ MENUITEM "&Open...", ID_OPEN
+ MENUITEM SEPARATOR
+ MENUITEM "&Close\tCtrl+F4", ID_CLOSE, GRAYED
+ MENUITEM "C&lose all", ID_CLOSEALL,GRAYED
+ MENUITEM SEPARATOR
+ MENUITEM "&Save", ID_SAVE, GRAYED
+ MENUITEM "Save &As...", ID_SAVEAS, GRAYED
+ MENUITEM SEPARATOR
+ MENUITEM "Print Pre&view", ID_PRINTPRE,GRAYED
+ MENUITEM "&Print...", ID_PRINT, GRAYED
+ MENUITEM SEPARATOR
+ MENUITEM "Pr&operties...", ID_PROP, GRAYED
+ MENUITEM SEPARATOR
+ MENUITEM "E&xit\tAlt+F4", ID_EXIT
END
POPUP "&Edit"
BEGIN
- MENUITEM "&Undo", ID_UNDO, GRAYED
- MENUITEM "&Redo", ID_REDO, GRAYED
- MENUITEM SEPARATOR
- MENUITEM "Cu&t", ID_CUT, GRAYED
- MENUITEM "&Copy", ID_COPY, GRAYED
- MENUITEM "&Paste", ID_PASTE, GRAYED
+ MENUITEM "&Undo", ID_UNDO, GRAYED
+ MENUITEM "&Redo", ID_REDO, GRAYED
+ MENUITEM SEPARATOR
+ MENUITEM "Cu&t", ID_CUT, GRAYED
+ MENUITEM "&Copy", ID_COPY, GRAYED
+ MENUITEM "&Paste", ID_PASTE, GRAYED
MENUITEM "Paste as new &image", ID_PASTENEWIMAGE, GRAYED
MENUITEM SEPARATOR
- MENUITEM "Select &All", ID_SELALL, GRAYED
+ MENUITEM "Select &All", ID_SELALL, GRAYED
END
POPUP "&View"
BEGIN
- MENUITEM "&Tools", ID_TOOLS
- MENUITEM "&Colors", ID_COLOR
- MENUITEM "&History", ID_HISTORY
- MENUITEM "&Status Bar", ID_STATUSBAR
- END
- POPUP "&Image"
- BEGIN
- MENUITEM "&Crop...", -1, GRAYED
- MENUITEM "&Resize...", -1, GRAYED
- MENUITEM "R&otate...", -1, GRAYED
- MENUITEM "&Flip...", -1, GRAYED
- MENUITEM "&Stretch...", -1, GRAYED
- MENUITEM "S&kew...", -1, GRAYED
- MENUITEM "&Invert Colors", -1, GRAYED
- MENUITEM SEPARATOR
- MENUITEM "&Attributes...", -1, GRAYED
+ MENUITEM "&Tools", ID_TOOLS
+ MENUITEM "&Colors", ID_COLOR
+ MENUITEM "&History", ID_HISTORY
+ MENUITEM "&Status Bar", ID_STATUSBAR
+ END
+ POPUP "&Adjust"
+ BEGIN
+ MENUITEM "Brightness...", ID_BRIGHTNESS
+ MENUITEM "Contrast...", -1, GRAYED
+ MENUITEM "Hue/Saturation...", -1, GRAYED
+ MENUITEM SEPARATOR
+ MENUITEM "Blur", -1, GRAYED
+ MENUITEM "Sharpen", -1, GRAYED
+ MENUITEM "Smooth Edges", -1, GRAYED
+ MENUITEM "Add Shadow", -1, GRAYED
+ MENUITEM SEPARATOR
+ MENUITEM "Image Size...", -1, GRAYED
+ MENUITEM "Flip", -1, GRAYED
+ MENUITEM "Mirror", -1, GRAYED
+ MENUITEM "Rotate", -1, GRAYED
+
END
POPUP "&Colors"
BEGIN
@@ -87,16 +92,34 @@
END
+IDD_BRIGHTNESS DIALOGEX 6, 5, 193, 120
+CAPTION "Brightness"
+FONT 8,"MS Sans Serif", 0, 0
+STYLE WS_BORDER | WS_DLGFRAME | WS_SYSMENU | DS_MODALFRAME
+BEGIN
+ LTEXT "", IDC_PICPREVIEW, 0, 1, 132, 96, SS_OWNERDRAW | SS_SUNKEN
+ LTEXT "Color form:", IDC_STATIC, 135, 5, 36, 9
+ GROUPBOX "", IDC_BRI_GROUP, 138 ,30, 50, 48
+ CONTROL "Full (RGB)", IDC_BRI_FULL, "Button",
BS_AUTORADIOBUTTON, 138, 18, 46, 9
+ CONTROL "Red", IDC_BRI_RED, "Button", BS_AUTORADIOBUTTON, 142,
38, 42, 9
+ CONTROL "Green", IDC_BRI_GREEN, "Button", BS_AUTORADIOBUTTON,
142, 51, 42, 9
+ CONTROL "Blue", IDC_BRI_BLUE, "Button", BS_AUTORADIOBUTTON, 142,
64, 42, 9
+ EDITTEXT IDC_BRI_EDIT, 98, 103, 28, 13
+ CONTROL "", IDC_BRI_TRACKBAR, "msctls_trackbar32", TBS_BOTH |
TBS_NOTICKS | WS_TABSTOP, 2, 105, 90, 11
+ PUSHBUTTON "OK", IDOK, 142, 88, 48, 13
+ PUSHBUTTON "Cancel", IDCANCEL, 142, 105, 48, 13
+END
+
IDD_ABOUTBOX DIALOGEX 22,16,210,182
CAPTION "About ImageSoft"
-FONT 8,"Tahoma",0,0
+FONT 8,"MS Sans Serif",0,0
STYLE WS_BORDER | WS_DLGFRAME | WS_SYSMENU | DS_MODALFRAME
//EXSTYLE WS_EX_LAYERED
BEGIN
- LTEXT "ImageSoft v0.1\nCopyright (C) 2006\nThomas Weidenmueller
(w3seek(a)reactos.org)\nGed Murphy (gedmurphy(a)gmail.com)"quot;, IDC_STATIC, 48, 7, 150, 36
+ LTEXT "ImageSoft v0.1\nCopyright (C) 2006\nThomas Weidenmueller
(w3seek(a)reactos.org)\nGed Murphy (gedmurphy(a)gmail.com)"quot;, IDC_STATIC, 48, 7, 150, 36
PUSHBUTTON "Close", IDOK, 75, 162, 44, 15
- ICON IDI_IMAGESOFTICON, IDC_STATIC, 10, 10, 7, 30
- EDITTEXT IDC_LICENSE_EDIT, 8, 44, 194, 107, WS_VISIBLE | WS_VSCROLL | WS_TABSTOP |
ES_READONLY | ES_MULTILINE
+ ICON IDI_IMAGESOFTICON, IDC_STATIC, 10, 10, 7, 30
+ EDITTEXT IDC_LICENSE_EDIT, 8, 44, 194, 107, WS_VISIBLE | WS_VSCROLL | WS_TABSTOP |
ES_READONLY | ES_MULTILINE
END
@@ -105,24 +128,24 @@
FONT 8,"MS Sans Serif",0,0
STYLE WS_BORDER | WS_DLGFRAME | WS_SYSMENU | DS_MODALFRAME
BEGIN
- LTEXT "Name:", IDC_STATIC, 12, 5, 38, 9
- EDITTEXT IDC_IMAGE_NAME_EDIT, 58, 3, 94, 13, WS_CHILD | WS_VISIBLE | WS_TABSTOP
- GROUPBOX "Canvas properties", IDC_STATIC, 4, 22, 148, 98
- LTEXT "Image type:", IDC_STATIC, 12, 36, 42, 9
- CONTROL "", IDC_IMAGETYPE, "ComboBox", WS_CHILD | WS_VISIBLE |
WS_TABSTOP | CBS_DROPDOWNLIST, 58, 35, 88, 54
- LTEXT "Width:", IDC_STATIC, 12, 51, 42, 9
- EDITTEXT IDC_WIDTH_EDIT, 58, 49, 32, 13, WS_CHILD | WS_VISIBLE | WS_TABSTOP |
ES_NUMBER
- LTEXT "", IDC_WIDTH_STAT, 94, 51, 40, 9
- LTEXT "Height:", IDC_STATIC, 12, 68, 42, 9
- EDITTEXT IDC_HEIGHT_EDIT, 58, 66, 32, 13, WS_CHILD | WS_VISIBLE | WS_TABSTOP |
ES_NUMBER
- LTEXT "", IDC_HEIGHT_STAT, 94, 68, 40, 9
- LTEXT "Resolution:", IDC_STATIC, 12, 84, 42, 9
- EDITTEXT IDC_RES_EDIT, 58, 83, 32, 13, WS_CHILD | WS_VISIBLE | WS_TABSTOP | ES_NUMBER
- LTEXT "", IDC_RES_STAT, 94, 84, 40, 9
- LTEXT "Unit:", IDC_STATIC, 12, 99, 42, 9
- CONTROL "", IDC_UNIT, "ComboBox", WS_CHILD | WS_VISIBLE |
WS_TABSTOP | CBS_DROPDOWNLIST, 58, 99, 54, 50
- LTEXT "Image size:", IDC_STATIC, 12, 125, 42, 9
- LTEXT "", IDC_IMAGE_SIZE, 58, 125, 54, 9
+ LTEXT "Name:", IDC_STATIC, 12, 5, 38, 9
+ EDITTEXT IDC_IMAGE_NAME_EDIT, 58, 3, 94, 13, WS_CHILD | WS_VISIBLE | WS_TABSTOP
+ GROUPBOX "Canvas properties", IDC_STATIC, 4, 22, 148, 98
+ LTEXT "Image type:", IDC_STATIC, 12, 36, 42, 9
+ CONTROL "", IDC_IMAGETYPE, "ComboBox", WS_CHILD | WS_VISIBLE |
WS_TABSTOP | CBS_DROPDOWNLIST, 58, 35, 88, 54
+ LTEXT "Width:", IDC_STATIC, 12, 51, 42, 9
+ EDITTEXT IDC_WIDTH_EDIT, 58, 49, 32, 13, WS_CHILD | WS_VISIBLE | WS_TABSTOP |
ES_NUMBER
+ LTEXT "", IDC_WIDTH_STAT, 94, 51, 40, 9
+ LTEXT "Height:", IDC_STATIC, 12, 68, 42, 9
+ EDITTEXT IDC_HEIGHT_EDIT, 58, 66, 32, 13, WS_CHILD | WS_VISIBLE | WS_TABSTOP |
ES_NUMBER
+ LTEXT "", IDC_HEIGHT_STAT, 94, 68, 40, 9
+ LTEXT "Resolution:", IDC_STATIC, 12, 84, 42, 9
+ EDITTEXT IDC_RES_EDIT, 58, 83, 32, 13, WS_CHILD | WS_VISIBLE | WS_TABSTOP |
ES_NUMBER
+ LTEXT "", IDC_RES_STAT, 94, 84, 40, 9
+ LTEXT "Unit:", IDC_STATIC, 12, 99, 42, 9
+ CONTROL "", IDC_UNIT, "ComboBox", WS_CHILD | WS_VISIBLE |
WS_TABSTOP | CBS_DROPDOWNLIST, 58, 99, 54, 50
+ LTEXT "Image size:", IDC_STATIC, 12, 125, 42, 9
+ LTEXT "", IDC_IMAGE_SIZE, 58, 125, 54, 9
PUSHBUTTON "OK", IDOK, 50, 144, 48, 13
PUSHBUTTON "Cancel", IDCANCEL, 102, 144, 48, 13
END
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 Wed Nov 15 02:15:02 2006
@@ -817,49 +817,8 @@
{
case ID_NEW:
{
- OPEN_IMAGE_EDIT_INFO OpenInfo;
- PIMAGE_PROP ImageProp = NULL;
-
- ImageProp = HeapAlloc(ProcessHeap,
- 0,
- sizeof(IMAGE_PROP));
- if (ImageProp == NULL)
- break;
-
- /* load the properties dialog */
- if (DialogBoxParam(hInstance,
- MAKEINTRESOURCE(IDD_IMAGE_PROP),
- Info->hSelf,
- ImagePropDialogProc,
- (LPARAM)ImageProp))
- {
- /* if an image name isn't provided, load a default name */
- if (! ImageProp->lpImageName)
- LoadAndFormatString(hInstance,
- IDS_IMAGE_NAME,
- &OpenInfo.lpImageName,
- ++Info->ImagesCreated);
- else
- OpenInfo.lpImageName = ImageProp->lpImageName;
-
- OpenInfo.CreateNew = TRUE;
- OpenInfo.Type = ImageProp->Type;
- OpenInfo.Resolution = ImageProp->Resolution;
- OpenInfo.New.Width = ImageProp->Width;
- OpenInfo.New.Height = ImageProp->Height;
-
- HeapFree(ProcessHeap,
- 0,
- ImageProp);
-
- CreateImageEditWindow(Info,
- &OpenInfo);
- }
- }
- break;
-
- case ID_BOLD:
- MessageBox(NULL, _T("Bingo"), NULL, 0);
+ MessageBox(NULL, _T("Not yet implemented"), NULL, 0);
+ }
break;
case ID_OPEN:
@@ -938,6 +897,14 @@
}
}
break;
+
+ case ID_BRIGHTNESS:
+ DialogBoxParam(hInstance,
+ MAKEINTRESOURCE(IDD_BRIGHTNESS),
+ Info->hSelf,
+ BrightnessProc,
+ (LPARAM)Info);
+ break;
case ID_EXIT:
SendMessage(Info->hSelf,
Added: trunk/reactos/base/applications/imagesoft/mainwnd.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/imagesof…
==============================================================================
--- trunk/reactos/base/applications/imagesoft/mainwnd.h (added)
+++ trunk/reactos/base/applications/imagesoft/mainwnd.h Wed Nov 15 02:15:02 2006
@@ -1,0 +1,41 @@
+
+typedef struct _MENU_HINT
+{
+ WORD CmdId;
+ UINT HintId;
+} MENU_HINT, *PMENU_HINT;
+
+typedef struct _MAIN_WND_INFO
+{
+ HWND hSelf;
+ HWND hMdiClient;
+ HWND hStatus;
+ int nCmdShow;
+
+ struct _FLT_WND *fltTools;
+ struct _FLT_WND *fltColors;
+ struct _FLT_WND *fltHistory;
+
+ struct _TOOLBAR_DOCKS ToolDocks;
+
+ /* Editors */
+ PEDIT_WND_INFO ImageEditors;
+ UINT ImagesCreated;
+
+ PVOID ActiveEditor;
+
+ /* status flags */
+ BOOL InMenuLoop : 1;
+} MAIN_WND_INFO, *PMAIN_WND_INFO;
+
+BOOL InitMainWindowImpl(VOID);
+VOID UninitMainWindowImpl(VOID);
+HWND CreateMainWindow(LPCTSTR lpCaption,
+ int nCmdShow);
+BOOL MainWndTranslateMDISysAccel(HWND hwnd,
+ LPMSG lpMsg);
+VOID MainWndSwitchEditorContext(PMAIN_WND_INFO Info,
+ HWND hDeactivate,
+ HWND hActivate);
+MDI_EDITOR_TYPE MainWndGetCurrentEditor(PMAIN_WND_INFO MainWnd,
+ PVOID *Info);
Modified: trunk/reactos/base/applications/imagesoft/misc.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/imagesof…
==============================================================================
--- trunk/reactos/base/applications/imagesoft/misc.c (original)
+++ trunk/reactos/base/applications/imagesoft/misc.c Wed Nov 15 02:15:02 2006
@@ -249,10 +249,10 @@
0,
0) & CCS_VERT) != 0);
- nButtons = SendMessage(hWndToolbar,
- TB_BUTTONCOUNT,
- 0,
- 0);
+ nButtons = (DWORD)SendMessage(hWndToolbar,
+ TB_BUTTONCOUNT,
+ 0,
+ 0);
for (i = 0;
i != nButtons;
@@ -376,7 +376,8 @@
{
HBITMAP hBitmap;
HIMAGELIST hImageList;
- INT i, k, Ret;
+ UINT i, k;
+ INT Ret;
/* Create the toolbar icon image list */
Added: trunk/reactos/base/applications/imagesoft/misc.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/imagesof…
==============================================================================
--- trunk/reactos/base/applications/imagesoft/misc.h (added)
+++ trunk/reactos/base/applications/imagesoft/misc.h Wed Nov 15 02:15:02 2006
@@ -1,0 +1,44 @@
+
+INT AllocAndLoadString(OUT LPTSTR *lpTarget,
+ IN HINSTANCE hInst,
+ IN UINT uID);
+
+DWORD LoadAndFormatString(IN HINSTANCE hInstance,
+ IN UINT uID,
+ OUT LPTSTR *lpTarget,
+ ...);
+
+BOOL StatusBarLoadAndFormatString(IN HWND hStatusBar,
+ IN INT PartId,
+ IN HINSTANCE hInstance,
+ IN UINT uID,
+ ...);
+
+BOOL StatusBarLoadString(IN HWND hStatusBar,
+ IN INT PartId,
+ IN HINSTANCE hInstance,
+ IN UINT uID);
+
+INT GetTextFromEdit(OUT LPTSTR lpString,
+ IN HWND hDlg,
+ IN UINT Res);
+
+VOID GetError(DWORD err);
+
+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);
+
+HIMAGELIST InitImageList(UINT NumButtons,
+ UINT StartResource);
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 Wed Nov 15 02:15:02 2006
@@ -3,26 +3,16 @@
//#define WIN32_LEAN_AND_MEAN
#include <windows.h>
-#include <windowsx.h> /* GET_X/Y_LPARAM */
+#include <windowsx.h>
#include <stdio.h>
#include <tchar.h>
#include <commctrl.h>
#include "resource.h"
-/* FIXME - add to headers !!! */
-#ifndef SB_SIMPLEID
-#define SB_SIMPLEID 0xFF
-#endif
-#ifndef RBBS_USECHEVRON
-#define RBBS_USECHEVRON 0x200
-#endif
-#ifndef RBN_CHEVRONPUSHED
-#define RBN_CHEVRONPUSHED (RBN_FIRST - 10)
-#endif
-
-#ifdef _MSC_VER
-#pragma warning(disable : 4100)
-#endif
+#include "tooldock.h"
+#include "imgedwnd.h"
+#include "mainwnd.h"
+#include "misc.h"
#define MAX_KEY_LENGTH 256
#define NUM_MAINTB_IMAGES 10
@@ -33,28 +23,8 @@
#define COLORS 1
#define HISTORY 2
-#define MONOCHROMEBITS 1
-#define GREYSCALEBITS 8
-#define PALLETEBITS 8
-#define TRUECOLORBITS 24
-
-#define PIXELS 0
-#define CENTIMETERS 1
-#define INCHES 2
-
-#ifdef _MSC_VER
-#pragma warning(disable : 4100)
-#endif
-
-/* generic definitions and forward declarations */
-struct _MAIN_WND_INFO;
-struct _EDIT_WND_INFO;
-struct _FLT_WND;
-
-typedef enum _MDI_EDITOR_TYPE {
- metUnknown = 0,
- metImageEditor,
-} MDI_EDITOR_TYPE, *PMDI_EDITOR_TYPE;
+extern HINSTANCE hInstance;
+extern HANDLE ProcessHeap;
/* about.c */
INT_PTR CALLBACK AboutDialogProc(HWND hDlg,
@@ -63,306 +33,14 @@
LPARAM lParam);
/* imageprop.c */
-typedef struct _IMAGE_PROP
-{
- LPTSTR lpImageName;
- /* Canvas properties */
- USHORT Type;
- USHORT Unit;
- LONG Resolution;
- /* size of drawing area */
- LONG Width;
- LONG Height;
-} IMAGE_PROP, *PIMAGE_PROP;
-
-INT_PTR CALLBACK
-ImagePropDialogProc(HWND hDlg,
- UINT message,
- WPARAM wParam,
- LPARAM lParam);
-
-
-/* imagesoft.c */
-extern HINSTANCE hInstance;
-extern HANDLE ProcessHeap;
-
-/* imgedwnd.c */
-typedef enum
-{
- tSelect = 0,
- tMove,
- tLasso,
- tZoom,
- tMagicWand,
- tBrush,
- tEraser,
- tPencil,
- tColorPick,
- tStamp,
- tFill,
- tLine,
- tPolyline,
- tRectangle,
- tRoundRectangle,
- tPolygon,
- tElipse,
-} TOOL;
-
-typedef struct _OPEN_IMAGE_EDIT_INFO
-{
- BOOL CreateNew;
- union
- {
- struct
- {
- LONG Width;
- LONG Height;
- } New;
- struct
- {
- LPTSTR lpImagePath;
- } Open;
- };
- LPTSTR lpImageName;
- USHORT Type;
- LONG Resolution;
-} OPEN_IMAGE_EDIT_INFO, *POPEN_IMAGE_EDIT_INFO;
-
-typedef struct _EDIT_WND_INFO
-{
- MDI_EDITOR_TYPE MdiEditorType; /* Must be first member! */
-
- HWND hSelf;
- HBITMAP hBitmap;
- HDC hDCMem;
- struct _MAIN_WND_INFO *MainWnd;
- struct _EDIT_WND_INFO *Next;
- POINT ScrollPos;
- USHORT Zoom;
- DWORD Tool;
-
- POPEN_IMAGE_EDIT_INFO OpenInfo; /* Only valid during initialization */
-
- /* Canvas properties */
- USHORT Type;
- LONG Resolution;
- /* size of drawing area */
- LONG Width;
- LONG Height;
-
-} EDIT_WND_INFO, *PEDIT_WND_INFO;
-
-
-BOOL CreateImageEditWindow(struct _MAIN_WND_INFO *MainWnd,
- POPEN_IMAGE_EDIT_INFO OpenInfo);
-VOID SetImageEditorEnvironment(PEDIT_WND_INFO Info,
- BOOL Setup);
-BOOL InitImageEditWindowImpl(VOID);
-VOID UninitImageEditWindowImpl(VOID);
-
-
-/* tooldock.c */
-typedef enum
-{
- TOP_DOCK = 0,
- LEFT_DOCK,
- RIGHT_DOCK,
- BOTTOM_DOCK,
- NO_DOCK
-} DOCK_POSITION;
-
-typedef struct _DOCKBAR
-{
- UINT BarId;
- LPCTSTR lpName;
- UINT DisplayTextId;
- DOCK_POSITION Position;
-} DOCKBAR, *PDOCKBAR;
-
-struct _TOOLBAR_DOCKS;
-
-typedef BOOL (CALLBACK *PDOCKBAR_CREATECLIENT)(struct _TOOLBAR_DOCKS *TbDocks,
- const DOCKBAR *Dockbar,
- PVOID Context,
- HWND hParent,
- HWND *hwnd);
-typedef BOOL (CALLBACK *PDOCKBAR_DESTROYCLIENT)(struct _TOOLBAR_DOCKS *TbDocks,
- const DOCKBAR *Dockbar,
- PVOID Context,
- HWND hwnd);
-typedef BOOL (CALLBACK *PDOCKBAR_INSERTBAND)(struct _TOOLBAR_DOCKS *TbDocks,
- const DOCKBAR *Dockbar,
- PVOID Context,
- UINT *Index,
- LPREBARBANDINFO rbi);
-typedef VOID (CALLBACK *PDOCKBAR_DOCKBAND)(struct _TOOLBAR_DOCKS *TbDocks,
- const DOCKBAR *Dockbar,
- PVOID Context,
- DOCK_POSITION DockFrom,
- DOCK_POSITION DockTo,
- LPREBARBANDINFO rbi);
-typedef VOID (CALLBACK *PDOCKBAR_CHEVRONPUSHED)(struct _TOOLBAR_DOCKS *TbDocks,
- const DOCKBAR *Dockbar,
- PVOID Context,
- HWND hwndChild,
- LPNMREBARCHEVRON lpnm);
-
-typedef struct _DOCKBAR_ITEM_CALLBACKS
-{
- PDOCKBAR_CREATECLIENT CreateClient;
- PDOCKBAR_DESTROYCLIENT DestroyClient;
- PDOCKBAR_INSERTBAND InsertBand;
- PDOCKBAR_DOCKBAND DockBand;
- PDOCKBAR_CHEVRONPUSHED ChevronPushed;
-} DOCKBAR_ITEM_CALLBACKS, *PDOCKBAR_ITEM_CALLBACKS;
-
-typedef struct _DOCKBAR_ITEM
-{
- struct _DOCKBAR_ITEM *Next;
- DOCKBAR DockBar;
- PVOID Context;
- HWND hWndTool;
- HWND hWndClient;
- DOCK_POSITION PrevDock;
- UINT PrevBandIndex;
- const DOCKBAR_ITEM_CALLBACKS *Callbacks;
-} DOCKBAR_ITEM, *PDOCKBAR_ITEM;
-
-typedef VOID (CALLBACK *PDOCKBAR_PARENTRESIZE)(PVOID Context,
- WORD cx,
- WORD cy);
-
-#define DOCKS_COUNT 4
-typedef struct _TOOLBAR_DOCKS
-{
- HWND hParent;
- PVOID Context;
- HWND hRebar[DOCKS_COUNT];
- RECT rcRebar[DOCKS_COUNT];
- RECT rcClient;
- PDOCKBAR_ITEM Items;
- PDOCKBAR_PARENTRESIZE ParentResize;
- PDOCKBAR_ITEM Dragging;
- UINT DraggingBandId;
- TCHAR szTempText[255];
-} TOOLBAR_DOCKS, *PTOOLBAR_DOCKS;
-
-VOID TbdInitializeDocks(PTOOLBAR_DOCKS TbDocks,
- HWND hWndParent,
- PVOID Context,
- PDOCKBAR_PARENTRESIZE ParentResizeProc);
-INT TbdAdjustUpdateClientRect(PTOOLBAR_DOCKS TbDocks,
- PRECT rcClient);
-HDWP TbdDeferDocks(HDWP hWinPosInfo,
- PTOOLBAR_DOCKS TbDocks);
-BOOL TbdAddToolbar(PTOOLBAR_DOCKS TbDocks,
- 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);
-VOID TbdHandleEnabling(PTOOLBAR_DOCKS TbDocks,
- HWND hWnd,
- BOOL Enable);
-VOID TbdHandleActivation(PTOOLBAR_DOCKS TbDocks,
- HWND hWnd,
- WPARAM *wParam,
- LPARAM *lParam);
-VOID TbdShowFloatingToolbars(PTOOLBAR_DOCKS TbDocks,
- BOOL Show);
-BOOL TbdInitImpl(VOID);
-VOID TbdUninitImpl(VOID);
-
-/* mainwnd.c */
-typedef struct _MENU_HINT
-{
- WORD CmdId;
- UINT HintId;
-} MENU_HINT, *PMENU_HINT;
-
-typedef struct _MAIN_WND_INFO
-{
- HWND hSelf;
- HWND hMdiClient;
- HWND hStatus;
- int nCmdShow;
-
- struct _FLT_WND *fltTools;
- struct _FLT_WND *fltColors;
- struct _FLT_WND *fltHistory;
-
- TOOLBAR_DOCKS ToolDocks;
-
- /* Editors */
- PEDIT_WND_INFO ImageEditors;
- UINT ImagesCreated;
-
- PVOID ActiveEditor;
-
- /* status flags */
- BOOL InMenuLoop : 1;
-} MAIN_WND_INFO, *PMAIN_WND_INFO;
-
-BOOL InitMainWindowImpl(VOID);
-VOID UninitMainWindowImpl(VOID);
-HWND CreateMainWindow(LPCTSTR lpCaption,
- int nCmdShow);
-BOOL MainWndTranslateMDISysAccel(HWND hwnd,
- LPMSG lpMsg);
-VOID MainWndSwitchEditorContext(PMAIN_WND_INFO Info,
- HWND hDeactivate,
- HWND hActivate);
-MDI_EDITOR_TYPE MainWndGetCurrentEditor(PMAIN_WND_INFO MainWnd,
- PVOID *Info);
-
-/* misc.c */
-INT AllocAndLoadString(OUT LPTSTR *lpTarget,
- IN HINSTANCE hInst,
- IN UINT uID);
-
-DWORD LoadAndFormatString(IN HINSTANCE hInstance,
- IN UINT uID,
- OUT LPTSTR *lpTarget,
- ...);
-
-BOOL StatusBarLoadAndFormatString(IN HWND hStatusBar,
- IN INT PartId,
- IN HINSTANCE hInstance,
- IN UINT uID,
- ...);
-
-BOOL StatusBarLoadString(IN HWND hStatusBar,
- IN INT PartId,
- IN HINSTANCE hInstance,
- IN UINT uID);
-
-INT GetTextFromEdit(OUT LPTSTR lpString,
- IN HWND hDlg,
- IN UINT Res);
-
-VOID GetError(DWORD err);
-
-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);
-
-HIMAGELIST InitImageList(UINT NumButtons,
- UINT StartResource);
+INT_PTR CALLBACK ImagePropDialogProc(HWND hDlg,
+ UINT message,
+ WPARAM wParam,
+ LPARAM lParam);
+INT_PTR CALLBACK BrightnessProc(HWND hDlg,
+ UINT message,
+ WPARAM wParam,
+ LPARAM lParam);
/* opensave.c */
VOID FileInitialize(HWND hwnd);
Modified: trunk/reactos/base/applications/imagesoft/resource.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/imagesof…
==============================================================================
--- trunk/reactos/base/applications/imagesoft/resource.h (original)
+++ trunk/reactos/base/applications/imagesoft/resource.h Wed Nov 15 02:15:02 2006
@@ -78,7 +78,10 @@
#define ID_TEXT 2068
#define ID_ZOOM 2069
-#define ID_ABOUT 2100
+/* Adjust */
+#define ID_BRIGHTNESS 2100
+
+#define ID_ABOUT 2400
#define ID_REFRESH 3000
#define ID_HELP 3001
@@ -240,6 +243,17 @@
/* DIALOGS */
+#define IDC_PICPREVIEW 2999
+
+/* brightness dialog */
+#define IDD_BRIGHTNESS 3000
+#define IDC_BRI_GROUP 3001
+#define IDC_BRI_FULL 3002
+#define IDC_BRI_RED 3003
+#define IDC_BRI_GREEN 3004
+#define IDC_BRI_BLUE 3005
+#define IDC_BRI_EDIT 3006
+#define IDC_BRI_TRACKBAR 3007
/* image property dialog */
#define IDD_IMAGE_PROP 4000
Added: trunk/reactos/base/applications/imagesoft/tooldock.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/imagesof…
==============================================================================
--- trunk/reactos/base/applications/imagesoft/tooldock.h (added)
+++ trunk/reactos/base/applications/imagesoft/tooldock.h Wed Nov 15 02:15:02 2006
@@ -1,0 +1,115 @@
+
+typedef enum
+{
+ TOP_DOCK = 0,
+ LEFT_DOCK,
+ RIGHT_DOCK,
+ BOTTOM_DOCK,
+ NO_DOCK
+} DOCK_POSITION;
+
+typedef struct _DOCKBAR
+{
+ UINT BarId;
+ LPCTSTR lpName;
+ UINT DisplayTextId;
+ DOCK_POSITION Position;
+} DOCKBAR, *PDOCKBAR;
+
+struct _TOOLBAR_DOCKS;
+
+typedef BOOL (CALLBACK *PDOCKBAR_CREATECLIENT)(struct _TOOLBAR_DOCKS *TbDocks,
+ const DOCKBAR *Dockbar,
+ PVOID Context,
+ HWND hParent,
+ HWND *hwnd);
+typedef BOOL (CALLBACK *PDOCKBAR_DESTROYCLIENT)(struct _TOOLBAR_DOCKS *TbDocks,
+ const DOCKBAR *Dockbar,
+ PVOID Context,
+ HWND hwnd);
+typedef BOOL (CALLBACK *PDOCKBAR_INSERTBAND)(struct _TOOLBAR_DOCKS *TbDocks,
+ const DOCKBAR *Dockbar,
+ PVOID Context,
+ UINT *Index,
+ LPREBARBANDINFO rbi);
+typedef VOID (CALLBACK *PDOCKBAR_DOCKBAND)(struct _TOOLBAR_DOCKS *TbDocks,
+ const DOCKBAR *Dockbar,
+ PVOID Context,
+ DOCK_POSITION DockFrom,
+ DOCK_POSITION DockTo,
+ LPREBARBANDINFO rbi);
+typedef VOID (CALLBACK *PDOCKBAR_CHEVRONPUSHED)(struct _TOOLBAR_DOCKS *TbDocks,
+ const DOCKBAR *Dockbar,
+ PVOID Context,
+ HWND hwndChild,
+ LPNMREBARCHEVRON lpnm);
+
+typedef struct _DOCKBAR_ITEM_CALLBACKS
+{
+ PDOCKBAR_CREATECLIENT CreateClient;
+ PDOCKBAR_DESTROYCLIENT DestroyClient;
+ PDOCKBAR_INSERTBAND InsertBand;
+ PDOCKBAR_DOCKBAND DockBand;
+ PDOCKBAR_CHEVRONPUSHED ChevronPushed;
+} DOCKBAR_ITEM_CALLBACKS, *PDOCKBAR_ITEM_CALLBACKS;
+
+typedef struct _DOCKBAR_ITEM
+{
+ struct _DOCKBAR_ITEM *Next;
+ DOCKBAR DockBar;
+ PVOID Context;
+ HWND hWndTool;
+ HWND hWndClient;
+ DOCK_POSITION PrevDock;
+ UINT PrevBandIndex;
+ const DOCKBAR_ITEM_CALLBACKS *Callbacks;
+} DOCKBAR_ITEM, *PDOCKBAR_ITEM;
+
+typedef VOID (CALLBACK *PDOCKBAR_PARENTRESIZE)(PVOID Context,
+ WORD cx,
+ WORD cy);
+
+#define DOCKS_COUNT 4
+typedef struct _TOOLBAR_DOCKS
+{
+ HWND hParent;
+ PVOID Context;
+ HWND hRebar[DOCKS_COUNT];
+ RECT rcRebar[DOCKS_COUNT];
+ RECT rcClient;
+ PDOCKBAR_ITEM Items;
+ PDOCKBAR_PARENTRESIZE ParentResize;
+ PDOCKBAR_ITEM Dragging;
+ UINT DraggingBandId;
+ TCHAR szTempText[255];
+} TOOLBAR_DOCKS, *PTOOLBAR_DOCKS;
+
+VOID TbdInitializeDocks(PTOOLBAR_DOCKS TbDocks,
+ HWND hWndParent,
+ PVOID Context,
+ PDOCKBAR_PARENTRESIZE ParentResizeProc);
+INT TbdAdjustUpdateClientRect(PTOOLBAR_DOCKS TbDocks,
+ PRECT rcClient);
+HDWP TbdDeferDocks(HDWP hWinPosInfo,
+ PTOOLBAR_DOCKS TbDocks);
+BOOL TbdAddToolbar(PTOOLBAR_DOCKS TbDocks,
+ 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);
+VOID TbdHandleEnabling(PTOOLBAR_DOCKS TbDocks,
+ HWND hWnd,
+ BOOL Enable);
+VOID TbdHandleActivation(PTOOLBAR_DOCKS TbDocks,
+ HWND hWnd,
+ WPARAM *wParam,
+ LPARAM *lParam);
+VOID TbdShowFloatingToolbars(PTOOLBAR_DOCKS TbDocks,
+ BOOL Show);
+BOOL TbdInitImpl(VOID);
+VOID TbdUninitImpl(VOID);