• <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,"請點擊這里改變系統菜單");   
             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  //下面的代碼是顯式調入資源dll,當然你也可以隱式調入   
            111  HINSTANCE   m_app=::AfxGetInstanceHandle   ();//獲得句柄   
            112  HINSTANCE   m_res_dll=::LoadLibrary   ("resource_dll.dll");   
            113    
            114  AfxSetResourceHandle(m_res_dll);//把當前資源設置從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);//還原系統資源   
            122  FreeLibrary(m_res_dll);//釋放庫   
            123  //若要響應資源dll中的菜單,你得手工添加消息響應函數   
            124  CView::OnLButtonDown(nFlags,   point);   
            125  }
             



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

            常用鏈接

            留言簿(6)

            隨筆分類

            隨筆檔案

            文章分類

            文章檔案

            搜索

            •  

            最新評論

            閱讀排行榜

            評論排行榜


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

            久久久久亚洲AV成人片| 国内精品久久久久久野外| 777久久精品一区二区三区无码| 精品久久久久久久无码 | 久久免费国产精品| 免费精品久久久久久中文字幕 | 色88久久久久高潮综合影院| 国产精品一久久香蕉国产线看观看 | 久久人人爽人人爽人人片AV东京热| 久久久久久亚洲精品影院| 亚洲av成人无码久久精品| 国产精品无码久久综合网| 中文字幕无码免费久久| 久久激情亚洲精品无码?V| 久久精品一本到99热免费| 久久99精品久久久久久9蜜桃| 伊人久久大香线焦AV综合影院| 国产午夜电影久久| 久久久一本精品99久久精品88| 天堂无码久久综合东京热| 中文字幕亚洲综合久久| 久久精品aⅴ无码中文字字幕不卡| 久久艹国产| 久久97精品久久久久久久不卡| 久久久久久久久久久精品尤物 | 伊人久久五月天| 欧美性大战久久久久久| 久久亚洲高清观看| 久久精品国产清高在天天线| 2020国产成人久久精品| 亚洲伊人久久综合中文成人网| 国产69精品久久久久99尤物| 狠狠色丁香久久婷婷综合五月| 97精品国产97久久久久久免费| 日本久久久久久久久久| 开心久久婷婷综合中文字幕| 国产91久久综合| 日本国产精品久久| 狠狠色丁香久久婷婷综合图片| 久久久国产亚洲精品| 国产A三级久久精品|