Advertisement Jump to content
Sign in to follow this  
xinvar

Unity Group Box shows black background

This topic is 4922 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

	wndDlg->GetWindowRect(&Rect);
	// Change the size of FileOpen dialog
	wndDlg->SetWindowPos(NULL, 0, 0,
		Rect.right - Rect.left,
		Rect.bottom - Rect.top + iExtraSize,
		SWP_NOMOVE);

	// 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);
	wndComboCtrl->GetWindowRect(&Rect);
	wndDlg->ScreenToClient(&Rect);	// Remember it is child controls
	Rect.top = Rect.bottom + 30;
	Rect.bottom += 90;
	CButton grpButton.Create("Group", BS_GROUPBOX | WS_CHILD | WS_VISIBLE  , 
		CRect(2, Rect.top, 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 ( http://www.gamedev.net/community/forums/topic.asp?topic_id=302463 ) but without solutions. [Edited by - xinvar on August 1, 2005 2:06:27 PM]

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!