I built MFCEmbed using the release version of 1.5, VC++ 7.1, and it
didn't work all that well. I figured I must've missed an obscure build
option or two since the same code worked fine in previous versions.
Maybe there is a magic option, but here's what I did to get it working:
The 3 problems were a crash, resize painting problems, and no SSL.
In BrowserFrameGlue.cpp
256 if (GetActiveWindow()->m_hWnd != pThis->m_hWnd)
GetActiveWindow() was coming up NULL (which is not unexpected) so I
changed the line to this:
if ((GetActiveWindow()) && (GetActiveWindow()->m_hWnd != pThis->m_hWnd))
//can never have too many parens.
The next problem was in this code:
262 // We're the active one
263 //Return FALSE if we're minimized
264 WINDOWPLACEMENT wpl;
265 pThis->GetWindowPlacement(&wpl);
266
267 if ((wpl.showCmd == SW_RESTORE) || (wpl.showCmd == SW_MAXIMIZE))
268 *aVisible = PR_TRUE;
Changing 267 to the following cured the painting problem:
if (wpl.showCmd != SW_MINIMIZE)
I didn't think really hard about this, but the behavior seems to match
the comment in line 263.
It's been a while since I did this, but my notes indicate that the
following code changed and stirred things up.
3373 nsGlobalWindow::Focus()
3379 PRBool isVisible = PR_FALSE;
3380 if (baseWin) {
3381 baseWin->GetVisibility(&isVisible);
3382 }
3383
3384 if (!isVisible) {
3385 // A hidden tab is being focused, ignore this call.
3386 return NS_OK;
3387 }
I also made a cryptic note about nsviewmanager and NS_PAINT but I
can't decipher it...
The SSL problem turned out to be a Profile Manager problem. The
m_ProfileMgr->StartUp error return is ignored and the app starts up
without a profile. I grafted in my own profile code and things worked fine,
The line that was failing was this:
NS_GetSpecialDirectory(NS_APP_USER_PROFILE_50_DIR,getter_AddRefs(profilePath));
_______________________________________________
mozilla-embedding mailing list
mozilla-embedding@mozilla.org
http://mail.mozilla.org/listinfo/mozilla-embedding