X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;ds=sidebyside;f=research%2Ftransmission_spectroscopy%2FTOF%2FWin32%2B%2B%2FWCE%20samples%2FDlgSubclass%2FMyDialog.cpp;fp=research%2Ftransmission_spectroscopy%2FTOF%2FWin32%2B%2B%2FWCE%20samples%2FDlgSubclass%2FMyDialog.cpp;h=0b99a53877cc7cd2ae42c7bf3875eb76dd4a950b;hb=70a96cca12cb006506461d26cd112bab179fe74c;hp=0000000000000000000000000000000000000000;hpb=8caf60af39689a3546074f0c68d14c3a2e28191e;p=matches%2Fhonours.git diff --git a/research/transmission_spectroscopy/TOF/Win32++/WCE samples/DlgSubclass/MyDialog.cpp b/research/transmission_spectroscopy/TOF/Win32++/WCE samples/DlgSubclass/MyDialog.cpp new file mode 100644 index 00000000..0b99a538 --- /dev/null +++ b/research/transmission_spectroscopy/TOF/Win32++/WCE samples/DlgSubclass/MyDialog.cpp @@ -0,0 +1,76 @@ +/////////////////////////////////////// +// MyDialog.cpp + +#include "MyDialog.h" +#include "Hyperlink.h" +#include "resource.h" + + +// Definitions for the CMyDialog class +CMyDialog::CMyDialog(UINT nResID, CWnd* pParent) + : CDialog(nResID, pParent) +{ +} + +CMyDialog::CMyDialog(LPCTSTR lpszResName, CWnd* pParent) + : CDialog(lpszResName, pParent) +{ +} + +CMyDialog::~CMyDialog() +{ +} + +INT_PTR CMyDialog::DialogProc(UINT uMsg, WPARAM wParam, LPARAM lParam) +{ +// switch (uMsg) +// { + //Additional messages to be handled go here +// } + + + //Use the dialogframe default message handling for remaining messages + return DialogProcDefault(uMsg, wParam, lParam); +} + +BOOL CMyDialog::OnCommand(UINT nID) +{ +// switch (nID) +// { + +// } //switch (nID) + + return TRUE; +} + +BOOL CMyDialog::OnInitDialog() +{ + // Set the Icon + SetIconLarge(IDW_MAIN); + SetIconSmall(IDW_MAIN); + + // Put some text in the edit boxes + ::SetDlgItemText(GetHwnd(), IDC_EDIT1, TEXT("Edit Control")); + + // Turn our button into a MyButton object + m_Button.AttachDlgItem(IDC_BUTTON2, this); + + // Turn our static control into a hyperlink + m_Hyperlink.AttachDlgItem(IDC_STATIC4, this); + + return true; +} + +void CMyDialog::OnOK() +{ + ::MessageBox(NULL, TEXT("OK Button Pressed. Program will exit now."), TEXT("Button"), MB_OK); + CDialog::OnOK(); +} + + + +void CMyDialog::SetStatic(LPCTSTR szString) +{ + ::SetDlgItemText(GetHwnd(), IDC_EDIT1, szString); +} +