新建空白窗体,然后粘帖下面代码: Option ExplicitPublic WithEvents br As VBControlExtender Private Sub br_ObjectEvent(Info As EventInfo)If Info.Name = "NewWindow2" Then 'Dim fm As New Form1 'fm.Show 'Info.EventParameters(0) = br.object '根据需要可实现在自己的新开窗口打…
在MFC中设置控件的背景色.字体.字体颜色.标题等属性主要是利用OnCtlColor函数来实现. 如: HBRUSH CAlarm::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor) { HBRUSH hbr = CDialog::OnCtlColor(pDC, pWnd, nCtlColor); // TODO: Change any attributes of the DC here //设置静态控件的背景色和文本颜色 if (pWnd->G…