Sign in to follow this  

Unity Group Box shows black background

Recommended Posts

xinvar    133
Hi, I am trying to make extensions to a windows file dialog box:
BOOL CFileDialog_Activation::OnInitDialog() 
	// Get a pointer to the original dialog box.
	CWnd *wndDlg = GetParent();
	RECT Rect;

	// Change the size of FileOpen dialog
	wndDlg->SetWindowPos(NULL, 0, 0,
		Rect.right - Rect.left,
		Rect.bottom - + iExtraSize,

	// Standard CFileDialog control ID's are defined in <dlgs.h>
	// Do not forget to include <dlgs.h> in implementation file
	// cmb1 - standard file name combo box control
	CWnd *wndComboCtrl = wndDlg->GetDlgItem(cmb1);
	wndDlg->ScreenToClient(&Rect);	// Remember it is child controls = Rect.bottom + 30;
	Rect.bottom += 90;
	CButton grpButton.Create("Group", BS_GROUPBOX | WS_CHILD | WS_VISIBLE  , 
		CRect(2,, 110, Rect.bottom), wndDlg, IDG_GROUP_ORDER); 
	m_grpButton.SetFont(wndComboCtrl->GetFont(), TRUE);
	return TRUE;
But the background of the client area of this group box is black. If I do not use BS_GROUPBOX (check/radio/common...)buttons things are okay. I've been searching google and msdn without luck. Any ideas? [edit:] After some more tests, the group box actually shows up as transparent, a similar problem was posted ( ) but without solutions. [Edited by - xinvar on August 1, 2005 2:06:27 PM]

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this