如题,当我想重绘出QQ视频图标那样的CBUTTON(应该是CBUTTON吧),怎么弄,我知道在DRAWITEM函数中重绘,但是我老是调用绘图函数不正确! 求代码! CreateCompatibleDC 、 CreateCompatibleBitmap() 、 bitblt()这几个函数也用不来!
解决方案 »
- 问一下在unicode下对OnOpenDocument的使用?
- ATL COM AppWizard创建的工程中如何使用定时器?
- 库重定义问题??
- sdk程序怎么响应按钮?
- 诚心请教各位高手帮忙
- 关于CFileDialog的新手问题
- 请问用odbc接access数据库,以下的写法是否有问题?或者是否有根恰当写法?
- 语句:in.get(*cout.rdbuf())中,为什么"cout.rdbuf()"前要加一个星号"*"?
- 我以默认步骤,建立了基于对话框的MFC,在stdafx.h中加入#include<afxinet.h>,直接使用InternetOpen()时,有下面的错误:。
- 关于 DirectShow 的使用问题:
- 求助 如何把对话框窗口的Z次序 设置在指定程序窗口上层
- 请教vc++MFC中 如何在新建的的类中 调用主界面的控件
http://download.csdn.net/detail/allen_lanyuhai/3658158
{
UINT uStyle = DFCS_BUTTONPUSH; // This code only works with buttons.
ASSERT(lpDrawItemStruct->CtlType == ODT_BUTTON); // If drawing selected, add the pushed style to DrawFrameControl.
if (lpDrawItemStruct->itemState & ODS_SELECTED)
uStyle |= DFCS_PUSHED; // Draw the button frame.
::DrawFrameControl(lpDrawItemStruct->hDC, &lpDrawItemStruct->rcItem,
DFC_BUTTON, uStyle); // Get the button's text.
CString strText;
GetWindowText(strText); // Draw the button text using the text color red.
COLORREF crOldColor = ::SetTextColor(lpDrawItemStruct->hDC, RGB(255,0,0));
::DrawText(lpDrawItemStruct->hDC, strText, strText.GetLength(),
&lpDrawItemStruct->rcItem, DT_SINGLELINE|DT_VCENTER|DT_CENTER);
::SetTextColor(lpDrawItemStruct->hDC, crOldColor);
}