Click here to Skip to main content
16,008,010 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: RegEnumValue fn error ... help me .. Pin
Waldermort17-Oct-06 20:51
Waldermort17-Oct-06 20:51 
GeneralRe: RegEnumValue fn error ... help me .. Pin
Blake Miller18-Oct-06 9:52
Blake Miller18-Oct-06 9:52 
AnswerRe: RegEnumValue fn error ... help me .. Pin
ThatsAlok18-Oct-06 5:07
ThatsAlok18-Oct-06 5:07 
QuestionLOGFONT and GetTextExtent Pin
includeh1017-Oct-06 20:04
includeh1017-Oct-06 20:04 
AnswerRe: LOGFONT and GetTextExtent Pin
Mark Salsbery18-Oct-06 6:29
Mark Salsbery18-Oct-06 6:29 
QuestionHow to access print preview Control bar Pin
georgekjolly17-Oct-06 19:23
georgekjolly17-Oct-06 19:23 
AnswerRe: How to access print preview Control bar Pin
alphaxz17-Oct-06 19:27
alphaxz17-Oct-06 19:27 
QuestionDLL Programming: a Web Browser on Dialog Box Pin
Get_Rakesh17-Oct-06 18:41
Get_Rakesh17-Oct-06 18:41 
Hi All,

I m creating a MFC Dll -> Regular Dll with statically linked MFC.

In this Dll project, I have a Dialog Box. I tried to create a Web Browser on this dialog box in two ways:
1: Insert ActiveX control
2: Using CHtmlView class

In both cases, I failed. No compilation err generates.But,
--->> If I use first way (Web Browser Control) even dialog box not created.
--->> If I create CHtmlView object at runtime using Create(..) function, Assertion Faied err generates when I call Create function for CHtmlView object.

CODE IS AS BELOW:
/*********************************************/
//Global function in DLL App class #####################
BOOL __stdcall ShowFiles()
{
CDlg dlg;
dlg.DoModal();

return TRUE;
}
/*********************************************/
/*********************************************/
//In Dialog class ###############################
BOOL CDlg::OnInitDialog()
{
CDialog::OnInitDialog();

CRect rect;
GetWindowRect(&rect);

//m_View declared in .h file
m_View.MoveWindow(&rect);

return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}

int CDlg::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
if (CDialog::OnCreate(lpCreateStruct) == -1)
return -1;

HINSTANCE m_hInst = AfxGetResourceHandle();

TRY
{
HINSTANCE m_hInst2 = ((CDllApp*)AfxGetApp())->hI; //theApp.m_hInstance
AfxSetResourceHandle(m_hInst2);
CRect rect;
GetWindowRect(&rect);
m_View.Create(NULL,_T(""),WS_CHILD|WS_VISIBLE,rect,this,AFX_IDW_PANE_FIRST);
m_View.ShowWindow(SW_MAXIMIZE);
}
CATCH_ALL(e)
{
e->ReportError();
}
END_CATCH_ALL

AfxSetResourceHandle(m_hInst);

return 0;
}


If any one has the soultion, plz reply ASAP.

Thanks in advance,


_______________
-------//-----
//____//
//-----
____// \\
---// \\AKESH

QuestionHow to run a command and wait for its completion Pin
Abhiyantara17-Oct-06 18:36
Abhiyantara17-Oct-06 18:36 
AnswerRe: How to run a command and wait for its completion Pin
Stephen Hewitt17-Oct-06 19:06
Stephen Hewitt17-Oct-06 19:06 
GeneralRe: How to run a command and wait for its completion Pin
alphaxz17-Oct-06 19:13
alphaxz17-Oct-06 19:13 
GeneralRe: How to run a command and wait for its completion Pin
Mark Salsbery18-Oct-06 6:31
Mark Salsbery18-Oct-06 6:31 
Questionfstream + vector Pin
aldo hexosa17-Oct-06 18:35
professionalaldo hexosa17-Oct-06 18:35 
AnswerRe: fstream + vector Pin
Stephen Hewitt17-Oct-06 18:55
Stephen Hewitt17-Oct-06 18:55 
AnswerRe: fstream + vector Pin
Programm3r17-Oct-06 20:34
Programm3r17-Oct-06 20:34 
GeneralRe: fstream + vector Pin
Link200617-Oct-06 21:08
Link200617-Oct-06 21:08 
JokeRe: fstream + vector Pin
Programm3r17-Oct-06 21:12
Programm3r17-Oct-06 21:12 
GeneralRe: fstream + vector Pin
Christian Graus17-Oct-06 21:55
protectorChristian Graus17-Oct-06 21:55 
QuestionHow to create Internet shortcut link? Pin
kiranin17-Oct-06 18:04
kiranin17-Oct-06 18:04 
QuestionRe: How to create Internet shortcut link? Pin
prasad_som17-Oct-06 19:19
prasad_som17-Oct-06 19:19 
AnswerRe: How to create Internet shortcut link? Pin
kiranin17-Oct-06 19:27
kiranin17-Oct-06 19:27 
AnswerRe: How to create Internet shortcut link? Pin
prasad_som17-Oct-06 19:51
prasad_som17-Oct-06 19:51 
GeneralRe: How to create Internet shortcut link? Pin
kiranin17-Oct-06 20:10
kiranin17-Oct-06 20:10 
QuestionRe: How to create Internet shortcut link? Pin
prasad_som17-Oct-06 20:21
prasad_som17-Oct-06 20:21 
AnswerRe: How to create Internet shortcut link? Pin
kiranin17-Oct-06 20:23
kiranin17-Oct-06 20:23 

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.