ReactOS  0.4.14-dev-1115-gebeeb9d
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
 

Detailed Description

Definition at line 34 of file dialogs.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
IDD 

Definition at line 37 of file dialogs.h.

37 { IDD = IDD_ATTRIBUTES };
#define IDD_ATTRIBUTES
Definition: definitions.h:163

Member Function Documentation

◆ OnCancel()

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

Definition at line 118 of file dialogs.cpp.

119 {
120  EndDialog(0);
121  return 0;
122 }
BOOL WINAPI EndDialog(_In_ HWND, _In_ INT_PTR)

◆ OnClose()

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

Definition at line 106 of file dialogs.cpp.

107 {
108  EndDialog(0);
109  return 0;
110 }
BOOL WINAPI EndDialog(_In_ HWND, _In_ INT_PTR)

◆ OnDefault()

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

Definition at line 124 of file dialogs.cpp.

125 {
132  return 0;
133 }
#define IDD_ATTRIBUTESEDIT1
Definition: definitions.h:164
BOOL WINAPI CheckDlgButton(_In_ HWND, _In_ int, _In_ UINT)
#define IDD_ATTRIBUTESRB3
Definition: definitions.h:179
int GetWidth()
Definition: history.cpp:195
int GetHeight()
Definition: history.cpp:200
BOOL WINAPI SetDlgItemInt(_In_ HWND, _In_ int, _In_ UINT, _In_ BOOL)
ImageModel imageModel
Definition: main.cpp:32
#define IDD_ATTRIBUTESEDIT2
Definition: definitions.h:165
#define BST_CHECKED
Definition: winuser.h:197
#define IDD_ATTRIBUTESRB5
Definition: definitions.h:181

◆ OnEdit1()

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

Definition at line 162 of file dialogs.cpp.

163 {
164  if (Edit_GetModify(hWndCtl))
165  {
166  TCHAR tempS[100];
168  {
169  GetDlgItemText(IDD_ATTRIBUTESEDIT1, tempS, SIZEOF(tempS));
170  newWidth = max(1, (int) (_tcstod(tempS, NULL) * fileHPPM * 0.0254));
171  }
173  {
174  GetDlgItemText(IDD_ATTRIBUTESEDIT1, tempS, SIZEOF(tempS));
175  newWidth = max(1, (int) (_tcstod(tempS, NULL) * fileHPPM / 100));
176  }
178  {
179  GetDlgItemText(IDD_ATTRIBUTESEDIT1, tempS, SIZEOF(tempS));
180  newWidth = max(1, _tstoi(tempS));
181  }
182  Edit_SetModify(hWndCtl, FALSE);
183  }
184  return 0;
185 }
#define IDD_ATTRIBUTESEDIT1
Definition: definitions.h:164
#define max(a, b)
Definition: svc.c:63
#define IDD_ATTRIBUTESRB3
Definition: definitions.h:179
#define Edit_GetModify(hwndCtl)
Definition: windowsx.h:65
#define _tstoi
Definition: tchar.h:598
#define SIZEOF(_ar)
Definition: calc.h:97
smooth NULL
Definition: ftsmooth.c:416
int fileHPPM
Definition: main.cpp:55
UINT WINAPI IsDlgButtonChecked(_In_ HWND, _In_ int)
char TCHAR
Definition: xmlstorage.h:189
#define GetDlgItemText
Definition: winuser.h:5760
#define _tcstod
Definition: xmlstorage.h:197
#define IDD_ATTRIBUTESRB1
Definition: definitions.h:177
#define Edit_SetModify(hwndCtl, fModified)
Definition: windowsx.h:80
#define IDD_ATTRIBUTESRB2
Definition: definitions.h:178

◆ OnEdit2()

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

Definition at line 187 of file dialogs.cpp.

188 {
189  if (Edit_GetModify(hWndCtl))
190  {
191  TCHAR tempS[100];
193  {
194  GetDlgItemText(IDD_ATTRIBUTESEDIT2, tempS, SIZEOF(tempS));
195  newHeight = max(1, (int) (_tcstod(tempS, NULL) * fileVPPM * 0.0254));
196  }
198  {
199  GetDlgItemText(IDD_ATTRIBUTESEDIT2, tempS, SIZEOF(tempS));
200  newHeight = max(1, (int) (_tcstod(tempS, NULL) * fileVPPM / 100));
201  }
203  {
204  GetDlgItemText(IDD_ATTRIBUTESEDIT2, tempS, SIZEOF(tempS));
205  newHeight = max(1, _tstoi(tempS));
206  }
207  Edit_SetModify(hWndCtl, FALSE);
208  }
209  return 0;
210 }
#define max(a, b)
Definition: svc.c:63
#define IDD_ATTRIBUTESRB3
Definition: definitions.h:179
#define Edit_GetModify(hwndCtl)
Definition: windowsx.h:65
#define _tstoi
Definition: tchar.h:598
#define SIZEOF(_ar)
Definition: calc.h:97
smooth NULL
Definition: ftsmooth.c:416
UINT WINAPI IsDlgButtonChecked(_In_ HWND, _In_ int)
char TCHAR
Definition: xmlstorage.h:189
#define GetDlgItemText
Definition: winuser.h:5760
#define _tcstod
Definition: xmlstorage.h:197
#define IDD_ATTRIBUTESRB1
Definition: definitions.h:177
#define Edit_SetModify(hwndCtl, fModified)
Definition: windowsx.h:80
#define IDD_ATTRIBUTESEDIT2
Definition: definitions.h:165
int fileVPPM
Definition: main.cpp:56
#define IDD_ATTRIBUTESRB2
Definition: definitions.h:178

◆ OnInitDialog()

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

Definition at line 77 of file dialogs.cpp.

78 {
81 
86 
87  if (isAFile)
88  {
89  TCHAR date[100];
90  TCHAR temp[100];
93  _tcscat(date, _T(" "));
94  _tcscat(date, temp);
95  CString strSize;
96  strSize.Format(IDS_FILESIZE, fileSize);
99  }
100  CString strRes;
103  return 0;
104 }
BOOL isAFile
Definition: main.cpp:53
#define IDD_ATTRIBUTESEDIT1
Definition: definitions.h:164
BOOL WINAPI CheckDlgButton(_In_ HWND, _In_ int, _In_ UINT)
#define IDD_ATTRIBUTESRB3
Definition: definitions.h:179
int fileSize
Definition: main.cpp:54
#define IDD_ATTRIBUTESTEXT8
Definition: definitions.h:173
#define LOCALE_USER_DEFAULT
void __cdecl Format(UINT nFormatID,...)
Definition: cstringt.h:688
#define IDS_PRINTRES
Definition: definitions.h:232
SYSTEMTIME fileTime
Definition: main.cpp:57
#define SIZEOF(_ar)
Definition: calc.h:97
#define IDS_FILESIZE
Definition: definitions.h:231
smooth NULL
Definition: ftsmooth.c:416
int fileHPPM
Definition: main.cpp:55
char TCHAR
Definition: xmlstorage.h:189
#define _T(x)
Definition: vfdio.h:22
#define SetDlgItemText
Definition: winuser.h:5824
int GetWidth()
Definition: history.cpp:195
int GetHeight()
Definition: history.cpp:200
BOOL WINAPI SetDlgItemInt(_In_ HWND, _In_ int, _In_ UINT, _In_ BOOL)
ImageModel imageModel
Definition: main.cpp:32
#define GetTimeFormat
Definition: winnls.h:1186
#define IDD_ATTRIBUTESEDIT2
Definition: definitions.h:165
static calc_node_t temp
Definition: rpn_ieee.c:38
#define GetDateFormat
Definition: winnls.h:1181
__u16 date
Definition: mkdosfs.c:366
#define BST_CHECKED
Definition: winuser.h:197
_TCHAR * _tcscat(_TCHAR *s, const _TCHAR *append)
Definition: tcscat.h:8
#define IDD_ATTRIBUTESTEXT7
Definition: definitions.h:172
#define IDD_ATTRIBUTESTEXT6
Definition: definitions.h:171
#define IDD_ATTRIBUTESRB5
Definition: definitions.h:181
int fileVPPM
Definition: main.cpp:56

◆ OnOk()

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

Definition at line 112 of file dialogs.cpp.

113 {
114  EndDialog(1);
115  return 0;
116 }
BOOL WINAPI EndDialog(_In_ HWND, _In_ INT_PTR)

◆ OnRadioButton1()

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

Definition at line 135 of file dialogs.cpp.

136 {
137  CString strNum;
138  strNum.Format(_T("%.3lf"), newWidth / (0.0254 * fileHPPM));
140  strNum.Format(_T("%.3lf"), newHeight / (0.0254 * fileVPPM));
142  return 0;
143 }
#define IDD_ATTRIBUTESEDIT1
Definition: definitions.h:164
void __cdecl Format(UINT nFormatID,...)
Definition: cstringt.h:688
int fileHPPM
Definition: main.cpp:55
#define _T(x)
Definition: vfdio.h:22
#define SetDlgItemText
Definition: winuser.h:5824
#define IDD_ATTRIBUTESEDIT2
Definition: definitions.h:165
int fileVPPM
Definition: main.cpp:56

◆ OnRadioButton2()

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

Definition at line 145 of file dialogs.cpp.

146 {
147  CString strNum;
148  strNum.Format(_T("%.3lf"), newWidth * 100.0 / fileHPPM);
150  strNum.Format(_T("%.3lf"), newHeight * 100.0 / fileVPPM);
152  return 0;
153 }
#define IDD_ATTRIBUTESEDIT1
Definition: definitions.h:164
void __cdecl Format(UINT nFormatID,...)
Definition: cstringt.h:688
int fileHPPM
Definition: main.cpp:55
#define _T(x)
Definition: vfdio.h:22
#define SetDlgItemText
Definition: winuser.h:5824
#define IDD_ATTRIBUTESEDIT2
Definition: definitions.h:165
int fileVPPM
Definition: main.cpp:56

◆ OnRadioButton3()

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

Definition at line 155 of file dialogs.cpp.

156 {
159  return 0;
160 }
#define IDD_ATTRIBUTESEDIT1
Definition: definitions.h:164
BOOL WINAPI SetDlgItemInt(_In_ HWND, _In_ int, _In_ UINT, _In_ BOOL)
#define IDD_ATTRIBUTESEDIT2
Definition: definitions.h:165

Member Data Documentation

◆ newHeight

int CAttributesDialog::newHeight

◆ newWidth

int CAttributesDialog::newWidth

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