ReactOS  0.4.15-dev-4872-g8a3db97
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: resource.h:134

Member Function Documentation

◆ OnCancel()

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

Definition at line 119 of file dialogs.cpp.

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

◆ OnClose()

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

Definition at line 107 of file dialogs.cpp.

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

◆ OnDefault()

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

Definition at line 125 of file dialogs.cpp.

126 {
133  return 0;
134 }
BOOL WINAPI CheckDlgButton(_In_ HWND, _In_ int, _In_ UINT)
#define FALSE
Definition: types.h:117
#define IDD_ATTRIBUTESRB5
Definition: resource.h:152
int GetWidth() const
Definition: history.cpp:215
#define IDD_ATTRIBUTESEDIT1
Definition: resource.h:135
#define IDD_ATTRIBUTESRB3
Definition: resource.h:150
BOOL WINAPI SetDlgItemInt(_In_ HWND, _In_ int, _In_ UINT, _In_ BOOL)
ImageModel imageModel
Definition: main.cpp:32
#define IDD_ATTRIBUTESEDIT2
Definition: resource.h:136
int GetHeight() const
Definition: history.cpp:220
#define BST_CHECKED
Definition: winuser.h:197

◆ OnEdit1()

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

Definition at line 163 of file dialogs.cpp.

164 {
165  if (Edit_GetModify(hWndCtl))
166  {
167  TCHAR tempS[100];
169  {
171  newWidth = max(1, (int) (_tcstod(tempS, NULL) * fileHPPM * 0.0254));
172  }
174  {
176  newWidth = max(1, (int) (_tcstod(tempS, NULL) * fileHPPM / 100));
177  }
179  {
181  newWidth = max(1, _tstoi(tempS));
182  }
183  Edit_SetModify(hWndCtl, FALSE);
184  }
185  return 0;
186 }
#define max(a, b)
Definition: svc.c:63
#define Edit_GetModify(hwndCtl)
Definition: windowsx.h:65
#define _tstoi
Definition: tchar.h:598
#define FALSE
Definition: types.h:117
int fileHPPM
Definition: main.cpp:56
UINT WINAPI IsDlgButtonChecked(_In_ HWND, _In_ int)
char TCHAR
Definition: xmlstorage.h:189
#define IDD_ATTRIBUTESEDIT1
Definition: resource.h:135
#define GetDlgItemText
Definition: winuser.h:5765
#define _tcstod
Definition: xmlstorage.h:197
#define IDD_ATTRIBUTESRB3
Definition: resource.h:150
#define _countof(array)
Definition: sndvol32.h:68
#define Edit_SetModify(hwndCtl, fModified)
Definition: windowsx.h:80
#define IDD_ATTRIBUTESRB1
Definition: resource.h:148
#define NULL
Definition: types.h:112
#define IDD_ATTRIBUTESRB2
Definition: resource.h:149

◆ OnEdit2()

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

Definition at line 188 of file dialogs.cpp.

189 {
190  if (Edit_GetModify(hWndCtl))
191  {
192  TCHAR tempS[100];
194  {
196  newHeight = max(1, (int) (_tcstod(tempS, NULL) * fileVPPM * 0.0254));
197  }
199  {
201  newHeight = max(1, (int) (_tcstod(tempS, NULL) * fileVPPM / 100));
202  }
204  {
206  newHeight = max(1, _tstoi(tempS));
207  }
208  Edit_SetModify(hWndCtl, FALSE);
209  }
210  return 0;
211 }
#define max(a, b)
Definition: svc.c:63
#define Edit_GetModify(hwndCtl)
Definition: windowsx.h:65
#define _tstoi
Definition: tchar.h:598
#define FALSE
Definition: types.h:117
UINT WINAPI IsDlgButtonChecked(_In_ HWND, _In_ int)
char TCHAR
Definition: xmlstorage.h:189
#define GetDlgItemText
Definition: winuser.h:5765
#define _tcstod
Definition: xmlstorage.h:197
#define IDD_ATTRIBUTESRB3
Definition: resource.h:150
#define _countof(array)
Definition: sndvol32.h:68
#define IDD_ATTRIBUTESEDIT2
Definition: resource.h:136
#define Edit_SetModify(hwndCtl, fModified)
Definition: windowsx.h:80
#define IDD_ATTRIBUTESRB1
Definition: resource.h:148
#define NULL
Definition: types.h:112
int fileVPPM
Definition: main.cpp:57
#define IDD_ATTRIBUTESRB2
Definition: resource.h:149

◆ OnInitDialog()

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

Definition at line 78 of file dialogs.cpp.

79 {
82 
87 
88  if (isAFile)
89  {
90  TCHAR date[100];
91  TCHAR temp[100];
94  _tcscat(date, _T(" "));
95  _tcscat(date, temp);
96  CString strSize;
97  strSize.Format(IDS_FILESIZE, fileSize);
100  }
101  CString strRes;
104  return 0;
105 }
BOOL isAFile
Definition: main.cpp:53
BOOL WINAPI CheckDlgButton(_In_ HWND, _In_ int, _In_ UINT)
int fileSize
Definition: main.cpp:55
#define LOCALE_USER_DEFAULT
#define IDS_FILESIZE
Definition: resource.h:207
void __cdecl Format(UINT nFormatID,...)
Definition: cstringt.h:753
#define IDD_ATTRIBUTESTEXT7
Definition: resource.h:143
#define IDD_ATTRIBUTESTEXT8
Definition: resource.h:144
SYSTEMTIME fileTime
Definition: main.cpp:58
#define FALSE
Definition: types.h:117
#define IDS_PRINTRES
Definition: resource.h:208
int fileHPPM
Definition: main.cpp:56
#define IDD_ATTRIBUTESRB5
Definition: resource.h:152
int GetWidth() const
Definition: history.cpp:215
char TCHAR
Definition: xmlstorage.h:189
#define _T(x)
Definition: vfdio.h:22
#define IDD_ATTRIBUTESEDIT1
Definition: resource.h:135
#define IDD_ATTRIBUTESRB3
Definition: resource.h:150
#define _countof(array)
Definition: sndvol32.h:68
#define SetDlgItemText
Definition: winuser.h:5829
BOOL WINAPI SetDlgItemInt(_In_ HWND, _In_ int, _In_ UINT, _In_ BOOL)
ImageModel imageModel
Definition: main.cpp:32
#define IDD_ATTRIBUTESEDIT2
Definition: resource.h:136
#define GetTimeFormat
Definition: winnls.h:1189
int GetHeight() const
Definition: history.cpp:220
static calc_node_t temp
Definition: rpn_ieee.c:38
#define GetDateFormat
Definition: winnls.h:1184
__u16 date
Definition: mkdosfs.c:366
#define NULL
Definition: types.h:112
#define BST_CHECKED
Definition: winuser.h:197
#define IDD_ATTRIBUTESTEXT6
Definition: resource.h:142
_TCHAR * _tcscat(_TCHAR *s, const _TCHAR *append)
Definition: tcscat.h:8
int fileVPPM
Definition: main.cpp:57

◆ OnOk()

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

Definition at line 113 of file dialogs.cpp.

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

◆ OnRadioButton1()

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

Definition at line 136 of file dialogs.cpp.

137 {
138  CString strNum;
139  strNum.Format(_T("%.3lf"), newWidth / (0.0254 * fileHPPM));
141  strNum.Format(_T("%.3lf"), newHeight / (0.0254 * fileVPPM));
143  return 0;
144 }
void __cdecl Format(UINT nFormatID,...)
Definition: cstringt.h:753
int fileHPPM
Definition: main.cpp:56
#define IDD_ATTRIBUTESEDIT1
Definition: resource.h:135
#define _T(x)
Definition: vfdio.h:22
#define SetDlgItemText
Definition: winuser.h:5829
#define IDD_ATTRIBUTESEDIT2
Definition: resource.h:136
int fileVPPM
Definition: main.cpp:57

◆ OnRadioButton2()

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

Definition at line 146 of file dialogs.cpp.

147 {
148  CString strNum;
149  strNum.Format(_T("%.3lf"), newWidth * 100.0 / fileHPPM);
151  strNum.Format(_T("%.3lf"), newHeight * 100.0 / fileVPPM);
153  return 0;
154 }
void __cdecl Format(UINT nFormatID,...)
Definition: cstringt.h:753
int fileHPPM
Definition: main.cpp:56
#define IDD_ATTRIBUTESEDIT1
Definition: resource.h:135
#define _T(x)
Definition: vfdio.h:22
#define SetDlgItemText
Definition: winuser.h:5829
#define IDD_ATTRIBUTESEDIT2
Definition: resource.h:136
int fileVPPM
Definition: main.cpp:57

◆ OnRadioButton3()

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

Definition at line 156 of file dialogs.cpp.

157 {
160  return 0;
161 }
#define FALSE
Definition: types.h:117
#define IDD_ATTRIBUTESEDIT1
Definition: resource.h:135
BOOL WINAPI SetDlgItemInt(_In_ HWND, _In_ int, _In_ UINT, _In_ BOOL)
#define IDD_ATTRIBUTESEDIT2
Definition: resource.h:136

Member Data Documentation

◆ newHeight

int CAttributesDialog::newHeight

◆ newWidth

int CAttributesDialog::newWidth

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