能拖动的带背景颜色的分割条
想实现这个功能,曾经困扰了我一段时间,后来发现原来是犯了一些小错误. 【程序编程相关:COM样例(一)——《COM线程模型》基】
作者:enloo 【推荐阅读:COM样例(三)——组件端代码】功能: 【扩展信息:asp.net 实现“九连环”小游戏】
1,带背景颜色2,拖动拖动条,能拖动窗口
效果如下:
程序:
==================================================//mysplitter.h#pragma once#include "stdafx.h"class cmysplitter : public csplitterwnd{public: cmysplitter(); declare_dyncreate(cmysplitter) public: ~cmysplitter();protected: afx_msg void onlbuttondown(uint nflags, cpoint point); afx_msg void onmousemove(uint,cpoint); bool precreatewindow(createstruct& cs); protected: hbrush m_hbr; //背景刷子 cstring m_clsname; //窗口类名 declare_message_map()};==================================================//mysplitter.cpp#include "mysplitter.h"implement_dyncreate(cmysplitter, csplitterwnd)
... 下一页