重载listctrl列头,列头皮肤

重载listctrl列头,列头皮肤

ID:78056075

大小:15.77 KB

页数:13页

时间:2022-01-30

重载listctrl列头,列头皮肤_第1页
重载listctrl列头,列头皮肤_第2页
重载listctrl列头,列头皮肤_第3页
重载listctrl列头,列头皮肤_第4页
重载listctrl列头,列头皮肤_第5页
重载listctrl列头,列头皮肤_第6页
重载listctrl列头,列头皮肤_第7页
重载listctrl列头,列头皮肤_第8页
重载listctrl列头,列头皮肤_第9页
重载listctrl列头,列头皮肤_第10页
资源描述:

《重载listctrl列头,列头皮肤》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库

1、重载listctrl头,可惜换列头皮肤#pragmaonce#include"RSHeaderCtrl.h"//CRSListCtrlclassCRSListCtrl:publicCListCtrl{DECLARE_DYNAMIC(CRSListCtrl)public:CRSListCtrl();virtual~CRSListCtrl();protected:CFontm_fontText;CRSHeaderCtrlm_wndHeaderCtrl;protected:DECLARE_MESSAGE_MAP()voidInitHeader();voidRSRecta

2、ngle(HDChDC,intleft,inttop,intright,intbottom);virtualBOOLPreCreateWindow(CREATESTRUCT&cs);public:afx_msgvoidOnPaint();afx_msgBOOLOnEraseBkgnd(CDCpDC);afx_msgvoidDrawItem(LPDRAWITEMSTRUCTlpDrawItemStruct);afx_msgvoidMeasureItem(LPMEASUREITEMSTRUCTlpMeasureItemStruct);afx_msgintOnCreat

3、e(LPCREATESTRUCTlpCreateStruct);afx_msgvoidOnDestroy();afx_msgLRESULTOnInsertColumn(WPARAMwParam,LPARAMlParam);};//RSListCtrl.cpp:实现文件//#include"stdafx.h"#include"Rising.h"#include"RSListCtrl.h"#include".rslistctrl.h"//CRSListCtrlIMPLEMENT_DYNAMIC(CRSListCtrl,CListCtrl)CRSListCtrl::C

4、RSListCtrl(){}CRSListCtrl::~CRSListCtrl(){}BEGIN_MESSAGE_MAP(CRSListCtrl,CListCtrl)ON_WM_PAINT()ON_WM_ERASEBKGND()ON_WM_DRAWITEM_REFLECT()ON_WM_MEASUREITEM_REFLECT()ON_WM_CREATE()ON_WM_DESTROY()ON_MESSAGE(LVM_INSERTCOLUMN,OnInsertColumn)END_MESSAGE_MAP()//CRSListCtrl消息处理程序BOOLCRSListC

5、trl::PreCreateWindow(CREATESTRUCT&cs){cs.style=LVS_OWNERDRAWFIXED;returnCListCtrl::PreCreateWindow(cs);}voidCRSListCtrl::RSRectangle(HDChDC,intleft,inttop,intright,intbottom){POINTptOrg,ptTmp;right=max(0,right-1);bottom=max(0,bottom-1);二MoveToEx(hDC,left,top,&ptOrg);二LineTo(hDC,left,b

6、ottom);二MoveToEx(hDC,left,bottom,&ptTmp);二LineTo(hDC,right,bottom);二MoveToEx(hDC,right,bottom,&ptTmp);::LineTo(hDC,right,top);二MoveToEx(hDC,right,top,&ptTmp);二LineTo(hDC,left,top);二MoveToEx(hDC,ptOrg.x,ptOrg.y,&ptTmp);}voidCRSListCtrl::OnPaint(){PAINTSTRUCTps;HDChDC=NULL;HDChDCMem=NUL

7、L;HBITMAPhBMP=NULL;HBITMAPhOldBitmap=NULL;HPENhPen=NULL;HPENhOldPen=NULL;CRectrectClient;HRGNhRgn=NULL;GetClientRect(&rectClient);InitHeader();//donothing,onlyvalidatetheclipregion.hDC=::BeginPaint(m_hWnd,&ps);二EndPaint(m_hWnd,&ps);//realdrawhDC=::GetDC(m_hWnd);hDCMem=::CreateCompatib

8、leDC(

当前文档最多预览五页,下载文档查看全文

此文档下载收益归作者所有

当前文档最多预览五页,下载文档查看全文
温馨提示:
1. 部分包含数学公式或PPT动画的文件,查看预览时可能会显示错乱或异常,文件下载后无此问题,请放心下载。
2. 本文档由用户上传,版权归属用户,天天文库负责整理代发布。如果您对本文档版权有争议请及时联系客服。
3. 下载前请仔细阅读文档内容,确认文档内容符合您的需求后进行下载,若出现内容与标题不符可向本站投诉处理。
4. 下载文档时可能由于网络波动等原因无法下载或下载错误,付费完成后未能成功下载的用户请联系客服处理。