home *** CD-ROM | disk | FTP | other *** search
- // mycomvw.cpp : implementation of the CMycomboView class
- //
-
- #include "stdafx.h"
- #include "mycombo.h"
-
- #include "mycomdoc.h"
- #include "mycomvw.h"
-
- #ifdef _DEBUG
- #undef THIS_FILE
- static char BASED_CODE THIS_FILE[] = __FILE__;
- #endif
-
- /////////////////////////////////////////////////////////////////////////////
- // CMycomboView
-
- IMPLEMENT_DYNCREATE(CMycomboView, CView)
-
- BEGIN_MESSAGE_MAP(CMycomboView, CView)
- //{{AFX_MSG_MAP(CMycomboView)
- ON_COMMAND(ID_FILE_TRYIT, OnFileTryit)
- ON_COMMAND(ID_FILE_CURRENTITEM, OnFileCurrentitem)
- //}}AFX_MSG_MAP
- END_MESSAGE_MAP()
-
- /////////////////////////////////////////////////////////////////////////////
- // CMycomboView construction/destruction
-
- CMycomboView::CMycomboView()
- {
- // TODO: add construction code here
- }
-
- CMycomboView::~CMycomboView()
- {
- }
-
- /////////////////////////////////////////////////////////////////////////////
- // CMycomboView drawing
-
- void CMycomboView::OnDraw(CDC* pDC)
- {
- CMycomboDoc* pDoc = GetDocument();
- ASSERT_VALID(pDoc);
-
- // TODO: add draw code for native data here
- }
-
- /////////////////////////////////////////////////////////////////////////////
- // CMycomboView diagnostics
-
- #ifdef _DEBUG
- void CMycomboView::AssertValid() const
- {
- CView::AssertValid();
- }
-
- void CMycomboView::Dump(CDumpContext& dc) const
- {
- CView::Dump(dc);
- }
-
- CMycomboDoc* CMycomboView::GetDocument() // non-debug version is inline
- {
- ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CMycomboDoc)));
- return (CMycomboDoc*)m_pDocument;
- }
- #endif //_DEBUG
-
- /////////////////////////////////////////////////////////////////////////////
- // CMycomboView message handlers
-
- void CMycomboView::OnFileTryit()
- {
- // TODO: Add your command handler code here
-
- //////////////////////
- // MY CODE STARTS HERE
- //////////////////////
-
- // Display the dialog box.
- dlg.DoModal();
-
- ////////////////////
- // MY CODE ENDS HERE
- ////////////////////
-
- }
-
- void CMycomboView::OnFileCurrentitem()
- {
- // TODO: Add your command handler code here
-
- //////////////////////
- // MY CODE STARTS HERE
- //////////////////////
-
- MessageBox ( "The current selection in the combo box is: "+
- dlg.m_SelectedItem);
-
- ////////////////////
- // MY CODE ENDS HERE
- ////////////////////
-
- }
-