AfxMessageBox with non Afx class
Nandan -- nandan@hiso.honeywell.soft.net
Friday, February 02, 1996
Hi all,
My app has one iconic window, belonging to my own class. The class
is the same as AfxFrameOrView except that I use a different class name.
Calling AfxMessageBox from my app brings a windows style MessageBox
as opposed to a MFC message box.
(Note :I use CreateEx to create the window and have set m_pMainWnd
to the CWnd object.)
How do I get a MFC style message box?
I use VC++ 2.2 on NT 3.51
Nandan
nandan@hiso.honeywell.soft.net
Marty Fried -- mfried@linex.com
Saturday, February 03, 1996
At 11:23 AM 2/2/96 -0500, Nandan wrote:
>Hi all,
> My app has one iconic window, belonging to my own class. The class
>is the same as AfxFrameOrView except that I use a different class name.
> Calling AfxMessageBox from my app brings a windows style MessageBox
>as opposed to a MFC message box.
> (Note :I use CreateEx to create the window and have set m_pMainWnd
>to the CWnd object.)
>
>How do I get a MFC style message box?
>
>I use VC++ 2.2 on NT 3.51
I'm not sure what you mean by "MFC style". I think AfxMessageBox eventually
calls the Windows ::MessageBox function (at least it does with 4.0). Have
you tried setting a break point in Appui.cpp, in either the AfxMessageBox
function or DoMessageBox(), which it eventually calls? It seems to me that
stepping through this function would either answer your question or at
least provide a more specific question to ask, if something in this function
fails.
I think many of the questions I've seen could easily be figured out by simply
stepping through the source code with the debugger (or simply reading it).
This is also a good learning tool, to see how the MFC classes themselves use
MFC.
_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
Marty Fried (mfried@linex.com)
Marin County, California
Mike Blaszczak -- mikeblas@interserv.com
Saturday, February 03, 1996
On Fri, 2 Feb 1996, Nandan wrote:
> Calling AfxMessageBox from my app brings a windows style MessageBox
>as opposed to a MFC message box.
Uh, what's the difference? AfxMessageBox() ends up calling the
::MessageBox() API. What are you expecting to be different?
>How do I get a MFC style message box?
What is an "MFC-style message box"?
.B ekiM
--
TCHAR szDisc[] = _T("These words are my own; I do not speak for Microsoft.");
Mario Contestabile -- Mario_Contestabile.UOS__MTL@UOSMTL2.universal.com
Sunday, February 04, 1996
[Snipping()]
On Fri, 2 Feb 1996, Nandan wrote:
> Calling AfxMessageBox from my app brings a windows style MessageBox
>as opposed to a MFC message box.
Uh, what's the difference? AfxMessageBox() ends up calling the
::MessageBox() API. What are you expecting to be different?
>How do I get a MFC style message box?
What is an "MFC-style message box"?
.B ekiM
[SnipStop()
He probably doesn't call Enable3dControls()...
mcontest@universal.com
| Вернуться в корень Архива
|