ReactOS 0.4.15-dev-6669-g8227c5d
dialogs.cpp
Go to the documentation of this file.
1/*
2 * PROJECT: PAINT for ReactOS
3 * LICENSE: LGPL-2.0-or-later (https://spdx.org/licenses/LGPL-2.0-or-later)
4 * PURPOSE: Window procedures of the dialog windows plus launching functions
5 * COPYRIGHT: Copyright 2015 Benedikt Freisen <b.freisen@gmx.net>
6 */
7
8/* INCLUDES *********************************************************/
9
10#include "precomp.h"
11
12#include "dialogs.h"
13
14#include <winnls.h>
15
16/* GLOBALS **********************************************************/
17
22
23/* FUNCTIONS ********************************************************/
24
25void ShowError(INT stringID, ...)
26{
27 va_list va;
28 va_start(va, stringID);
29
30 CStringW strFormat, strText;
31 strFormat.LoadString(stringID);
32 strText.FormatV(strFormat, va);
33
34 CStringW strProgramName;
35 strProgramName.LoadString(IDS_PROGRAMNAME);
36
37 mainWindow.MessageBox(strText, strProgramName, MB_ICONERROR);
38 va_end(va);
39}
40
42{
45 return TRUE;
46}
47
49{
50 EndDialog(0);
51 return 0;
52}
53
54LRESULT CMirrorRotateDialog::OnOk(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled)
55{
57 EndDialog(1);
59 EndDialog(2);
61 EndDialog(3);
63 EndDialog(4);
65 EndDialog(5);
66 return 0;
67}
68
69LRESULT CMirrorRotateDialog::OnCancel(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled)
70{
71 EndDialog(0);
72 return 0;
73}
74
75LRESULT CMirrorRotateDialog::OnRadioButton3(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled)
76{
78 return 0;
79
83 return 0;
84}
85
86LRESULT CMirrorRotateDialog::OnRadioButton12(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled)
87{
90 {
91 return 0;
92 }
93
97 return 0;
98}
99
101{
104
108
111 else
113
114 if (g_isAFile)
115 {
116 TCHAR date[100];
117 TCHAR temp[100];
120 _tcscat(date, _T(" "));
121 _tcscat(date, temp);
122 CString strSize;
126 }
127
128 CString strUnit;
130
131 CString strRes;
132 if (strUnit == L"dpi")
134 else
136
138 return TRUE;
139}
140
142{
143 EndDialog(0);
144 return 0;
145}
146
147LRESULT CAttributesDialog::OnOk(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled)
148{
150 EndDialog(1);
151 return 0;
152}
153
154LRESULT CAttributesDialog::OnCancel(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled)
155{
156 EndDialog(0);
157 return 0;
158}
159
160LRESULT CAttributesDialog::OnDefault(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled)
161{
168 return 0;
169}
170
171LRESULT CAttributesDialog::OnRadioButton1(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled)
172{
174 return 0;
175
176 CString strNum;
177 strNum.Format(_T("%.3lf"), newWidth / g_xDpi);
179 strNum.Format(_T("%.3lf"), newHeight / g_yDpi);
181 return 0;
182}
183
184LRESULT CAttributesDialog::OnRadioButton2(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled)
185{
187 return 0;
188
189 CString strNum;
190 strNum.Format(_T("%.3lf"), newWidth / PpcmFromDpi(g_xDpi));
192 strNum.Format(_T("%.3lf"), newHeight / PpcmFromDpi(g_yDpi));
194 return 0;
195}
196
197LRESULT CAttributesDialog::OnRadioButton3(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled)
198{
200 return 0;
201
204 return 0;
205}
206
207LRESULT CAttributesDialog::OnEdit1(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled)
208{
209 if (Edit_GetModify(hWndCtl))
210 {
211 TCHAR tempS[100];
213 {
215 newWidth = max(1, (int) (_tcstod(tempS, NULL) * g_xDpi));
216 }
218 {
220 newWidth = max(1, (int) (_tcstod(tempS, NULL) * PpcmFromDpi(g_xDpi)));
221 }
223 {
225 newWidth = max(1, _tstoi(tempS));
226 }
227 Edit_SetModify(hWndCtl, FALSE);
228 }
229 return 0;
230}
231
232LRESULT CAttributesDialog::OnEdit2(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled)
233{
234 if (Edit_GetModify(hWndCtl))
235 {
236 TCHAR tempS[100];
238 {
240 newHeight = max(1, (int) (_tcstod(tempS, NULL) * g_yDpi));
241 }
243 {
245 newHeight = max(1, (int) (_tcstod(tempS, NULL) * PpcmFromDpi(g_yDpi)));
246 }
248 {
250 newHeight = max(1, _tstoi(tempS));
251 }
252 Edit_SetModify(hWndCtl, FALSE);
253 }
254 return 0;
255}
256
257
258
260{
265 return TRUE;
266}
267
269{
270 EndDialog(0);
271 return 0;
272}
273
274LRESULT CStretchSkewDialog::OnOk(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled)
275{
276 CString strrcIntNumbers;
277 CString strrcPercentage;
278 CString strrcAngle;
279 BOOL tr1, tr2, tr3, tr4;
280
281 strrcIntNumbers.LoadString(g_hinstExe, IDS_INTNUMBERS);
282 strrcPercentage.LoadString(g_hinstExe, IDS_PERCENTAGE);
283 strrcAngle.LoadString(g_hinstExe, IDS_ANGLE);
284
289
290 if (!(tr1 && tr2 && tr3 && tr4))
291 MessageBox(strrcIntNumbers, NULL, MB_ICONEXCLAMATION);
292 else if (percentage.x < 1 || percentage.x > 500 || percentage.y < 1 || percentage.y > 500)
293 MessageBox(strrcPercentage, NULL, MB_ICONEXCLAMATION);
294 else if (angle.x < -89 || angle.x > 89 || angle.y < -89 || angle.y > 89)
295 MessageBox(strrcAngle, NULL, MB_ICONEXCLAMATION);
296 else
297 EndDialog(1);
298 return 0;
299}
300
301LRESULT CStretchSkewDialog::OnCancel(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled)
302{
303 EndDialog(0);
304 return 0;
305}
306
307static INT CALLBACK
309{
310 CSimpleArray<CString>& arrFontNames = *reinterpret_cast<CSimpleArray<CString>*>(lParam);
312 if (name[0] == TEXT('@')) // Vertical fonts
313 return TRUE;
314
315 for (INT i = 0; i < arrFontNames.GetSize(); ++i)
316 {
317 if (arrFontNames[i] == name) // Already exists
318 return TRUE;
319 }
320
321 arrFontNames.Add(name);
322 return TRUE;
323}
324
325// TODO: AutoComplete font names
326// TODO: Vertical text
328{
329}
330
332{
333 // List the fonts
334 CSimpleArray<CString> arrFontNames;
336 if (hDC)
337 {
339 reinterpret_cast<LPARAM>(&arrFontNames));
340 DeleteDC(hDC);
341 }
342
343 // Actually add them to the combobox
344 HWND hwndNames = GetDlgItem(IDD_FONTSNAMES);
345 SendMessage(hwndNames, CB_RESETCONTENT, 0, 0);
346 for (INT i = 0; i < arrFontNames.GetSize(); ++i)
347 {
348 ComboBox_AddString(hwndNames, arrFontNames[i]);
349 }
350
352}
353
355{
356 static const INT s_sizes[] =
357 {
358 8, 9, 10, 11, 12, 14, 16, 18, 20, 22, 24, 26, 28, 36, 48, 72
359 };
360
361 HWND hwndSizes = GetDlgItem(IDD_FONTSSIZES);
362 ComboBox_ResetContent(hwndSizes);
363
364 TCHAR szText[16];
365 for (UINT i = 0; i < _countof(s_sizes); ++i)
366 {
367 wsprintf(szText, TEXT("%d"), s_sizes[i]);
368 INT iItem = ComboBox_AddString(hwndSizes, szText);
369 if (s_sizes[i] == (INT)registrySettings.PointSize)
370 ComboBox_SetCurSel(hwndSizes, iItem);
371 }
372
373 if (ComboBox_GetCurSel(hwndSizes) == CB_ERR)
374 {
375 wsprintf(szText, TEXT("%d"), (INT)registrySettings.PointSize);
376 ::SetWindowText(hwndSizes, szText);
377 }
378}
379
381{
382 HWND hwndToolbar = GetDlgItem(IDD_FONTSTOOLBAR);
383 SendMessage(hwndToolbar, TB_BUTTONSTRUCTSIZE, sizeof(TBBUTTON), 0);
384 SendMessage(hwndToolbar, TB_SETBITMAPSIZE, 0, MAKELPARAM(16, 16));
385 SendMessage(hwndToolbar, TB_SETBUTTONWIDTH, 0, MAKELPARAM(20, 20));
386
388 AddBitmap.hInst = g_hinstExe;
390 SendMessage(hwndToolbar, TB_ADDBITMAP, 4, (LPARAM)&AddBitmap);
391
393 16, 8, RGB(255, 0, 255), IMAGE_BITMAP,
395 SendMessage(hwndToolbar, TB_SETIMAGELIST, 0, (LPARAM)himl);
396
397 TBBUTTON buttons[] =
398 {
402 { 3, IDM_VERTICAL, 0, TBSTYLE_CHECK }, // TODO:
403 };
405
409}
410
412{
413 // TODO: Tooltips
416 InitToolbar();
417
419 {
422 0, 0,
425 }
426
429
430 return TRUE;
431}
432
434{
435 ShowWindow(SW_HIDE); // Just hide. Recycle for optimization
436 return 0;
437}
438
440{
441 HWND hwndNames = GetDlgItem(IDD_FONTSNAMES);
442 INT iItem = CB_ERR;
443 UINT cch;
444 TCHAR szText[LF_FACESIZE];
445
446 switch (codeNotify)
447 {
448 case CBN_SELCHANGE:
449 iItem = ComboBox_GetCurSel(hwndNames);
450 cch = ComboBox_GetLBTextLen(hwndNames, iItem);
451 if (iItem != CB_ERR && 0 < cch && cch < _countof(szText))
452 {
453 ComboBox_GetLBText(hwndNames, iItem, szText);
454 }
455 break;
456
457 case CBN_EDITCHANGE:
458 GetDlgItemText(IDD_FONTSNAMES, szText, _countof(szText));
459 iItem = ComboBox_FindStringExact(hwndNames, -1, szText);
460 break;
461 }
462
463 if (iItem != CB_ERR && registrySettings.strFontName.CompareNoCase(szText) != 0)
464 {
467 }
468}
469
471{
472 HWND hwndSizes = GetDlgItem(IDD_FONTSSIZES);
473 WCHAR szText[8];
474 INT iItem, PointSize = 0;
475 UINT cch;
476
477 switch (codeNotify)
478 {
479 case CBN_SELCHANGE:
480 iItem = ComboBox_GetCurSel(hwndSizes);
481 cch = ComboBox_GetLBTextLen(hwndSizes, iItem);
482 if (iItem != CB_ERR && 0 < cch && cch < _countof(szText))
483 {
484 ComboBox_GetLBText(hwndSizes, iItem, szText);
485 PointSize = _ttoi(szText);
486 }
487 break;
488
489 case CBN_EDITCHANGE:
490 ::GetWindowText(hwndSizes, szText, _countof(szText));
491 PointSize = _ttoi(szText);
492 break;
493 }
494
495 if (PointSize > 0)
496 {
497 registrySettings.PointSize = PointSize;
499 }
500}
501
503{
504 UINT id = LOWORD(wParam);
505 UINT codeNotify = HIWORD(wParam);
506 HWND hwndToolbar = GetDlgItem(IDD_FONTSTOOLBAR);
507 BOOL bChecked = ::SendMessage(hwndToolbar, TB_ISBUTTONCHECKED, id, 0);
508
509 switch (id)
510 {
511 case IDCANCEL:
514 break;
515
516 case IDD_FONTSNAMES:
517 OnFontName(codeNotify);
518 break;
519
520 case IDD_FONTSSIZES:
521 OnFontSize(codeNotify);
522 break;
523
524 case IDM_BOLD:
525 registrySettings.Bold = bChecked;
527 break;
528
529 case IDM_ITALIC:
530 registrySettings.Italic = bChecked;
532 break;
533
534 case IDM_UNDERLINE:
535 registrySettings.Underline = bChecked;
537 break;
538
539 case IDM_VERTICAL:
540 // TODO:
541 break;
542 }
543 return 0;
544}
545
547{
548 NMHDR *pnmhdr = reinterpret_cast<NMHDR *>(lParam);
549 if (pnmhdr->code == TTN_NEEDTEXT)
550 {
551 LPTOOLTIPTEXT pToolTip = reinterpret_cast<LPTOOLTIPTEXT>(lParam);
552 pToolTip->hinst = g_hinstExe;
553 switch (pnmhdr->idFrom)
554 {
555 case IDM_BOLD: pToolTip->lpszText = MAKEINTRESOURCE(IDS_BOLD); break;
556 case IDM_ITALIC: pToolTip->lpszText = MAKEINTRESOURCE(IDS_ITALIC); break;
557 case IDM_UNDERLINE: pToolTip->lpszText = MAKEINTRESOURCE(IDS_UNDERLINE); break;
558 case IDM_VERTICAL: pToolTip->lpszText = MAKEINTRESOURCE(IDS_VERTICAL); break;
559
560 default:
561 break;
562 }
563 }
564 return 0;
565}
566
568{
569 RECT rc;
570 GetWindowRect(&rc);
573 return 0;
574}
575
577{
578 if (wParam != TOOL_TEXT)
580
581 return 0;
582}
583
585{
586 if (wParam == IDD_FONTSNAMES)
587 {
588 LPMEASUREITEMSTRUCT pMeasureItem = reinterpret_cast<LPMEASUREITEMSTRUCT>(lParam);
589 RECT rc;
591 pMeasureItem->itemWidth = rc.right - rc.left;
593 return TRUE;
594 }
595 return 0;
596}
597
599{
600 // TODO: Owner-draw the font types
601 if (wParam == IDD_FONTSNAMES)
602 {
603 LPDRAWITEMSTRUCT pDrawItem = reinterpret_cast<LPDRAWITEMSTRUCT>(lParam);
604 if (pDrawItem->itemID == (UINT)-1)
605 return TRUE;
606
607 SetBkMode(pDrawItem->hDC, TRANSPARENT);
608
609 HWND hwndItem = pDrawItem->hwndItem;
610 RECT rcItem = pDrawItem->rcItem;
611 if (pDrawItem->itemState & ODS_SELECTED)
612 {
613 FillRect(pDrawItem->hDC, &rcItem, GetSysColorBrush(COLOR_HIGHLIGHT));
615 }
616 else
617 {
618 FillRect(pDrawItem->hDC, &rcItem, GetSysColorBrush(COLOR_WINDOW));
620 }
621
622 TCHAR szText[LF_FACESIZE];
623 if ((UINT)ComboBox_GetLBTextLen(hwndItem, pDrawItem->itemID) < _countof(szText))
624 {
625 szText[0] = 0;
626 ComboBox_GetLBText(hwndItem, pDrawItem->itemID, szText);
627
628 rcItem.left += 24;
629 DrawText(pDrawItem->hDC, szText, -1, &rcItem, DT_LEFT | DT_VCENTER | DT_SINGLELINE);
630 }
631
632 if (pDrawItem->itemState & ODS_FOCUS)
633 ::DrawFocusRect(pDrawItem->hDC, &pDrawItem->rcItem);
634
635 return TRUE;
636 }
637 return 0;
638}
static HDC hDC
Definition: 3dtext.c:33
char * va_list
Definition: acmsvcex.h:78
#define va_end(ap)
Definition: acmsvcex.h:90
#define va_start(ap, A)
Definition: acmsvcex.h:91
void ShowError(INT stringID,...)
Definition: dialogs.cpp:25
CAttributesDialog attributesDialog
Definition: dialogs.cpp:19
CFontsDialog fontsDialog
Definition: dialogs.cpp:21
CStretchSkewDialog stretchSkewDialog
Definition: dialogs.cpp:20
static INT CALLBACK EnumFontFamProc(ENUMLOGFONT *lpelf, NEWTEXTMETRIC *lpntm, INT FontType, LPARAM lParam)
Definition: dialogs.cpp:308
CMirrorRotateDialog mirrorRotateDialog
Definition: dialogs.cpp:18
#define ROUND(x)
Definition: dib.h:42
#define IDD_ATTRIBUTESRB5
Definition: resource.h:156
#define IDD_ATTRIBUTESRB3
Definition: resource.h:154
#define IDM_UNDERLINE
Definition: resource.h:102
#define IDD_ATTRIBUTESTEXT7
Definition: resource.h:147
#define IDD_STRETCHSKEWEDITHSTRETCH
Definition: resource.h:162
#define IDS_ANGLE
Definition: resource.h:215
#define IDB_FONTSTOOLBAR
Definition: resource.h:15
#define IDS_PRINTRES
Definition: resource.h:224
#define IDS_UNDERLINE
Definition: resource.h:222
#define IDM_VERTICAL
Definition: resource.h:103
#define IDS_PERCENTAGE
Definition: resource.h:214
#define IDD_MIRRORROTATERB1
Definition: resource.h:131
#define IDD_MIRRORROTATERB5
Definition: resource.h:135
#define IDD_MIRRORROTATERB2
Definition: resource.h:132
#define IDS_BOLD
Definition: resource.h:220
#define IDD_ATTRIBUTESTEXT6
Definition: resource.h:146
#define IDD_STRETCHSKEWEDITVSKEW
Definition: resource.h:175
#define IDM_ITALIC
Definition: resource.h:101
#define IDD_ATTRIBUTESEDIT2
Definition: resource.h:140
#define IDS_PROGRAMNAME
Definition: resource.h:183
#define IDD_FONTSTOOLBAR
Definition: resource.h:181
#define IDD_FONTSNAMES
Definition: resource.h:179
#define IDD_STRETCHSKEWEDITHSKEW
Definition: resource.h:171
#define IDD_STRETCHSKEWEDITVSTRETCH
Definition: resource.h:166
#define IDD_ATTRIBUTESRB1
Definition: resource.h:152
#define IDS_VERTICAL
Definition: resource.h:223
#define IDD_ATTRIBUTESTEXT8
Definition: resource.h:148
#define IDD_MIRRORROTATERB3
Definition: resource.h:133
#define IDD_ATTRIBUTESRB4
Definition: resource.h:155
#define IDD_MIRRORROTATERB6
Definition: resource.h:136
#define IDD_FONTSSIZES
Definition: resource.h:180
#define IDD_ATTRIBUTESRB2
Definition: resource.h:153
#define IDD_MIRRORROTATERB4
Definition: resource.h:134
#define IDS_INTNUMBERS
Definition: resource.h:213
#define IDS_ITALIC
Definition: resource.h:221
#define IDS_FILESIZE
Definition: resource.h:211
#define IDM_BOLD
Definition: resource.h:100
#define IDD_ATTRIBUTESEDIT1
Definition: resource.h:139
HIMAGELIST himl
int GetSize() const
Definition: atlsimpcoll.h:104
int CompareNoCase(_In_z_ PCXSTR psz) const
Definition: cstringt.h:743
BOOL LoadString(_In_ UINT nID)
Definition: cstringt.h:639
void __cdecl Format(UINT nFormatID,...)
Definition: cstringt.h:818
void FormatV(PCXSTR pszFormat, va_list args)
Definition: cstringt.h:846
int MessageBox(LPCTSTR lpszText, LPCTSTR lpszCaption=NULL, UINT nType=MB_OK)
Definition: atlwin.h:1002
LRESULT OnInitDialog(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
Definition: dialogs.cpp:100
LRESULT OnEdit2(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL &bHandled)
Definition: dialogs.cpp:232
LRESULT OnEdit1(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL &bHandled)
Definition: dialogs.cpp:207
LRESULT OnRadioButton2(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL &bHandled)
Definition: dialogs.cpp:184
LRESULT OnRadioButton3(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL &bHandled)
Definition: dialogs.cpp:197
LRESULT OnCancel(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL &bHandled)
Definition: dialogs.cpp:154
BOOL m_bBlackAndWhite
Definition: dialogs.h:67
LRESULT OnDefault(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL &bHandled)
Definition: dialogs.cpp:160
LRESULT OnOk(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL &bHandled)
Definition: dialogs.cpp:147
LRESULT OnRadioButton1(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL &bHandled)
Definition: dialogs.cpp:171
LRESULT OnClose(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
Definition: dialogs.cpp:141
LRESULT OnInitDialog(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
Definition: dialogs.cpp:411
LRESULT OnClose(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
Definition: dialogs.cpp:433
LRESULT OnDrawItem(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
Definition: dialogs.cpp:598
LRESULT OnToolsModelToolChanged(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
Definition: dialogs.cpp:576
LRESULT OnCommand(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
Definition: dialogs.cpp:502
LRESULT OnMove(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
Definition: dialogs.cpp:567
void InitFontSizes()
Definition: dialogs.cpp:354
LRESULT OnNotify(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
Definition: dialogs.cpp:546
void InitFontNames()
Definition: dialogs.cpp:331
void InitToolbar()
Definition: dialogs.cpp:380
LRESULT OnMeasureItem(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
Definition: dialogs.cpp:584
void OnFontName(UINT codeNotify)
Definition: dialogs.cpp:439
void OnFontSize(UINT codeNotify)
Definition: dialogs.cpp:470
LRESULT OnRadioButton3(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL &bHandled)
Definition: dialogs.cpp:75
LRESULT OnClose(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
Definition: dialogs.cpp:48
LRESULT OnOk(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL &bHandled)
Definition: dialogs.cpp:54
LRESULT OnCancel(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL &bHandled)
Definition: dialogs.cpp:69
LRESULT OnInitDialog(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
Definition: dialogs.cpp:41
LRESULT OnRadioButton12(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL &bHandled)
Definition: dialogs.cpp:86
LRESULT OnOk(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL &bHandled)
Definition: dialogs.cpp:274
LRESULT OnCancel(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL &bHandled)
Definition: dialogs.cpp:301
POINT percentage
Definition: dialogs.h:88
LRESULT OnInitDialog(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
Definition: dialogs.cpp:259
LRESULT OnClose(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
Definition: dialogs.cpp:268
int GetWidth() const
Definition: history.cpp:194
int GetHeight() const
Definition: history.cpp:199
BOOL IsBlackAndWhite()
Definition: history.cpp:270
DWORD PointSize
Definition: registry.h:34
DWORD ShowTextTool
Definition: registry.h:41
DWORD FontsPositionY
Definition: registry.h:40
DWORD FontsPositionX
Definition: registry.h:39
CString strFontName
Definition: registry.h:33
DWORD Underline
Definition: registry.h:37
void NotifyToolChanged()
Definition: toolsmodel.cpp:159
WPARAM wParam
Definition: combotst.c:138
LPARAM lParam
Definition: combotst.c:139
float g_xDpi
Definition: dib.cpp:11
float g_yDpi
Definition: dib.cpp:12
SYSTEMTIME g_fileTime
Definition: dib.cpp:13
float PpcmFromDpi(float dpi)
Definition: dib.cpp:25
INT g_fileSize
Definition: dib.cpp:10
#define LF_FACESIZE
Definition: dimm.idl:39
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
#define CALLBACK
Definition: compat.h:35
#define RGB(r, g, b)
Definition: precomp.h:62
NTSTATUS AddBitmap(PNTFS_VCB Vcb, PFILE_RECORD_HEADER FileRecord, PNTFS_ATTR_RECORD AttributeAddress, PCWSTR Name, USHORT NameLength)
Definition: attrib.c:72
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned short WORD
Definition: ntddk_ex.h:93
GLfloat angle
Definition: glext.h:10853
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
ToolsModel toolsModel
Definition: toolsmodel.cpp:10
ImageModel imageModel
Definition: history.cpp:11
RegistrySettings registrySettings
Definition: registry.cpp:14
CMainWindow mainWindow
Definition: main.cpp:22
BOOL g_isAFile
Definition: main.cpp:18
HINSTANCE g_hinstExe
Definition: main.cpp:15
#define _tcscat
Definition: tchar.h:622
#define _tstoi
Definition: tchar.h:598
#define TEXT(s)
Definition: k32.h:26
__u16 date
Definition: mkdosfs.c:8
static HDC
Definition: imagelist.c:92
static DWORD DWORD void LPSTR DWORD cch
Definition: str.c:202
unsigned int UINT
Definition: ndis.h:50
#define LOCALE_USER_DEFAULT
#define L(x)
Definition: ntvdm.h:50
#define LOWORD(l)
Definition: pedump.c:82
#define TB_ADDBUTTONS
Definition: commctrl.h:1271
#define TTN_NEEDTEXT
Definition: commctrl.h:1880
#define ImageList_LoadImage
Definition: commctrl.h:508
#define TB_BUTTONSTRUCTSIZE
Definition: commctrl.h:1134
#define TB_CHECKBUTTON
Definition: commctrl.h:1043
#define TB_SETIMAGELIST
Definition: commctrl.h:1150
#define TBSTATE_ENABLED
Definition: commctrl.h:974
#define TB_SETBITMAPSIZE
Definition: commctrl.h:1136
#define TBSTYLE_CHECK
Definition: commctrl.h:983
#define TB_SETBUTTONWIDTH
Definition: commctrl.h:1161
#define TB_ISBUTTONCHECKED
Definition: commctrl.h:1049
#define TB_ADDBITMAP
Definition: commctrl.h:1056
#define LPTOOLTIPTEXT
Definition: commctrl.h:1890
static calc_node_t temp
Definition: rpn_ieee.c:38
HWND buttons[5]
Definition: sndrec32.cpp:40
#define _countof(array)
Definition: sndvol32.h:68
Definition: name.c:39
LOGFONTA elfLogFont
Definition: wingdi.h:2686
CHAR lfFaceName[LF_FACESIZE]
Definition: wingdi.h:1894
UINT_PTR idFrom
Definition: winuser.h:3148
UINT code
Definition: winuser.h:3149
long y
Definition: polytest.cpp:48
long x
Definition: polytest.cpp:48
LONG right
Definition: windef.h:308
LONG top
Definition: windef.h:307
LONG left
Definition: windef.h:306
#define max(a, b)
Definition: svc.c:63
@ TOOL_TEXT
Definition: toolsmodel.h:21
int32_t INT
Definition: typedefs.h:58
#define HIWORD(l)
Definition: typedefs.h:247
#define _T(x)
Definition: vfdio.h:22
LONG_PTR LPARAM
Definition: windef.h:208
LONG_PTR LRESULT
Definition: windef.h:209
UINT_PTR WPARAM
Definition: windef.h:207
#define ComboBox_SetCurSel(hwndCtl, index)
Definition: windowsx.h:66
#define ComboBox_GetLBText(hwndCtl, index, lpszBuffer)
Definition: windowsx.h:56
#define ComboBox_GetCurSel(hwndCtl)
Definition: windowsx.h:49
#define Edit_GetModify(hwndCtl)
Definition: windowsx.h:90
#define Edit_SetModify(hwndCtl, fModified)
Definition: windowsx.h:105
#define ComboBox_AddString(hwndCtl, lpsz)
Definition: windowsx.h:41
#define ComboBox_ResetContent(hwndCtl)
Definition: windowsx.h:63
#define ComboBox_GetLBTextLen(hwndCtl, index)
Definition: windowsx.h:57
#define ComboBox_FindStringExact(hwndCtl, indexStart, lpszFind)
Definition: windowsx.h:47
FONTENUMPROCA FONTENUMPROC
Definition: wingdi.h:2902
HDC WINAPI CreateCompatibleDC(_In_opt_ HDC hdc)
#define TRANSPARENT
Definition: wingdi.h:950
int WINAPI FillRect(HDC, LPCRECT, HBRUSH)
int WINAPI SetBkMode(_In_ HDC, _In_ int)
Definition: dc.c:1056
COLORREF WINAPI SetTextColor(_In_ HDC, _In_ COLORREF)
Definition: text.c:918
BOOL WINAPI DeleteDC(_In_ HDC)
#define EnumFontFamilies
Definition: wingdi.h:4450
#define GetTimeFormat
Definition: winnls.h:1189
#define GetDateFormat
Definition: winnls.h:1184
DWORD WINAPI GetSysColor(_In_ int)
#define ODS_SELECTED
Definition: winuser.h:2535
#define SW_HIDE
Definition: winuser.h:762
#define SWP_NOACTIVATE
Definition: winuser.h:1232
#define IMAGE_BITMAP
Definition: winuser.h:211
#define MAKELPARAM(l, h)
Definition: winuser.h:3998
#define COLOR_WINDOW
Definition: winuser.h:912
BOOL WINAPI ShowWindow(_In_ HWND, _In_ int)
BOOL WINAPI CheckDlgButton(_In_ HWND, _In_ int, _In_ UINT)
#define IDCANCEL
Definition: winuser.h:825
#define SM_CYVSCROLL
Definition: winuser.h:975
#define COLOR_WINDOWTEXT
Definition: winuser.h:915
BOOL WINAPI GetWindowRect(_In_ HWND, _Out_ LPRECT)
BOOL WINAPI SetWindowPos(_In_ HWND, _In_opt_ HWND, _In_ int, _In_ int, _In_ int, _In_ int, _In_ UINT)
#define COLOR_HIGHLIGHT
Definition: winuser.h:920
#define GetDlgItemText
Definition: winuser.h:5775
HBRUSH WINAPI GetSysColorBrush(_In_ int)
#define LR_CREATEDIBSECTION
Definition: winuser.h:1092
#define DT_SINGLELINE
Definition: winuser.h:540
#define CB_ERR
Definition: winuser.h:2425
#define SWP_NOSIZE
Definition: winuser.h:1235
#define CB_RESETCONTENT
Definition: winuser.h:1949
HWND WINAPI GetDlgItem(_In_opt_ HWND, _In_ int)
#define CBN_SELCHANGE
Definition: winuser.h:1969
#define DrawText
Definition: winuser.h:5761
#define MB_ICONERROR
Definition: winuser.h:781
UINT WINAPI IsDlgButtonChecked(_In_ HWND, _In_ int)
#define DT_LEFT
Definition: winuser.h:534
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)
BOOL WINAPI SetDlgItemInt(_In_ HWND, _In_ int, _In_ UINT, _In_ BOOL)
#define SendMessage
Definition: winuser.h:5833
BOOL WINAPI EnableWindow(_In_ HWND, _In_ BOOL)
#define COLOR_HIGHLIGHTTEXT
Definition: winuser.h:921
#define MB_ICONEXCLAMATION
Definition: winuser.h:779
#define wsprintf
Definition: winuser.h:5855
#define GetWindowText
Definition: winuser.h:5788
#define DT_VCENTER
Definition: winuser.h:543
BOOL WINAPI CheckRadioButton(_In_ HWND, _In_ int, _In_ int, _In_ int)
#define MessageBox
Definition: winuser.h:5812
#define SetWindowText
Definition: winuser.h:5847
UINT WINAPI GetDlgItemInt(_In_ HWND, _In_ int, _Out_opt_ PBOOL, _In_ BOOL)
BOOL WINAPI DrawFocusRect(_In_ HDC, _In_ LPCRECT)
#define SWP_NOZORDER
Definition: winuser.h:1237
#define DM_REPOSITION
Definition: winuser.h:2090
#define MAKEINTRESOURCE
Definition: winuser.h:591
#define ODS_FOCUS
Definition: winuser.h:2539
int WINAPI GetSystemMetrics(_In_ int)
#define SetDlgItemText
Definition: winuser.h:5839
#define BST_CHECKED
Definition: winuser.h:197
#define CBN_EDITCHANGE
Definition: winuser.h:1965
BOOL WINAPI EndDialog(_In_ HWND, _In_ INT_PTR)
char TCHAR
Definition: xmlstorage.h:189
#define _ttoi
Definition: xmlstorage.h:195
__wchar_t WCHAR
Definition: xmlstorage.h:180
#define _tcstod
Definition: xmlstorage.h:197
CHAR * LPTSTR
Definition: xmlstorage.h:192