分类: C/C++
2008-02-15 10:16:56
一、大家在有些时候希望自己做的控件是半透明或透明的,就像半透明的窗体一样,我经过一段时间的查询,发现这个是可以实现,我们来看看它的实现以及带来的一些问题吧。
DWORD CTestCtrl::GetControlFlags()
{
DWORD dwFlags = COleControl::GetControlFlags();
// The control can activate without creating a window.
// TODO: when writing the control''s message handlers, avoid using
// the m_hWnd member variable without first checking that its
// value is non-NULL.
dwFlags |= windowlessActivate;
return dwFlags;
}
三、以下是想到图片和程序运行图片,仅供参考:
