夢幻之旅

          DEBUG - 天道酬勤

             :: 首頁 :: 新隨筆 :: 聯(lián)系 :: 聚合  :: 管理 ::
            671 隨筆 :: 6 文章 :: 256 評論 :: 0 Trackbacks
          class CMyApp:public CWinApp
          {
          public:
              
          virtual BOOL InitInstance();
          }
          ;

          class CMainWindow:public CFrameWnd
          {
          public:
              CMainWindow();
          protected:
              afx_msg 
          void OnPaint();
              DECLARE_MESSAGE_MAP()
          }
          ;


          #include <afxwin.h>
          #include 
          "Hello.h"
          CMyApp myAPP;

          BOOL CMyApp::InitInstance()
          {
              m_pMainWnd 
          = new CMainWindow;
                 m_pMainWnd->SetIcon(LoadIcon(IDI_ICON1),TRUE);
              m_pMainWnd
          ->ShowWindow(m_nCmdShow);
              m_pMainWnd
          ->UpdateWindow();
              
          return TRUE;
          }


          BEGIN_MESSAGE_MAP(CMainWindow,CFrameWnd)
              ON_WM_PAINT()
          END_MESSAGE_MAP()

          CMainWindow::CMainWindow()
          {
              Create(NULL,_T(
          "aaa"));
          }


          void CMainWindow::OnPaint()
          {
              CPaintDC dc(
          this);
              CRect rect;
              GetClientRect(
          &rect);
              dc.DrawText(_T(
          "ad"),-1,&rect,DT_SINGLELINE|DT_CENTER|DT_VCENTER);
          }


          Project Setting
          General
          Use of MFC 選擇 Use MFC in a Shared DLL
          posted on 2009-08-19 18:51 HUIKK 閱讀(278) 評論(0)  編輯  收藏 所屬分類: C/C++
          主站蜘蛛池模板: 右玉县| 南宁市| 岑溪市| 神池县| 辽源市| 蓬安县| 武安市| 沈丘县| 鸡西市| 江陵县| 贺州市| 焉耆| 扶余县| 荔波县| 白河县| 松桃| 阿克| 天津市| 福海县| 柳州市| 株洲县| 江口县| 许昌县| 乌海市| 洪洞县| 河北省| 越西县| 安化县| 东山县| 安平县| 贺兰县| 嘉祥县| 博白县| 车致| 新丰县| 崇礼县| 汝南县| 信宜市| 拉孜县| 闽清县| 犍为县|