Replacing Dialogue with Rebar
hi ajay sir,
i m sending the code Snippets plz see it , and help me
/// /
//************************* Dlgthr.h
code****************************************************//
class CThresholdDlg : public CDialog
{
// Construction
CBitmapButton m_btnFirst, m_btnPrev, m_btnNext, m_btnLast;
public:
CThresholdDlg(CWnd* pParent = NULL); // standard constructor
// Dialog Data
//{{AFX_DATA(CThresholdDlg)
enum { IDD = IDD_THRESHOLD }; // disabled by premanshu
//enum { IDD=IDR_MAINFRAME }; //added by premanshu
CSpinButtonCtrl m_spinNodules;
CSpinButtonCtrl m_spinPhase;
int m_iNodulesValue;
int m_iPhaseValue;
//}}AFX_DATA
// Overrides
//*************************************************************************=
=AD*********************
and //********************************Dlgthr.cpp
code*************************************
CThresholdDlg::CThresholdDlg(CWnd* pParent /*=NULL*/)
:CDialog(CThresholdDlg::IDD, pParent)
{
//{{AFX_DATA_INIT(CThresholdDlg)
m_iNodulesValue = 0;
m_iPhaseValue = 0;
// }}AFX_DATA_INIT
}
void CThresholdDlg::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CThresholdDlg)
DDX_Control(pDX, IDC_GRAPHITESPIN, m_spinNodules);
DDX_Control(pDX, IDC_PHASESPIN, m_spinPhase);
DDX_Text(pDX, IDC_THRESHOLD, m_iNodulesValue);
DDV_MinMaxInt(pDX, m_iNodulesValue, 0, 255);
DDX_Text(pDX, IDC_THRESHOLD_PHASE, m_iPhaseValue);
DDV_MinMaxInt(pDX, m_iPhaseValue, 0, 255);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CThresholdDlg, CDialog)
//{{AFX_MSG_MAP(CThresholdDlg)
ON_BN_CLICKED(IDC_FIRST, OnFirst)
ON_BN_CLICKED(IDC_NEXT, OnNext)
ON_BN_CLICKED(IDC_LAST, OnLast)
ON_BN_CLICKED(IDC_PREVIEW, OnPreview)
ON_BN_CLICKED(IDC_RESTORE, OnRestore)
ON_BN_CLICKED(IDC_PREV, OnPrev)
ON_BN_CLICKED(IDC_NODULE_RADIO, OnNoduleRadio)
ON_BN_CLICKED(IDC_PHASE_RADIO, OnPhaseRadio)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////**********************************************************************=
=AD*******************************
Premanshu sinha