欧美性猛交XXXX免费看蜜桃,成人网18免费韩国,亚洲国产成人精品区综合,欧美日韩一区二区三区高清不卡,亚洲综合一区二区精品久久

打開(kāi)APP
userphoto
未登錄

開(kāi)通VIP,暢享免費電子書(shū)等14項超值服

開(kāi)通VIP
給窗體繪制背景圖片 vc

給窗體繪制背景圖片 vc

zyyoung @ 2007-05-30 12:21 | C++

給窗體繪制背景圖片
  1. //給窗體繪制背景圖片(1)圖片控件(2)GDI繪制   
  2. //方法(2)   
  3. void C*Dlg::OnPaint()    
  4. {   
  5.     CPaintDC dc(this); // device context for painting   
  6.        
  7.     // load IDB_BITMAP1 from our resources   
  8.     CBitmap bmp;   
  9.     bmp.LoadBitmap(IDB_BITMAP1);   
  10.   
  11.     // Get the size of the bitmap   
  12.     BITMAP bmpInfo;   
  13.     bmp.GetBitmap(&bmpInfo);   
  14.   
  15.     // Create an in-memory DC compatible with the   
  16.     // display DC we're using to paint   
  17.     CDC dcMemory;   
  18.     dcMemory.CreateCompatibleDC(&dc);   
  19.   
  20.     // Select the bitmap into the in-memory DC   
  21.     CBitmap *pOldBmp=dcMemory.SelectObject(&bmp);   
  22.   
  23.     if(!m_bStretch.GetCheck())   
  24.     {   
  25.         // Copy the bits from the in-memory DC into the on-   
  26.         // screen DC to actually do the painting   
  27.         dc.BitBlt(0, 0, bmpInfo.bmWidth, bmpInfo.bmHeight, &dcMemory, 0, 0, SRCCOPY);   
  28.     }   
  29.     else  
  30.     {   
  31.         //Get Client area   
  32.         CRect wndRt;   
  33.         this->GetClientRect(&wndRt);   
  34.         // Stretch and copy the bits from the in-memory DC into the on-   
  35.         // screen DC to actually do the painting   
  36.         dc.StretchBlt(0, 0, wndRt.Width(), wndRt.Height   (), 
  37.                            &dcMemory, 0, 0, bmpInfo.bmWidth, bmpInfo.bmHeight, SRCCOPY);   
  38.     }   
  39.   
  40.     dcMemory.SelectObject(pOldBmp);   
本站僅提供存儲服務(wù),所有內容均由用戶(hù)發(fā)布,如發(fā)現有害或侵權內容,請點(diǎn)擊舉報。
打開(kāi)APP,閱讀全文并永久保存 查看更多類(lèi)似文章
猜你喜歡
類(lèi)似文章
VC中判斷窗體是否存在
vb中如何使背景圖片的大小隨著(zhù)窗體改變?
設置windows窗體背景色為蘋(píng)果綠
常用背景圖片
如何代碼設置窗體背景圖片
(供新手學(xué)習)簡(jiǎn)單制作、套用電子表格登陸窗口
更多類(lèi)似文章 >>
生活服務(wù)
分享 收藏 導長(cháng)圖 關(guān)注 下載文章
綁定賬號成功
后續可登錄賬號暢享VIP特權!
如果VIP功能使用有故障,
可點(diǎn)擊這里聯(lián)系客服!

聯(lián)系客服

欧美性猛交XXXX免费看蜜桃,成人网18免费韩国,亚洲国产成人精品区综合,欧美日韩一区二区三区高清不卡,亚洲综合一区二区精品久久