VC學習筆記(不斷更新)

2022-03-21 00:42:30 字數 741 閱讀 8470

改變檢視的背景顏色

可以通過兩種方式:

1.填充區域。呼叫fillrect函式實現。

2.擦除區域。通過呼叫patblt來實現。

具體過程:

1)建立畫刷物件,初始化畫刷。

2)選入新畫刷,儲存舊畫刷。

3)獲取客戶端區域。

4)填充區域。(擦除區域)

5)還原舊畫刷。

例子cbrush m_brush(rgb(0,

128,

128));

cbrush 

*poldbrush

=pdc

->

selectobject(

&m_brush);

crect rect;

getclientrect(

&rect);

//填充區域

pdc->

fillrect(rect,

&m_brush);

//擦除區域

//pdc->patblt(rect.left,rect.top,rect.width(),rect.height(),patcopy);

pdc->

selectobject(poldbrush);

程式啟動時不建立文件

在主視窗未初始化之前新增cmdinfo.m_nshellcommand=ccommandlineinfo::filenothing;

apache學習筆記(不斷更新)

win下 用putty.exe英文版 linux下 用命令 ssh l username p hostname 其中 表示埠 port username是使用者名稱 httpd.conf 學習 1.設定預設最先開啟的頁面 在httpd.conf裡directoryindex index.html這裡...

linux筆記(不斷更新)

首先安裝字型支援 apt get install language pack zh hant base language pack zh hans base 生成字符集 sudo dpkg reconfigure locales 然後選擇和zh開頭的用空格選上 安裝zhcon sudo apt in...

深度學習實踐筆記(不斷更新)

本文主要是深度學習訓練時候的一些經驗和用法的筆記。1 tensorflow訓練時指定gpu 在終端執行程式時指定gpu cuda visible devices 0,1 python your file.py 在python 中指定gpu import os os.environ cuda visi...