如何設定MFC靜態文字背景為透明色?
增加WM_CTRLCOLOR訊息處理函式,並增加如下程式碼:
HBRUSH CWebCautionDlg::OnCtlColor(CDC* pDC,CWnd* pWnd, UINT nCtlColor)
{
HBRUSH hbr = CDialogEx::OnCtlColor(pDC,pWnd, nCtlColor);
// TODO: Change any attributes of the DC here
//MessageBox(_T("static text"));
if (pWnd->GetDlgCtrlID() == (IDC_STATIC_COPYRIGHT))
{
//MessageBox(_T("static text"));
pDC->SetBkMode(TRANSPARENT);
pDC->SetTextColor(RGB(0,225,225));
return HBRUSH(GetStockObject(HOLLOW_BRUSH));
}
// TODO: Return a different brush if the default is not desired
return hbr;
}
相關推薦
如何設定MFC靜態文字背景為透明色?
增加WM_CTRLCOLOR訊息處理函式,並增加如下程式碼: HBRUSH CWebCautionDlg::OnCtlColor(CDC* pDC,CWnd* pWnd, UINT nCtlColor){ HBRUSH hbr = CDialogEx::OnCtlColo
控制元件背景設定為透明色的幾種常用方法
1.設定透明顏色程式碼(推薦用) tvTitle.setBackgroundColor(Color.parseColor("#00000000")); 2.alpha設定透明度(不推薦用,坑多) 引數值0-255,值越小越透明; tvTitle.getBackgr
VC2005 MFC靜態文字框背景色設定
最近在需要用MFC做一個上位機,第一次接觸這個東西我想把我在這過程中遇到的問題寫下來,希望也能幫助遇到同樣問題的朋友。有什麼地方不對的請各位指正。 我在利用MFC做登入介面時出現了一個問題。我發現如果直接有工具箱拖放一個靜態文字到程式視窗時文字框的背景顏色是灰色,字型為黑色
android 適配華為透明狀態列 ,保留虛擬導航鍵,設定狀態列透明,且設定狀態列文字顏色為黑色
設定後狀態列不遮擋底部contentview裡的內容,但是狀態列上的圖示文字顏色和我的主題色白色混在一起了 public static void setTranslucentKeepVirtualNav(Activity activity) { if (Build.VERSIO
我的YUV播放器MFC小筆記:設定picture控制元件背景為黑色、視窗縮放
影象的顯示主要使用picture控制元件,一般播放器,在初始化時,播放畫面的區域背景都是黑色的,在YUV播放器,也如此。但在網上找了很久的資料才實現該功能,其實說白了,程式碼很簡單,在OnPaint函式中將picture畫為黑色即可。程式碼: //picture控制
android對話方塊程式碼中設定背景為透明
<span style="font-size:18px;">//建立背景透明的對話方塊 AlertDialog.THEME_HOLO_LIGHT AlertDialog.Builder b = new AlertDialog.Builder(myContex
MFC靜態文字控制元件如何設定字型--大小和顏色及背景色
方法一:通過構建相應字型 CFont font; font.CreateFont(10,10,0,0,FW_BLACK,FALSE,FALSE, FALSE,GB2312_CHARSET,OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS,DEF
UIKit和Cocos2d-x的整合使用;設定CCEAGLView背景為透明,來顯示背後的UIView; 以及整合中遇到的問題的解決方案
UIKit和Cocos2d-x的整合使用 原來我們的專案通過原始的UIKit來實現應用開發,但是現在需要往應用中增加禮物特效動畫,而禮物特效需要通過cocos2d-x來實現。晚上的方法大多都是通過建立初始的cocos2d工程,再在工程中增加UIKit的實現。最著名的介紹這個
Android設定Activity背景為透明style
方法一: 通過Theme.Translucent @android:style/Theme.Translucent @android:style/Theme.Translucent.NoTitleBar
設定控制元件背景為透明或者半透明
設定Button或ImageButton的背景為透明或者半透明 半透明< Button android:background="#e0000000" ... /> 透明< Button android:background="#00000000
使用ps替換圖片顏色為透明色
使用ps的替換顏色工具只能替換為非白色非透明色,對於要替換成透明的圖片,使用通道可以實現。 1、調出通道彈框 2、選擇黑白對比最強的通道右擊複製 3、Ctrl+L調出色階調節此按鈕至黑白對比更強 4、Ctrl+I反相 5、摁住Ctrl點選右側紅色區域可選中
Python PIL.Image之修改圖片背景為透明
------------------------------------------------語法基礎------------------------------------------------ import PIL.Image as Image
導航欄背景色為透明色
需求: 導航欄和HeaderView 使用一個背景圖片。 解決方案: 讓 導航欄 變成透明。 override func viewWillAppear(_ animated: Bool) { super.viewWillAppear(animat
Python PIL.Image之修改圖片背景為透明
------------------------------------------------語法基礎------------------------------------------------ import PIL.Image as Image &
微信小程式自定義頂部導航欄,新增背景圖,透明色等.
在微信小程式中,導航欄的顏色可以在app.json. window裡面新增navigationBarBackgroundColor屬性,但是顏色只能為純色.不能使用rgb,或者rgba的色號. 但是這
將文字顯示在圖片上面,並使文字背景半透明
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html
設定UILabel的背景色為透明
下面的程式碼: UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(412, 350, 200, 30)]; label.text =
ios 設定狀態列文字顏色為白色
直接在程式碼裡面設定是沒有什麼作用的 ,曾經嘗試各種方法,就下面的方法直接簡單理解 第一步:需要將plist 檔案 中加入: <key>UIViewControllerBasedStatusBarAppearance</key> <f
設定頁彈框背景不透明問題分析及解決
一、問題背景 在開發新版本時,有個需求是使用者通過點選跳轉到系統設定介面時,彈出一個對話方塊。對話方塊用來描述為什麼需要使用者進行設定,引導使用者完成開啟設定。在自己的activity中彈出對話方塊大家都知道怎麼做, 但是在系統設定介面彈出對話方塊肯定沒那麼方便了
設定html的input框 為透明 無邊框
將input框的屬性修改為: <td> <input type="text" style= "background-color:transparent;border:0;" name=