• <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 喬棟 閱讀(593) 評論(0)  編輯 收藏 引用 所屬分類: C++的健身房
            <2025年5月>
            27282930123
            45678910
            11121314151617
            18192021222324
            25262728293031
            1234567

            常用鏈接

            留言簿(6)

            隨筆分類

            隨筆檔案

            文章分類

            文章檔案

            搜索

            •  

            最新評論

            閱讀排行榜

            評論排行榜


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

            午夜精品久久久久久| 青青草原1769久久免费播放| 欧美与黑人午夜性猛交久久久| 久久综合久久伊人| 久久精品国产亚洲AV无码娇色 | 久久亚洲熟女cc98cm| 亚洲中文字幕久久精品无码APP | 亚洲国产精品久久| 久久久久国产| 久久这里只精品国产99热| 久久人人爽人人爽人人av东京热| 精品免费久久久久久久| 久久午夜无码鲁丝片秋霞| 99久久精品免费| 国产精品久久午夜夜伦鲁鲁| 久久亚洲中文字幕精品一区| 人人狠狠综合久久亚洲88| 性欧美大战久久久久久久久| 亚洲精品成人网久久久久久| 久久久中文字幕| 国产精品久久久久影院色| 久久国产色AV免费看| 99精品久久精品一区二区| 一级做a爰片久久毛片毛片| 久久久久久毛片免费看| 欧美777精品久久久久网| 久久AV高清无码| 91精品国产综合久久婷婷| 久久亚洲中文字幕精品有坂深雪 | 欧美一区二区久久精品| 婷婷综合久久狠狠色99h| 久久久无码一区二区三区| 天堂久久天堂AV色综合| 狠狠色婷婷久久一区二区 | 久久99国产精品二区不卡| 久久精品国产亚洲AV高清热| 久久综合亚洲欧美成人| 99久久久精品免费观看国产| 久久国产色AV免费观看| 久久免费线看线看| 久久99久久无码毛片一区二区|