乡下人产国偷v产偷v自拍,国产午夜片在线观看,婷婷成人亚洲综合国产麻豆,久久综合给合久久狠狠狠9

  • <output id="e9wm2"></output>
    <s id="e9wm2"><nobr id="e9wm2"><ins id="e9wm2"></ins></nobr></s>

    • 分享

      VS2008使用GDI+前

       jinye6 2011-05-03

      GDI+配置(vs2008) 

      1 在項(xiàng)目屬性中添加GDI+靜態(tài)庫(kù)鏈接

      打開(kāi)項(xiàng)目,選擇【項(xiàng)目】——》【XXX屬性】(XXX為當(dāng)前項(xiàng)目名稱),打開(kāi)“項(xiàng)目屬性”對(duì)話框,展開(kāi)“屬性配置”,選擇“連接器”下的“輸入”,然后在”依賴附加項(xiàng)“中添加“gdiplus.lib”

      2 添加必要的代碼

      (1)打開(kāi)“解決方案資源管理器”,打開(kāi)stdafs。h文件,添加代碼如下:

      #include "gdiplus.h"
      using namespace Gdiplus;
      (2)打開(kāi)類視圖 選中相應(yīng)的應(yīng)用程序類CXXXApp 為其添加兩個(gè)成員變量

       GdiplusStartupInput m_GdiplusStartupInput;
       ULONG_PTR m_GdiplusToken;

      (3)在CXXXApp類的InitInstance函數(shù)中添加

      //GDI+圖像庫(kù)初始化
       GdiplusStartup(&m_GdiplusToken,&m_GdiplusStartupInput,NULL);

      (4)重寫CXXXApp類的ExitInstance函數(shù)

      int CBMPProApp::ExitInstance(void)
      {
       
       //關(guān)閉gdi+圖像庫(kù)
       GdiplusShutdown(m_GdiplusToken);
       return CWinApp::ExitInstance();
      }

      void CGDIplusDemoView::OnDraw(CDC* )

      {

                      CGDIplusDemoDoc* pDoc = GetDocument();

                      ASSERT_VALID(pDoc);

                      if (!pDoc)

                            return; 

                      // TODO: 在此處為本機(jī)數(shù)據(jù)添加繪制代碼

                      Graphics graphics(this->GetDC()->m_hDC);

                      Pen pen(Color(255,0,0,255));

                      SolidBrush brush(Color(255,0,0,255));

                      FontFamily fontFamily(L"宋體");

                      Font font(&fontFamily,24,FontStyleRegular,UnitPixel);

                      CRect rect;

                      this->GetClientRect(&rect);

                      PointF pointF(rect.right/2,rect.bottom/2);

                      graphics.DrawString(L"GDI+程序",-1,&font,pointF,&brush);

      }

      結(jié)果為生成一個(gè)窗口:顯示字體“GDI+程序”

        本站是提供個(gè)人知識(shí)管理的網(wǎng)絡(luò)存儲(chǔ)空間,所有內(nèi)容均由用戶發(fā)布,不代表本站觀點(diǎn)。請(qǐng)注意甄別內(nèi)容中的聯(lián)系方式、誘導(dǎo)購(gòu)買等信息,謹(jǐn)防詐騙。如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請(qǐng)點(diǎn)擊一鍵舉報(bào)。
        轉(zhuǎn)藏 分享 獻(xiàn)花(0

        0條評(píng)論

        發(fā)表

        請(qǐng)遵守用戶 評(píng)論公約

        類似文章 更多