我想创建一个窗口是某个主窗口的子窗口,我想让这个窗口不具有任何颜色,也就是说我想让这个窗口的区域颜色跟主窗口的背景是一样的。我只要得到这个窗口的句柄就行了,不要它的形状,但也不能隐藏,因为我还要在这个窗口上显示图象。
解决方案 »
- Debug Assertion Failed
- dll导出mfc的子类,但希望dll本身链接静态的mfc,存在问题
- 如何在MFC的dialog上实现像word那样的,自绘图形时选择状态出现控制块
- 微软BulkUsb读写问题???
- 添加的滚动条问题
- 关于职业方向的考虑(希望大家来七嘴八舌)
- 被问了n次的问题
- 我又要来问了,在线放分:请问我如果在选中一个RADIOCHECK控件后,导致另外几个控件变灰不能操作?如"Edit Box"。。。
- 为何说我没定义?
- socket接收缓冲区设置为2M,那么是不是对端发2M数据,就满了(通讯的高手来,坐等结贴)
- 做过语音播放的兄弟请进!很着急的问题!!!!
- 怎样使用两个SetTimer?????
http://www.codeproject.com/dialog/modelesschild.asp
In your CFormView-derived class, add a (private) member variable of type CDropDialog* as a container for the modeless dialog class, let's call it m_pModeless. In the constructor of your view, make sure you initialize m_pModeless to NULL
In your appropriate message handler, let's call it OnModeless, do the following: void CInterfaceView::OnModeless()
{
// Display the modal dialog box
if (!m_pModeless)
m_pModeless = new CDropDialog; if (!::IsWindow(m_pDlg->GetSafeHwnd()))
m_pModeless->Create(IDD_DIALOG1, this); m_pModeless->ShowWindow(SW_SHOW);
}
In the destructor of the parent window, proof if the dialog has been closed and release the memory: CInterfaceView::~CInterfaceView()
{
if (m_pModeless)
{
if (::IsWindow(m_pModeless->GetSafeHwnd()))
m_pModeless->EndDialog(IDCANCEL);
delete m_pModeless;
}
}