ReactOS 0.4.15-dev-8096-ga0eec98
CAttributesDialog Class Reference

#include <dialogs.h>

Inheritance diagram for CAttributesDialog:
Collaboration diagram for CAttributesDialog:

Public Types

enum  { IDD = IDD_ATTRIBUTES }
 

Public Member Functions

LRESULT OnInitDialog (UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
LRESULT OnClose (UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
LRESULT OnOk (WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL &bHandled)
 
LRESULT OnCancel (WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL &bHandled)
 
LRESULT OnDefault (WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL &bHandled)
 
LRESULT OnRadioButton1 (WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL &bHandled)
 
LRESULT OnRadioButton2 (WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL &bHandled)
 
LRESULT OnRadioButton3 (WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL &bHandled)
 
LRESULT OnEdit1 (WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL &bHandled)
 
LRESULT OnEdit2 (WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL &bHandled)
 

Public Attributes

int newWidth
 
int newHeight
 
BOOL m_bBlackAndWhite
 

Detailed Description

Definition at line 35 of file dialogs.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
IDD 

Definition at line 38 of file dialogs.h.

#define IDD_ATTRIBUTES
Definition: resource.h:141

Member Function Documentation

◆ OnCancel()

LRESULT CAttributesDialog::OnCancel ( WORD  wNotifyCode,
WORD  wID,
HWND  hWndCtl,
BOOL bHandled 
)

Definition at line 148 of file dialogs.cpp.

149{
150 EndDialog(0);
151 return 0;
152}
BOOL WINAPI EndDialog(_In_ HWND, _In_ INT_PTR)

◆ OnClose()

LRESULT CAttributesDialog::OnClose ( UINT  nMsg,
WPARAM  wParam,
LPARAM  lParam,
BOOL bHandled 
)

Definition at line 135 of file dialogs.cpp.

136{
137 EndDialog(0);
138 return 0;
139}

◆ OnDefault()

LRESULT CAttributesDialog::OnDefault ( WORD  wNotifyCode,
WORD  wID,
HWND  hWndCtl,
BOOL bHandled 
)

Definition at line 154 of file dialogs.cpp.

155{
162 return 0;
163}
#define IDD_ATTRIBUTESRB5
Definition: resource.h:159
#define IDD_ATTRIBUTESRB3
Definition: resource.h:157
#define IDD_ATTRIBUTESEDIT2
Definition: resource.h:143
#define IDD_ATTRIBUTESEDIT1
Definition: resource.h:142
int GetWidth() const
Definition: history.cpp:253
int GetHeight() const
Definition: history.cpp:258
#define FALSE
Definition: types.h:117
ImageModel imageModel
Definition: history.cpp:11
BOOL WINAPI CheckDlgButton(_In_ HWND, _In_ int, _In_ UINT)
BOOL WINAPI SetDlgItemInt(_In_ HWND, _In_ int, _In_ UINT, _In_ BOOL)
#define BST_CHECKED
Definition: winuser.h:197

◆ OnEdit1()

LRESULT CAttributesDialog::OnEdit1 ( WORD  wNotifyCode,
WORD  wID,
HWND  hWndCtl,
BOOL bHandled 
)

Definition at line 201 of file dialogs.cpp.

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}
#define IDD_ATTRIBUTESRB1
Definition: resource.h:155
#define IDD_ATTRIBUTESRB2
Definition: resource.h:156
float g_xDpi
Definition: dib.cpp:11
float PpcmFromDpi(float dpi)
Definition: dib.cpp:25
#define NULL
Definition: types.h:112
_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)
#define _countof(array)
Definition: sndvol32.h:70
#define max(a, b)
Definition: svc.c:63
#define Edit_GetModify(hwndCtl)
Definition: windowsx.h:90
#define Edit_SetModify(hwndCtl, fModified)
Definition: windowsx.h:105
#define GetDlgItemText
Definition: winuser.h:5785
UINT WINAPI IsDlgButtonChecked(_In_ HWND, _In_ int)
__wchar_t WCHAR
Definition: xmlstorage.h:180

◆ OnEdit2()

LRESULT CAttributesDialog::OnEdit2 ( WORD  wNotifyCode,
WORD  wID,
HWND  hWndCtl,
BOOL bHandled 
)

Definition at line 226 of file dialogs.cpp.

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}
float g_yDpi
Definition: dib.cpp:12

◆ OnInitDialog()

LRESULT CAttributesDialog::OnInitDialog ( UINT  nMsg,
WPARAM  wParam,
LPARAM  lParam,
BOOL bHandled 
)

Definition at line 95 of file dialogs.cpp.

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}
#define ROUND(x)
Definition: dib.h:42
BOOL g_isAFile
Definition: main.cpp:20
#define IDD_ATTRIBUTESTEXT7
Definition: resource.h:150
#define IDS_PRINTRES
Definition: resource.h:227
#define IDD_ATTRIBUTESTEXT6
Definition: resource.h:149
#define IDD_ATTRIBUTESTEXT8
Definition: resource.h:151
#define IDD_ATTRIBUTESRB4
Definition: resource.h:158
#define IDS_FILESIZE
Definition: resource.h:214
void __cdecl Format(UINT nFormatID,...)
Definition: cstringt.h:818
BOOL IsBlackAndWhite()
Definition: history.cpp:328
SYSTEMTIME g_fileTime
Definition: dib.cpp:13
INT g_fileSize
Definition: dib.cpp:10
#define TRUE
Definition: types.h:120
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
#define LOCALE_USER_DEFAULT
#define L(x)
Definition: ntvdm.h:50
static calc_node_t temp
Definition: rpn_ieee.c:38
STRSAFEAPI StringCchCatW(STRSAFE_LPWSTR pszDest, size_t cchDest, STRSAFE_LPCWSTR pszSrc)
Definition: strsafe.h:325
BOOL WINAPI CheckRadioButton(_In_ HWND, _In_ int, _In_ int, _In_ int)
#define SetDlgItemText
Definition: winuser.h:5849

◆ OnOk()

LRESULT CAttributesDialog::OnOk ( WORD  wNotifyCode,
WORD  wID,
HWND  hWndCtl,
BOOL bHandled 
)

Definition at line 141 of file dialogs.cpp.

142{
144 EndDialog(1);
145 return 0;
146}
BOOL m_bBlackAndWhite
Definition: dialogs.h:67

◆ OnRadioButton1()

LRESULT CAttributesDialog::OnRadioButton1 ( WORD  wNotifyCode,
WORD  wID,
HWND  hWndCtl,
BOOL bHandled 
)

Definition at line 165 of file dialogs.cpp.

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}

◆ OnRadioButton2()

LRESULT CAttributesDialog::OnRadioButton2 ( WORD  wNotifyCode,
WORD  wID,
HWND  hWndCtl,
BOOL bHandled 
)

Definition at line 178 of file dialogs.cpp.

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}

◆ OnRadioButton3()

LRESULT CAttributesDialog::OnRadioButton3 ( WORD  wNotifyCode,
WORD  wID,
HWND  hWndCtl,
BOOL bHandled 
)

Definition at line 191 of file dialogs.cpp.

Member Data Documentation

◆ m_bBlackAndWhite

BOOL CAttributesDialog::m_bBlackAndWhite

Definition at line 67 of file dialogs.h.

Referenced by CMainWindow::OnCommand(), and OnOk().

◆ newHeight

int CAttributesDialog::newHeight

◆ newWidth

int CAttributesDialog::newWidth

The documentation for this class was generated from the following files: