Click here to Skip to main content
15,890,438 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Help to modify dialog style using ModifyStyleEx() Pin
bosfan19-Feb-07 5:10
bosfan19-Feb-07 5:10 
GeneralRe: Help to modify dialog style using ModifyStyleEx() Pin
Hamid_RT19-Feb-07 5:14
Hamid_RT19-Feb-07 5:14 
GeneralRe: Help to modify dialog style using ModifyStyleEx() Pin
bosfan19-Feb-07 5:18
bosfan19-Feb-07 5:18 
GeneralRe: Help to modify dialog style using ModifyStyleEx() Pin
Hamid_RT19-Feb-07 5:37
Hamid_RT19-Feb-07 5:37 
GeneralRe: Help to modify dialog style using ModifyStyleEx() Pin
bosfan19-Feb-07 21:51
bosfan19-Feb-07 21:51 
GeneralRe: Help to modify dialog style using ModifyStyleEx() Pin
Hamid_RT19-Feb-07 23:10
Hamid_RT19-Feb-07 23:10 
AnswerRe: Help to modify dialog style using ModifyStyleEx() Pin
prasad_som19-Feb-07 6:05
prasad_som19-Feb-07 6:05 
GeneralRe: Help to modify dialog style using ModifyStyleEx() Pin
bosfan19-Feb-07 21:49
bosfan19-Feb-07 21:49 
Hello Prasad,
thanks for help, the dialog i now showed with new style, without border etc., also like a child
dialog, but they is showed outside of hims parent stay only to clip the dialog to them...

// CFileDialogReport is inherited from CFileDialog
BOOL CFileDialogReport::OnInitDialog()
{
	const UINT iExtraSize = 220;
	CWnd* pParentWnd = GetParent();
	RECT cRect;
	pParentWnd->GetWindowRect(&cRect);
	pParentWnd->SetWindowPos(NULL, 0,0,cRect.right - cRect.left, cRect.bottom - cRect.top + iExtraSize, SWP_NOMOVE);

	CWnd* pComboFileName = pParentWnd->GetDlgItem(cmb1);
	pComboFileName->GetWindowRect(&cRect);
	pParentWnd->ScreenToClient(&cRect);

	// Position for my new controls(for that child dialog)
	cRect.top += 20;
	cRect.bottom += 120;
	cRect.left += 50;
	cRect.right += 160;

	pReportDlg.Create(IDD_REPORT, pParentWnd);
	pReportDlg.ModifyStyle(WS_OVERLAPPEDWINDOW ,WS_CHILD , SWP_FRAMECHANGED);
	pReportDlg.ModifyStyleEx(WS_EX_OVERLAPPEDWINDOW | WS_EX_DLGMODALFRAME, 
		WS_CHILD ,SWP_FRAMECHANGED);

	pReportDlg.ShowWindow(SW_SHOW);
	pReportDlg.SetWindowPos(pComboFileName, 8, cRect.top, cRect.right, cRect.bottom, NULL);
}

ok, i can set settings in the template to child and without border, but i want to try everything
what is posible to do this to runtime, any idea how to do this now?

regards
GeneralRe: Help to modify dialog style using ModifyStyleEx() Pin
bosfan19-Feb-07 22:15
bosfan19-Feb-07 22:15 
GeneralRe: Help to modify dialog style using ModifyStyleEx() Pin
prasad_som19-Feb-07 22:31
prasad_som19-Feb-07 22:31 
AnswerRe: Help to modify dialog style using ModifyStyleEx() Pin
David Crow19-Feb-07 6:14
David Crow19-Feb-07 6:14 
GeneralRe: Help to modify dialog style using ModifyStyleEx() Pin
bosfan19-Feb-07 21:27
bosfan19-Feb-07 21:27 
QuestionRe: Help to modify dialog style using ModifyStyleEx() Pin
David Crow20-Feb-07 2:33
David Crow20-Feb-07 2:33 
AnswerRe: Help to modify dialog style using ModifyStyleEx() Pin
bosfan20-Feb-07 2:37
bosfan20-Feb-07 2:37 
GeneralRe: Help to modify dialog style using ModifyStyleEx() Pin
David Crow20-Feb-07 2:52
David Crow20-Feb-07 2:52 
GeneralRe: Help to modify dialog style using ModifyStyleEx() Pin
bosfan20-Feb-07 4:46
bosfan20-Feb-07 4:46 
QuestionWindows SDK Communication Question Pin
Jethro6319-Feb-07 4:53
Jethro6319-Feb-07 4:53 
AnswerRe: Windows SDK Communication Question Pin
Roger Stoltz19-Feb-07 5:13
Roger Stoltz19-Feb-07 5:13 
GeneralRe: Windows SDK Communication Question Pin
Jethro6319-Feb-07 7:53
Jethro6319-Feb-07 7:53 
QuestionComBSTR Question Pin
Like2Byte19-Feb-07 3:41
Like2Byte19-Feb-07 3:41 
AnswerRe: ComBSTR Question Pin
prasad_som19-Feb-07 6:00
prasad_som19-Feb-07 6:00 
GeneralRe: ComBSTR Question Pin
Like2Byte19-Feb-07 7:21
Like2Byte19-Feb-07 7:21 
AnswerRe: ComBSTR Question Pin
Stephen Hewitt19-Feb-07 17:40
Stephen Hewitt19-Feb-07 17:40 
GeneralRe: ComBSTR Question Pin
Like2Byte20-Feb-07 3:51
Like2Byte20-Feb-07 3:51 
QuestionCLISTBOX Owner Drawn ListBox , DrawText does not return correct height. Pin
Killer319-Feb-07 3:35
Killer319-Feb-07 3:35 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.