|
BTW: I'm not Iain (and neither Alfonso the Wise... )
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
|
|
|
|
|
Oh it seems that somebody doesnt like of your reply that you are not Iain.
|
|
|
|
|
Oh I don't bother about down voting: I've a lot of friends
BTW I'm sorry, but no Vivaldi in my (very poor indeed) classical music collection.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
|
|
|
|
|
Not problem,thanks.
|
|
|
|
|
Hamid. wrote: that somebody doesnt like of your reply that you are not Iain
then he can respond to me directly
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
You may have a superb reason why you are not Iain, but that went on his arrogant assumptions.
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
Right.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
|
|
|
|
|
CPallini wrote: and neither Alfonso the Wise...
Ok, from now on I will call you Alfonso. Do you agree with that Alfonso ?
|
|
|
|
|
All or nothing: Alfonso the Wise!
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
|
|
|
|
|
I am bit late to collect a vote , I am your friend alfonso , may be thats going on my arrogant assumptions.
|
|
|
|
|
Rajkumar R wrote: I am bit late to collect a vote
It's (almost ) never too late.
Rajkumar R wrote: I am your friend alfonso [Rose] , may be thats going on my arrogant assumptions.
Well, if you like to be my friend don't use my friendly name alfonso , use instead the fully-featured one: Alfonso the Wise.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
|
|
|
|
|
I think "Pallini the wise" best match.
|
|
|
|
|
I am trying to use a CFrameWnd in my code and I keep getting an assertion error when I try to ShowWindow(SW_SHOW);
CWnd * tempWnd = new CWnd();
tempWnd->Attach(p_adsw_hwndAcad);
CFPLvlLyrWnd *mWnd = (CFPLvlLyrWnd*)(RUNTIME_CLASS(CFPLvlLyrWnd))->CreateObject();
RECT sizze = CFrameWnd::rectDefault;
DWORD dwStyle = WS_OVERLAPPEDWINDOW;
if (mWnd->Create(NULL, "Levels/Layers", dwStyle, sizze, tempWnd, MAKEINTRESOURCE(0) ))
{
mWnd->m_parentWHandle = p_adsw_hwndAcad;
tempWnd->BeginModalState();
mWnd->ShowWindow(SW_SHOW);
}
else
{
AfxMessageBox("LoadFrame failed!");
}
HWND tempHandle = tempWnd->Detach();
delete(tempWnd);
This will run in VS 6.0 but in VS 2005 I get an assertion error and the program crashes. What could be the problem?
Help me Obi-Wan Kenobi, you're my only hope!
|
|
|
|
|
LeonardLay wrote: ...I get an assertion error...
What line of what file is asserting?
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
The assertion error is in
File: f:\rtm\vctools\vc7libs\ship\atlmfc\src\mfc\winfrm.cpp
Line: 942
|
|
|
|
|
|
mWnd->ShowWindow(SW_SHOW);
When it gets to this point, the assertion error appears. I stepped into the code for ShowWindow and when it calls the AfxGetThread() it returns a NULL then it gives the assertion error because the return should not be NULL.
|
|
|
|
|
Show us the code that contains the ASSERT !
Steve
|
|
|
|
|
LRESULT CFrameWnd::OnActivateTopLevel(WPARAM wParam, LPARAM lParam)
{
CWnd::OnActivateTopLevel(wParam, lParam);
ExitHelpMode();
#ifndef _AFX_NO_OLE_SUPPORT
if (m_pNotifyHook != NULL)
{
m_pNotifyHook->OnActivate(
LOWORD(wParam) != WA_INACTIVE && !HIWORD(wParam));
}
#endif
CWinThread *pThread = AfxGetThread();
ASSERT(pThread);
if (pThread->m_pMainWnd == this)
{
CView* pActiveView = GetActiveView();
if (pActiveView == NULL)
pActiveView = GetActiveFrame()->GetActiveView();
if (pActiveView != NULL)
pActiveView->OnActivateView(FALSE, pActiveView, pActiveView);
}
|
|
|
|
|
Did you find a solution for your problem ?
Thank you.
|
|
|
|
|
Unfortunately I still haven't found a solution for this problem. I ended up just going back to using VS 6.0 to continue developing my software.
|
|
|
|
|
I have a problem with my embedded web browser control (IWebBrowser2 ).
I try to resize it when it's host (which is a child of the main frame) gets WM_SIZING while the main frame is resized. I was under the apparently naîve impression that I could do this by calling put_Width and put_Height on the web browser in WM_SIZING .
Making these calls actually triggers the DWebBrowserEvents2 events DISPID_WINDOWSETHEIGHT and DISPID_WINDOWSETWIDTH , but the size of the web browser control remains unchanged.
Any guesses as to why this happen?
--
Time you enjoy wasting is not wasted time - Bertrand Russel
|
|
|
|
|
Johann Gerell wrote: I try to resize it when it's host (which is a child of the main frame)
Is there some reason you are not using CHtmlView?
led mike
|
|
|
|
|
led mike wrote: Is there some reason you are not using CHtmlView?
Yes. If possible, I'm not letting MFC within a mile of my codebase. But please let's not discuss that now...
Anyway, I'm now bypassing IWebBrowser2::put_Width/Height by moving the actual OLE object window, roughly like this (error checks omitted):
ATL::CComPtr<IOleWindow> oleWindow;
iOleObject_->QueryInterface(&oleWindow);
HWND hwndBrowser = NULL;
oleWindow->GetWindow(&hwndBrowser);
::MoveWindow(hwndBrowser, 0, 0, cx, cy, TRUE); As an interesting addition, I noticed that IWebBrowser2::get_HWND gives NULL for the window, where I expected the same result as querying the IOleWindow interface.
--
Time you enjoy wasting is not wasted time - Bertrand Russel
|
|
|
|
|
Johann Gerell wrote: Yes. If possible, I'm not letting MFC within a mile of my codebase.
Ah, I see, you believe there is something wrong with MFC but you are fine with writing COM code. Did you read your own post?
Johann Gerell wrote: As an interesting addition, I noticed that IWebBrowser2::get_HWND gives NULL for the window, where I expected the same result as querying the IOleWindow interface.
Ok then, good luck.
led mike
|
|
|
|