• <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>
            posts - 62,  comments - 19,  trackbacks - 0
            1
              1 //   UseResourceDllView.cpp   :   implementation   of   the   CUseResourceDllView   class   
              2  //   
              3    
              4  #include   "stdafx.h"   
              5  #include   "UseResourceDll.h"   
              6    
              7  #include   "UseResourceDllDoc.h"   
              8  #include   "UseResourceDllView.h"   
              9    
             10  #include   "Dll_Resource.h"//資源dll(原名:resource.dll,屬于工程resource_dll)   
             11    
             12  #ifdef   _DEBUG   
             13  #define   new   DEBUG_NEW   
             14  #undef   THIS_FILE   
             15  static   char   THIS_FILE[]   =   __FILE__;   
             16  #endif   
             17    
             18  /////////////////////////////////////////////////////////////////////////////   
             19  //   CUseResourceDllView   
             20    
             21  IMPLEMENT_DYNCREATE(CUseResourceDllView,   CView)   
             22    
             23  BEGIN_MESSAGE_MAP(CUseResourceDllView,   CView)   
             24  //{{AFX_MSG_MAP(CUseResourceDllView)   
             25  ON_WM_LBUTTONDOWN()   
             26  //}}AFX_MSG_MAP   
             27  //   Standard   printing   commands   
             28  ON_COMMAND(ID_FILE_PRINT,   CView::OnFilePrint)   
             29  ON_COMMAND(ID_FILE_PRINT_DIRECT,   CView::OnFilePrint)   
             30  ON_COMMAND(ID_FILE_PRINT_PREVIEW,   CView::OnFilePrintPreview)   
             31  END_MESSAGE_MAP()   
             32    
             33  /////////////////////////////////////////////////////////////////////////////   
             34  //   CUseResourceDllView   construction/destruction   
             35    
             36  CUseResourceDllView::CUseResourceDllView()   
             37  {   
             38  //   TODO:   add   construction   code   here   
             39    
             40  }
               
             41    
             42  CUseResourceDllView::~CUseResourceDllView()   
             43  {   
             44  }
               
             45    
             46  BOOL   CUseResourceDllView::PreCreateWindow(CREATESTRUCT&   cs)   
             47  {   
             48  //   TODO:   Modify   the   Window   class   or   styles   here   by   modifying   
             49  //     the   CREATESTRUCT   cs   
             50    
             51  return   CView::PreCreateWindow(cs);   
             52  }
               
             53    
             54  /////////////////////////////////////////////////////////////////////////////   
             55  //   CUseResourceDllView   drawing   
             56    
             57  void   CUseResourceDllView::OnDraw(CDC*   pDC)   
             58  {   
             59  CUseResourceDllDoc*   pDoc   =   GetDocument();   
             60  ASSERT_VALID(pDoc);   
             61  pDC->TextOut   (0,0,"請點(diǎn)擊這里改變系統(tǒng)菜單");   
             62  //   TODO:   add   draw   code   for   native   data   here   
             63  }
               
             64    
             65  /////////////////////////////////////////////////////////////////////////////   
             66  //   CUseResourceDllView   printing   
             67    
             68  BOOL   CUseResourceDllView::OnPreparePrinting(CPrintInfo*   pInfo)   
             69  {   
             70  //   default   preparation   
             71  return   DoPreparePrinting(pInfo);   
             72  }
               
             73    
             74  void   CUseResourceDllView::OnBeginPrinting(CDC*   /*pDC*/,   CPrintInfo*   /*pInfo*/)   
             75  {   
             76  //   TODO:   add   extra   initialization   before   printing   
             77  }
               
             78    
             79  void   CUseResourceDllView::OnEndPrinting(CDC*   /*pDC*/,   CPrintInfo*   /*pInfo*/)   
             80  {   
             81  //   TODO:   add   cleanup   after   printing   
             82  }
               
             83    
             84  /////////////////////////////////////////////////////////////////////////////   
             85  //   CUseResourceDllView   diagnostics   
             86    
             87  #ifdef   _DEBUG   
             88  void   CUseResourceDllView::AssertValid()   const   
             89  {   
             90  CView::AssertValid();   
             91  }
               
             92    
             93  void   CUseResourceDllView::Dump(CDumpContext&   dc)   const   
             94  {   
             95  CView::Dump(dc);   
             96  }
               
             97    
             98  CUseResourceDllDoc*   CUseResourceDllView::GetDocument()   //   non-debug   version   is   inline   
             99  {   
            100  ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CUseResourceDllDoc)));   
            101  return   (CUseResourceDllDoc*)m_pDocument;   
            102  }
               
            103  #endif   //_DEBUG   
            104    
            105  /////////////////////////////////////////////////////////////////////////////   
            106  //   CUseResourceDllView   message   handlers   
            107    
            108  void   CUseResourceDllView::OnLButtonDown(UINT   nFlags,   CPoint   point)     
            109  {   
            110  //下面的代碼是顯式調(diào)入資源dll,當(dāng)然你也可以隱式調(diào)入   
            111  HINSTANCE   m_app=::AfxGetInstanceHandle   ();//獲得句柄   
            112  HINSTANCE   m_res_dll=::LoadLibrary   ("resource_dll.dll");   
            113    
            114  AfxSetResourceHandle(m_res_dll);//把當(dāng)前資源設(shè)置從resource_dll.dll中獲取   
            115  //使用   
            116  CMenu   m_menu;   
            117  m_menu.LoadMenu   (IDR_MENU1);   
            118  AfxGetMainWnd()->SetMenu   (&m_menu);   
            119  m_menu.Detach   ();   
            120    
            121  AfxSetResourceHandle(m_app);//還原系統(tǒng)資源   
            122  FreeLibrary(m_res_dll);//釋放庫   
            123  //若要響應(yīng)資源dll中的菜單,你得手工添加消息響應(yīng)函數(shù)   
            124  CView::OnLButtonDown(nFlags,   point);   
            125  }
             



            posted on 2007-04-24 12:00 喬棟 閱讀(594) 評論(0)  編輯 收藏 引用 所屬分類: C++的健身房
            <2007年4月>
            25262728293031
            1234567
            891011121314
            15161718192021
            22232425262728
            293012345

            常用鏈接

            留言簿(6)

            隨筆分類

            隨筆檔案

            文章分類

            文章檔案

            搜索

            •  

            最新評論

            閱讀排行榜

            評論排行榜


            My blog is worth $0.00.
            How much is your blog worth?

            婷婷久久综合九色综合98| 久久香蕉国产线看观看精品yw| 久久免费视频观看| 久久亚洲欧洲国产综合| 性做久久久久久久久浪潮| 亚洲国产精品无码久久98| 国产精品久久永久免费| 久久精品国产色蜜蜜麻豆| 午夜精品久久久久久中宇| 777久久精品一区二区三区无码 | 国产69精品久久久久APP下载| 国产69精品久久久久9999APGF | 久久久黄片| 国产欧美一区二区久久| 亚洲人成无码网站久久99热国产| 久久国产精品成人片免费| 亚洲日本va午夜中文字幕久久 | 久久久久久精品免费看SSS| 一本大道加勒比久久综合| 99久久夜色精品国产网站| 久久99热这里只有精品国产| 久久久久免费看成人影片| 无码八A片人妻少妇久久| 亚洲乱亚洲乱淫久久| 精品人妻久久久久久888| 久久精品国产清自在天天线| 久久精品国产99久久丝袜| 久久国产精品成人免费| 久久久久亚洲精品无码蜜桃| 久久精品卫校国产小美女| 久久综合视频网站| 久久精品国产精品亚洲人人| 狠狠久久综合| 久久国产精品无码网站| 精品久久人人妻人人做精品| 99久久精品免费| 99久久免费只有精品国产| 亚洲一区中文字幕久久| 品成人欧美大片久久国产欧美| 久久免费精品一区二区| 久久99精品久久久久久野外|