Click here to Skip to main content
15,922,894 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionCHtmlView with dialog templates? Pin
HappyFunBall5-Jun-07 18:19
HappyFunBall5-Jun-07 18:19 
AnswerRe: CHtmlView with dialog templates? Pin
Rajkumar R5-Jun-07 18:31
Rajkumar R5-Jun-07 18:31 
GeneralRe: CHtmlView with dialog templates? Pin
HappyFunBall5-Jun-07 19:05
HappyFunBall5-Jun-07 19:05 
GeneralRe: CHtmlView with dialog templates? Pin
Rajkumar R5-Jun-07 19:30
Rajkumar R5-Jun-07 19:30 
GeneralRe: CHtmlView with dialog templates? Pin
HappyFunBall5-Jun-07 20:16
HappyFunBall5-Jun-07 20:16 
AnswerRe: CHtmlView with dialog templates? Pin
Rajkumar R5-Jun-07 20:39
Rajkumar R5-Jun-07 20:39 
GeneralRe: CHtmlView with dialog templates? Pin
HappyFunBall5-Jun-07 21:21
HappyFunBall5-Jun-07 21:21 
AnswerRe: CHtmlView with dialog templates? Pin
Rajkumar R5-Jun-07 22:47
Rajkumar R5-Jun-07 22:47 
Ok,
Its simple,
1) create a modeless dialog of CDhtmlDialog.
Create a dialog resource and add class derived from CDhtmlDialog.
To make it modeless implement a default contructor and implement a simple create function
BOOL CYourModelssDHTMLdlg::Create(CWnd* pParentWnd)
{
	return CDHtmlDialog::Create(IDD_DIALOG1/* dialog id*/, pParentWnd);
}


use create() function in your CView OnCreate() / equavalent.
 int CYourView::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
	if (CView::OnCreate(lpCreateStruct) == -1)
		return -1;
	m_yourModelssDHTMLdlg.Create(this);	
}


Note: set the dialog style to WS_CHILD, WS_VISIBLE, No BORDER , NO TITLEBAR use resource designer or on your code (precreateWindow()).

2) On your Views OnSize()
void CYourView::OnSize(UINT nType, int cx, int cy)
{
	CView::OnSize(nType, cx, cy);

	m_yourModelssDHTMLdlg.MoveWindow(0, 0, cx, cy);
}

You might have missed it so you thought its not working.

Try this, this requires a time of 5~10 minutes.

Note: remember dialog style, resize and the dialog might have ok and cancel button this will cause the dialog to exitin its default behaviour.

I didn't explored CDHtmlDialog::EnableModeless, try this when you get time

Best Regards
Raj
GeneralRe: CHtmlView with dialog templates? Pin
Hamid_RT5-Jun-07 19:51
Hamid_RT5-Jun-07 19:51 
Questionmail from vc++ program Pin
prathuraj5-Jun-07 18:04
prathuraj5-Jun-07 18:04 
AnswerRe: mail from vc++ program Pin
Hamid_RT5-Jun-07 18:58
Hamid_RT5-Jun-07 18:58 
GeneralRe: mail from vc++ program Pin
prathuraj5-Jun-07 20:58
prathuraj5-Jun-07 20:58 
GeneralRe: mail from vc++ program Pin
Hamid_RT5-Jun-07 21:25
Hamid_RT5-Jun-07 21:25 
QuestionCXX0030: Error : expression cannot be evaluated Pin
Immunity185-Jun-07 16:31
Immunity185-Jun-07 16:31 
QuestionA question on c++ template Pin
Yuwen Zhou5-Jun-07 15:55
Yuwen Zhou5-Jun-07 15:55 
AnswerRe: A question on c++ template Pin
Steve Echols5-Jun-07 17:08
Steve Echols5-Jun-07 17:08 
GeneralRe: A question on c++ template Pin
Yuwen Zhou5-Jun-07 20:52
Yuwen Zhou5-Jun-07 20:52 
AnswerRe: A question on c++ template Pin
Sameerkumar Namdeo5-Jun-07 17:42
Sameerkumar Namdeo5-Jun-07 17:42 
AnswerRe: A question on c++ template [modified] Pin
Rajkumar R5-Jun-07 18:18
Rajkumar R5-Jun-07 18:18 
GeneralRe: A question on c++ template Pin
Yuwen Zhou5-Jun-07 20:57
Yuwen Zhou5-Jun-07 20:57 
AnswerRe: A question on c++ template Pin
Rajkumar R5-Jun-07 23:57
Rajkumar R5-Jun-07 23:57 
QuestionRe: A question on c++ template Pin
David Crow6-Jun-07 2:29
David Crow6-Jun-07 2:29 
QuestionRe: A question on c++ template Pin
David Crow6-Jun-07 2:29
David Crow6-Jun-07 2:29 
AnswerRe: A question on c++ template Pin
Yuwen Zhou6-Jun-07 23:12
Yuwen Zhou6-Jun-07 23:12 
AnswerRe: A question on c++ template Pin
Rajkumar R10-Jun-07 18:33
Rajkumar R10-Jun-07 18:33 

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.