ReactOS 0.4.15-dev-7711-g5627da4
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#include "precomp.h"
9#include "dialogs.h"
10
11#include <winnls.h>
12
17
18/* FUNCTIONS ********************************************************/
19
20void ShowError(INT stringID, ...)
21{
22 va_list va;
23 va_start(va, stringID);
24
25 CStringW strFormat, strText;
26 strFormat.LoadString(stringID);
27 strText.FormatV(strFormat, va);
28
29 CStringW strProgramName;
30 strProgramName.LoadString(IDS_PROGRAMNAME);
31
32 mainWindow.MessageBox(strText, strProgramName, MB_ICONERROR);
33 va_end(va);
34}
35
37{
40 return TRUE;
41}
42
44{
45 EndDialog(0);
46 return 0;
47}
48
49LRESULT CMirrorRotateDialog::OnOk(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled)
50{
52 EndDialog(1);
54 EndDialog(2);
56 EndDialog(3);
58 EndDialog(4);
60 EndDialog(5);
61 return 0;
62}
63
64LRESULT CMirrorRotateDialog::OnCancel(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled)
65{
66 EndDialog(0);
67 return 0;
68}
69
70LRESULT CMirrorRotateDialog::OnRadioButton3(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled)
71{
73 return 0;
74
78 return 0;
79}
80
81LRESULT CMirrorRotateDialog::OnRadioButton12(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled)
82{
85 {
86 return 0;
87 }
88
92 return 0;
93}
94
96{
99
103
106 else
108
109 if (g_isAFile)
110 {
111 WCHAR date[100], temp[100];
116 CStringW strSize;
120 }
121
122 CStringW strUnit;
124
125 CStringW strRes;
126 if (strUnit == L"dpi")
128 else
130
132 return TRUE;
133}
134
136{
137 EndDialog(0);
138 return 0;
139}
140
141LRESULT CAttributesDialog::OnOk(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled)
142{
144 EndDialog(1);
145 return 0;
146}
147
148LRESULT CAttributesDialog::OnCancel(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled)
149{
150 EndDialog(0);
151 return 0;
152}
153
154LRESULT CAttributesDialog::OnDefault(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled)
155{
162 return 0;
163}
164
165LRESULT CAttributesDialog::OnRadioButton1(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled)
166{
168 return 0;
169
170 CStringW strNum;
171 strNum.Format(L"%.3lf", newWidth / g_xDpi);
173 strNum.Format(L"%.3lf", newHeight / g_yDpi);
175 return 0;
176}
177
178LRESULT CAttributesDialog::OnRadioButton2(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled)
179{
181 return 0;
182
183 CStringW strNum;
184 strNum.Format(L"%.3lf", newWidth / PpcmFromDpi(g_xDpi));
186 strNum.Format(L"%.3lf", newHeight / PpcmFromDpi(g_yDpi));
188 return 0;
189}
190
191LRESULT CAttributesDialog::OnRadioButton3(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled)
192{
194 return 0;
195
198 return 0;
199}
200
201LRESULT CAttributesDialog::OnEdit1(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled)
202{
203 if (Edit_GetModify(hWndCtl))
204 {
205 WCHAR tempS[100];
207 {
209 newWidth = max(1, (int)(wcstod(tempS, NULL) * g_xDpi));
210 }
212 {
214 newWidth = max(1, (int)(wcstod(tempS, NULL) * PpcmFromDpi(g_xDpi)));
215 }
217 {
219 newWidth = max(1, _wtoi(tempS));
220 }
221 Edit_SetModify(hWndCtl, FALSE);
222 }
223 return 0;
224}
225
226LRESULT CAttributesDialog::OnEdit2(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled)
227{
228 if (Edit_GetModify(hWndCtl))
229 {
230 WCHAR tempS[100];
232 {
234 newHeight = max(1, (int)(wcstod(tempS, NULL) * g_yDpi));
235 }
237 {
239 newHeight = max(1, (int)(wcstod(tempS, NULL) * PpcmFromDpi(g_yDpi)));
240 }
242 {
244 newHeight = max(1, _wtoi(tempS));
245 }
246 Edit_SetModify(hWndCtl, FALSE);
247 }
248 return 0;
249}
250
251
252
254{
259 return TRUE;
260}
261
263{
264 EndDialog(0);
265 return 0;
266}
267
268LRESULT CStretchSkewDialog::OnOk(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled)
269{
270 CStringW strrcIntNumbers, strrcPercentage, strrcAngle;
271 BOOL tr1, tr2, tr3, tr4;
272
273 strrcIntNumbers.LoadString(g_hinstExe, IDS_INTNUMBERS);
274 strrcPercentage.LoadString(g_hinstExe, IDS_PERCENTAGE);
275 strrcAngle.LoadString(g_hinstExe, IDS_ANGLE);
276
281
282 if (!(tr1 && tr2 && tr3 && tr4))
283 MessageBox(strrcIntNumbers, NULL, MB_ICONEXCLAMATION);
284 else if (percentage.x < 1 || percentage.x > 500 || percentage.y < 1 || percentage.y > 500)
285 MessageBox(strrcPercentage, NULL, MB_ICONEXCLAMATION);
286 else if (angle.x < -89 || angle.x > 89 || angle.y < -89 || angle.y > 89)
287 MessageBox(strrcAngle, NULL, MB_ICONEXCLAMATION);
288 else
289 EndDialog(1);
290 return 0;
291}
292
293LRESULT CStretchSkewDialog::OnCancel(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled)
294{
295 EndDialog(0);
296 return 0;
297}
298
299static INT CALLBACK
301{
302 CSimpleArray<CStringW>& arrFontNames = *reinterpret_cast<CSimpleArray<CStringW>*>(lParam);
304 if (name[0] == L'@') // Vertical fonts
305 return TRUE;
306
307 for (INT i = 0; i < arrFontNames.GetSize(); ++i)
308 {
309 if (arrFontNames[i] == name) // Already exists
310 return TRUE;
311 }
312
313 arrFontNames.Add(name);
314 return TRUE;
315}
316
317// TODO: AutoComplete font names
318// TODO: Vertical text
320{
321}
322
324{
325 // List the fonts
326 CSimpleArray<CStringW> arrFontNames;
328 if (hDC)
329 {
331 reinterpret_cast<LPARAM>(&arrFontNames));
333 }
334
335 // Actually add them to the combobox
336 HWND hwndNames = GetDlgItem(IDD_FONTSNAMES);
337 ::SendMessageW(hwndNames, CB_RESETCONTENT, 0, 0);
338 for (INT i = 0; i < arrFontNames.GetSize(); ++i)
339 {
340 ComboBox_AddString(hwndNames, arrFontNames[i]);
341 }
342
344}
345
347{
348 static const INT s_sizes[] =
349 {
350 8, 9, 10, 11, 12, 14, 16, 18, 20, 22, 24, 26, 28, 36, 48, 72
351 };
352
353 HWND hwndSizes = GetDlgItem(IDD_FONTSSIZES);
354 ComboBox_ResetContent(hwndSizes);
355
356 WCHAR szText[16];
357 for (UINT i = 0; i < _countof(s_sizes); ++i)
358 {
359 StringCchPrintfW(szText, _countof(szText), L"%d", s_sizes[i]);
360 INT iItem = ComboBox_AddString(hwndSizes, szText);
361 if (s_sizes[i] == (INT)registrySettings.PointSize)
362 ComboBox_SetCurSel(hwndSizes, iItem);
363 }
364
365 if (ComboBox_GetCurSel(hwndSizes) == CB_ERR)
366 {
368 ::SetWindowTextW(hwndSizes, szText);
369 }
370}
371
373{
374 HWND hwndToolbar = GetDlgItem(IDD_FONTSTOOLBAR);
375 ::SendMessageW(hwndToolbar, TB_BUTTONSTRUCTSIZE, sizeof(TBBUTTON), 0);
376 ::SendMessageW(hwndToolbar, TB_SETBITMAPSIZE, 0, MAKELPARAM(16, 16));
377 ::SendMessageW(hwndToolbar, TB_SETBUTTONWIDTH, 0, MAKELPARAM(20, 20));
378
380 AddBitmap.hInst = g_hinstExe;
382 ::SendMessageW(hwndToolbar, TB_ADDBITMAP, 4, (LPARAM)&AddBitmap);
383
385 16, 8, RGB(255, 0, 255), IMAGE_BITMAP,
387 ::SendMessageW(hwndToolbar, TB_SETIMAGELIST, 0, (LPARAM)himl);
388
389 TBBUTTON buttons[] =
390 {
394 { 3, IDM_VERTICAL, 0, TBSTYLE_CHECK }, // TODO:
395 };
397
401}
402
404{
405 // TODO: Tooltips
408 InitToolbar();
409
411 {
414 0, 0,
417 }
418
421
422 return TRUE;
423}
424
426{
427 ShowWindow(SW_HIDE); // Just hide. Recycle for optimization
428 return 0;
429}
430
432{
433 HWND hwndNames = GetDlgItem(IDD_FONTSNAMES);
434 INT iItem = CB_ERR;
435 UINT cch;
436 WCHAR szText[LF_FACESIZE];
437
438 switch (codeNotify)
439 {
440 case CBN_SELCHANGE:
441 iItem = ComboBox_GetCurSel(hwndNames);
442 cch = ComboBox_GetLBTextLen(hwndNames, iItem);
443 if (iItem != CB_ERR && 0 < cch && cch < _countof(szText))
444 ComboBox_GetLBText(hwndNames, iItem, szText);
445 break;
446
447 case CBN_EDITCHANGE:
448 GetDlgItemText(IDD_FONTSNAMES, szText, _countof(szText));
449 iItem = ComboBox_FindStringExact(hwndNames, -1, szText);
450 break;
451 }
452
453 if (iItem != CB_ERR && registrySettings.strFontName.CompareNoCase(szText) != 0)
454 {
457 }
458}
459
461{
462 HWND hwndSizes = GetDlgItem(IDD_FONTSSIZES);
463 WCHAR szText[8];
464 INT iItem, PointSize = 0;
465 UINT cch;
466
467 switch (codeNotify)
468 {
469 case CBN_SELCHANGE:
470 iItem = ComboBox_GetCurSel(hwndSizes);
471 cch = ComboBox_GetLBTextLen(hwndSizes, iItem);
472 if (iItem != CB_ERR && 0 < cch && cch < _countof(szText))
473 {
474 ComboBox_GetLBText(hwndSizes, iItem, szText);
475 PointSize = _wtoi(szText);
476 }
477 break;
478
479 case CBN_EDITCHANGE:
480 ::GetWindowTextW(hwndSizes, szText, _countof(szText));
481 PointSize = _wtoi(szText);
482 break;
483 }
484
485 if (PointSize > 0)
486 {
487 registrySettings.PointSize = PointSize;
489 }
490}
491
493{
494 UINT id = LOWORD(wParam);
495 UINT codeNotify = HIWORD(wParam);
496 HWND hwndToolbar = GetDlgItem(IDD_FONTSTOOLBAR);
497 BOOL bChecked = (BOOL)::SendMessageW(hwndToolbar, TB_ISBUTTONCHECKED, id, 0);
498
499 switch (id)
500 {
501 case IDCANCEL:
504 break;
505
506 case IDD_FONTSNAMES:
507 OnFontName(codeNotify);
508 break;
509
510 case IDD_FONTSSIZES:
511 OnFontSize(codeNotify);
512 break;
513
514 case IDM_BOLD:
515 registrySettings.Bold = bChecked;
517 break;
518
519 case IDM_ITALIC:
520 registrySettings.Italic = bChecked;
522 break;
523
524 case IDM_UNDERLINE:
525 registrySettings.Underline = bChecked;
527 break;
528
529 case IDM_VERTICAL:
530 // TODO:
531 break;
532 }
533 return 0;
534}
535
537{
538 NMHDR *pnmhdr = reinterpret_cast<NMHDR *>(lParam);
539 if (pnmhdr->code == TTN_NEEDTEXT)
540 {
541 LPTOOLTIPTEXTW pToolTip = reinterpret_cast<LPTOOLTIPTEXTW>(lParam);
542 pToolTip->hinst = g_hinstExe;
543 switch (pnmhdr->idFrom)
544 {
545 case IDM_BOLD: pToolTip->lpszText = MAKEINTRESOURCEW(IDS_BOLD); break;
546 case IDM_ITALIC: pToolTip->lpszText = MAKEINTRESOURCEW(IDS_ITALIC); break;
547 case IDM_UNDERLINE: pToolTip->lpszText = MAKEINTRESOURCEW(IDS_UNDERLINE); break;
548 case IDM_VERTICAL: pToolTip->lpszText = MAKEINTRESOURCEW(IDS_VERTICAL); break;
549
550 default:
551 break;
552 }
553 }
554 return 0;
555}
556
558{
559 RECT rc;
560 GetWindowRect(&rc);
563 return 0;
564}
565
567{
568 if (wParam != TOOL_TEXT)
570
571 return 0;
572}
573
575{
576 if (wParam == IDD_FONTSNAMES)
577 {
578 LPMEASUREITEMSTRUCT pMeasureItem = reinterpret_cast<LPMEASUREITEMSTRUCT>(lParam);
579 RECT rc;
581 pMeasureItem->itemWidth = rc.right - rc.left;
583 return TRUE;
584 }
585 return 0;
586}
587
589{
590 // TODO: Owner-draw the font types
591 if (wParam == IDD_FONTSNAMES)
592 {
593 LPDRAWITEMSTRUCT pDrawItem = reinterpret_cast<LPDRAWITEMSTRUCT>(lParam);
594 if (pDrawItem->itemID == (UINT)-1)
595 return TRUE;
596
597 ::SetBkMode(pDrawItem->hDC, TRANSPARENT);
598
599 HWND hwndItem = pDrawItem->hwndItem;
600 RECT rcItem = pDrawItem->rcItem;
601 if (pDrawItem->itemState & ODS_SELECTED)
602 {
603 ::FillRect(pDrawItem->hDC, &rcItem, GetSysColorBrush(COLOR_HIGHLIGHT));
605 }
606 else
607 {
608 ::FillRect(pDrawItem->hDC, &rcItem, GetSysColorBrush(COLOR_WINDOW));
610 }
611
612 WCHAR szText[LF_FACESIZE];
613 if ((UINT)ComboBox_GetLBTextLen(hwndItem, pDrawItem->itemID) < _countof(szText))
614 {
615 szText[0] = 0;
616 ComboBox_GetLBText(hwndItem, pDrawItem->itemID, szText);
617
618 rcItem.left += 24;
619 ::DrawTextW(pDrawItem->hDC, szText, -1, &rcItem, DT_LEFT | DT_VCENTER | DT_SINGLELINE);
620 }
621
622 if (pDrawItem->itemState & ODS_FOCUS)
623 ::DrawFocusRect(pDrawItem->hDC, &pDrawItem->rcItem);
624
625 return TRUE;
626 }
627 return 0;
628}
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:20
CAttributesDialog attributesDialog
Definition: dialogs.cpp:14
CFontsDialog fontsDialog
Definition: dialogs.cpp:16
CStretchSkewDialog stretchSkewDialog
Definition: dialogs.cpp:15
static INT CALLBACK EnumFontFamProc(ENUMLOGFONTW *lpelf, NEWTEXTMETRICW *lpntm, INT FontType, LPARAM lParam)
Definition: dialogs.cpp:300
CMirrorRotateDialog mirrorRotateDialog
Definition: dialogs.cpp:13
#define ROUND(x)
Definition: dib.h:42
CMainWindow mainWindow
Definition: main.cpp:25
BOOL g_isAFile
Definition: main.cpp:20
HINSTANCE g_hinstExe
Definition: main.cpp:17
ToolsModel toolsModel
Definition: toolsmodel.cpp:10
RegistrySettings registrySettings
Definition: registry.cpp:14
#define IDD_ATTRIBUTESRB5
Definition: resource.h:159
#define IDD_ATTRIBUTESRB3
Definition: resource.h:157
#define IDM_UNDERLINE
Definition: resource.h:103
#define IDD_ATTRIBUTESTEXT7
Definition: resource.h:150
#define IDD_STRETCHSKEWEDITHSTRETCH
Definition: resource.h:165
#define IDS_ANGLE
Definition: resource.h:218
#define IDB_FONTSTOOLBAR
Definition: resource.h:15
#define IDS_PRINTRES
Definition: resource.h:227
#define IDS_UNDERLINE
Definition: resource.h:225
#define IDM_VERTICAL
Definition: resource.h:104
#define IDS_PERCENTAGE
Definition: resource.h:217
#define IDD_MIRRORROTATERB1
Definition: resource.h:134
#define IDD_MIRRORROTATERB5
Definition: resource.h:138
#define IDD_MIRRORROTATERB2
Definition: resource.h:135
#define IDS_BOLD
Definition: resource.h:223
#define IDD_ATTRIBUTESTEXT6
Definition: resource.h:149
#define IDD_STRETCHSKEWEDITVSKEW
Definition: resource.h:178
#define IDM_ITALIC
Definition: resource.h:102
#define IDD_ATTRIBUTESEDIT2
Definition: resource.h:143
#define IDS_PROGRAMNAME
Definition: resource.h:186
#define IDD_FONTSTOOLBAR
Definition: resource.h:184
#define IDD_FONTSNAMES
Definition: resource.h:182
#define IDD_STRETCHSKEWEDITHSKEW
Definition: resource.h:174
#define IDD_STRETCHSKEWEDITVSTRETCH
Definition: resource.h:169
#define IDD_ATTRIBUTESRB1
Definition: resource.h:155
#define IDS_VERTICAL
Definition: resource.h:226
#define IDD_ATTRIBUTESTEXT8
Definition: resource.h:151
#define IDD_MIRRORROTATERB3
Definition: resource.h:136
#define IDD_ATTRIBUTESRB4
Definition: resource.h:158
#define IDD_MIRRORROTATERB6
Definition: resource.h:139
#define IDD_FONTSSIZES
Definition: resource.h:183
#define IDD_ATTRIBUTESRB2
Definition: resource.h:156
#define IDD_MIRRORROTATERB4
Definition: resource.h:137
#define IDS_INTNUMBERS
Definition: resource.h:216
#define IDS_ITALIC
Definition: resource.h:224
#define IDS_FILESIZE
Definition: resource.h:214
#define IDM_BOLD
Definition: resource.h:101
#define IDD_ATTRIBUTESEDIT1
Definition: resource.h:142
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:95
LRESULT OnEdit2(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL &bHandled)
Definition: dialogs.cpp:226
LRESULT OnEdit1(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL &bHandled)
Definition: dialogs.cpp:201
LRESULT OnRadioButton2(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL &bHandled)
Definition: dialogs.cpp:178
LRESULT OnRadioButton3(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL &bHandled)
Definition: dialogs.cpp:191
LRESULT OnCancel(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL &bHandled)
Definition: dialogs.cpp:148
BOOL m_bBlackAndWhite
Definition: dialogs.h:67
LRESULT OnDefault(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL &bHandled)
Definition: dialogs.cpp:154
LRESULT OnOk(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL &bHandled)
Definition: dialogs.cpp:141
LRESULT OnRadioButton1(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL &bHandled)
Definition: dialogs.cpp:165
LRESULT OnClose(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
Definition: dialogs.cpp:135
LRESULT OnInitDialog(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
Definition: dialogs.cpp:403
LRESULT OnClose(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
Definition: dialogs.cpp:425
LRESULT OnDrawItem(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
Definition: dialogs.cpp:588
LRESULT OnToolsModelToolChanged(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
Definition: dialogs.cpp:566
LRESULT OnCommand(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
Definition: dialogs.cpp:492
LRESULT OnMove(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
Definition: dialogs.cpp:557
void InitFontSizes()
Definition: dialogs.cpp:346
LRESULT OnNotify(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
Definition: dialogs.cpp:536
void InitFontNames()
Definition: dialogs.cpp:323
void InitToolbar()
Definition: dialogs.cpp:372
LRESULT OnMeasureItem(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
Definition: dialogs.cpp:574
void OnFontName(UINT codeNotify)
Definition: dialogs.cpp:431
void OnFontSize(UINT codeNotify)
Definition: dialogs.cpp:460
LRESULT OnRadioButton3(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL &bHandled)
Definition: dialogs.cpp:70
LRESULT OnClose(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
Definition: dialogs.cpp:43
LRESULT OnOk(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL &bHandled)
Definition: dialogs.cpp:49
LRESULT OnCancel(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL &bHandled)
Definition: dialogs.cpp:64
LRESULT OnInitDialog(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
Definition: dialogs.cpp:36
LRESULT OnRadioButton12(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL &bHandled)
Definition: dialogs.cpp:81
LRESULT OnOk(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL &bHandled)
Definition: dialogs.cpp:268
LRESULT OnCancel(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL &bHandled)
Definition: dialogs.cpp:293
POINT percentage
Definition: dialogs.h:88
LRESULT OnInitDialog(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
Definition: dialogs.cpp:253
LRESULT OnClose(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
Definition: dialogs.cpp:262
int GetWidth() const
Definition: history.cpp:253
int GetHeight() const
Definition: history.cpp:258
BOOL IsBlackAndWhite()
Definition: history.cpp:328
DWORD PointSize
Definition: registry.h:34
DWORD ShowTextTool
Definition: registry.h:41
DWORD FontsPositionY
Definition: registry.h:40
DWORD FontsPositionX
Definition: registry.h:39
DWORD Underline
Definition: registry.h:37
CStringW strFontName
Definition: registry.h:33
void NotifyToolChanged()
Definition: toolsmodel.cpp:272
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
ImageModel imageModel
Definition: history.cpp:11
_Check_return_ _CRTIMP int __cdecl _wtoi(_In_z_ const wchar_t *_Str)
_Check_return_ double __cdecl wcstod(_In_z_ const wchar_t *_Str, _Out_opt_ _Deref_post_z_ wchar_t **_EndPtr)
INT WINAPI GetTimeFormatW(LCID lcid, DWORD dwFlags, const SYSTEMTIME *lpTime, LPCWSTR lpFormat, LPWSTR lpTimeStr, INT cchOut)
Definition: lcformat.c:1093
INT WINAPI GetDateFormatW(LCID lcid, DWORD dwFlags, const SYSTEMTIME *lpTime, LPCWSTR lpFormat, LPWSTR lpDateStr, INT cchOut)
Definition: lcformat.c:993
__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 BOOL
Definition: nt_native.h:43
#define LOCALE_USER_DEFAULT
INT WINAPI DrawTextW(HDC hdc, LPCWSTR str, INT count, LPRECT rect, UINT flags)
Definition: defwnd.c:16
#define L(x)
Definition: ntvdm.h:50
#define LOWORD(l)
Definition: pedump.c:82
#define TB_ADDBUTTONS
Definition: commctrl.h:1271
#define LPTOOLTIPTEXTW
Definition: commctrl.h:1887
#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
static calc_node_t temp
Definition: rpn_ieee.c:38
HWND buttons[5]
Definition: sndrec32.cpp:40
#define _countof(array)
Definition: sndvol32.h:68
STRSAFEAPI StringCchPrintfW(STRSAFE_LPWSTR pszDest, size_t cchDest, STRSAFE_LPCWSTR pszFormat,...)
Definition: strsafe.h:530
STRSAFEAPI StringCchCatW(STRSAFE_LPWSTR pszDest, size_t cchDest, STRSAFE_LPCWSTR pszSrc)
Definition: strsafe.h:325
Definition: name.c:39
LOGFONTW elfLogFont
Definition: wingdi.h:2691
WCHAR lfFaceName[LF_FACESIZE]
Definition: wingdi.h:1910
UINT_PTR idFrom
Definition: winuser.h:3157
UINT code
Definition: winuser.h:3158
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
int WINAPI GetWindowTextW(HWND hWnd, LPWSTR lpString, int nMaxCount)
Definition: window.c:1412
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
FARPROC FONTENUMPROCW
Definition: wingdi.h:2897
HDC WINAPI CreateCompatibleDC(_In_opt_ HDC hdc)
int WINAPI EnumFontFamiliesW(_In_ HDC, _In_opt_ LPCWSTR, _In_ FONTENUMPROCW, _In_ LPARAM)
#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)
DWORD WINAPI GetSysColor(_In_ int)
#define ODS_SELECTED
Definition: winuser.h:2544
#define SW_HIDE
Definition: winuser.h:767
#define SWP_NOACTIVATE
Definition: winuser.h:1241
#define IMAGE_BITMAP
Definition: winuser.h:211
#define MAKELPARAM(l, h)
Definition: winuser.h:4007
#define COLOR_WINDOW
Definition: winuser.h:917
BOOL WINAPI ShowWindow(_In_ HWND, _In_ int)
BOOL WINAPI CheckDlgButton(_In_ HWND, _In_ int, _In_ UINT)
#define IDCANCEL
Definition: winuser.h:830
#define SM_CYVSCROLL
Definition: winuser.h:980
#define COLOR_WINDOWTEXT
Definition: winuser.h:920
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:925
#define GetDlgItemText
Definition: winuser.h:5784
HBRUSH WINAPI GetSysColorBrush(_In_ int)
#define LR_CREATEDIBSECTION
Definition: winuser.h:1097
#define DT_SINGLELINE
Definition: winuser.h:540
#define CB_ERR
Definition: winuser.h:2434
#define SWP_NOSIZE
Definition: winuser.h:1244
#define CB_RESETCONTENT
Definition: winuser.h:1958
HWND WINAPI GetDlgItem(_In_opt_ HWND, _In_ int)
#define CBN_SELCHANGE
Definition: winuser.h:1978
#define MB_ICONERROR
Definition: winuser.h:786
BOOL WINAPI SetWindowTextW(_In_ HWND, _In_opt_ LPCWSTR)
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:5842
BOOL WINAPI EnableWindow(_In_ HWND, _In_ BOOL)
#define COLOR_HIGHLIGHTTEXT
Definition: winuser.h:926
#define MB_ICONEXCLAMATION
Definition: winuser.h:784
#define DT_VCENTER
Definition: winuser.h:543
BOOL WINAPI CheckRadioButton(_In_ HWND, _In_ int, _In_ int, _In_ int)
#define MessageBox
Definition: winuser.h:5821
UINT WINAPI GetDlgItemInt(_In_ HWND, _In_ int, _Out_opt_ PBOOL, _In_ BOOL)
BOOL WINAPI DrawFocusRect(_In_ HDC, _In_ LPCRECT)
#define MAKEINTRESOURCEW(i)
Definition: winuser.h:582
#define SWP_NOZORDER
Definition: winuser.h:1246
#define DM_REPOSITION
Definition: winuser.h:2099
#define ODS_FOCUS
Definition: winuser.h:2548
int WINAPI GetSystemMetrics(_In_ int)
#define SetDlgItemText
Definition: winuser.h:5848
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define BST_CHECKED
Definition: winuser.h:197
#define CBN_EDITCHANGE
Definition: winuser.h:1974
BOOL WINAPI EndDialog(_In_ HWND, _In_ INT_PTR)
__wchar_t WCHAR
Definition: xmlstorage.h:180
WCHAR * LPWSTR
Definition: xmlstorage.h:184