By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,925 Members | 725 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,925 IT Pros & Developers. It's quick & easy.

Visual C++ .NET problem

P: n/a
Hi!

This is my first post here, so I don't know if this the correct place to
ask, but I have a problem with Visual C++:

I can't show neither a modal, nor a modeless dialog in a Windows Forms
Application, because of a Debug Assertion Failure in afxwin1.inl, line 26.

I don't know where the problem could be, because I don't do anything fancy
in the creation process.
(add a dialog resource, add a class for it, and then execute this code on a
click event: CMyDialog mydialog; mydialog.DoModal();)

I've searched Google, and lots of C++ sites for an EXAMPLE on how to show
dialogs in Forms Applications (.NET), but found none.

If anyone could point me to a site where there's a solution for this, or
better, give me a working example about using dialogs in a .NET Forms
Application, it would GREATLY be appreciated!

I go nuts about this, a simple dialog not showing.... In an MFC app.,
absolutely no problems!
Thank you very much in advance!
Jul 22 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a

"Seko" <da***@aquilanet.hu> wrote in message
news:1104714709.2906bce05f1e313b0c3e88e120839be5@t eranews...
Hi!

This is my first post here, so I don't know if this the correct place to
ask,

It's not. The topic here is the language, not any particular
compiler.
but I have a problem with Visual C++:

I can't show neither a modal, nor a modeless dialog in a Windows Forms
Application, because of a Debug Assertion Failure in afxwin1.inl, line 26.
This is neither a language issue nor a compiler issue, but a
Windows API issue. (Well I suppose it could be a language
abuse issue, but I cannot say without seeing the code ---
but please don't post it here -- we only deal with standard
code. That is, C++ has no concept of 'dialogs', 'forms', etc.

I don't know where the problem could be, because I don't do anything fancy
in the creation process.
(add a dialog resource, add a class for it, and then execute this code on a click event: CMyDialog mydialog; mydialog.DoModal();)

I've searched Google, and lots of C++ sites for an EXAMPLE on how to show
dialogs in Forms Applications (.NET), but found none.
If I were you, I'd go to the authoritative source: Microsoft.
Search on www.msdn.microsoft.com
(also note that this site lists several newsgroups which discuss
Microsoft products and technologies.

If anyone could point me to a site where there's a solution for this, or
better, give me a working example about using dialogs in a .NET Forms
Application, it would GREATLY be appreciated!


I don't know if it has an example program, but the MDSN site
will show you the correct way to do what you're asking about.

-Mike
Jul 22 '05 #2

P: n/a
Seko wrote:
Hi!

This is my first post here, so I don't know if this the correct place to
ask, but I have a problem with Visual C++:

I can't show neither a modal, nor a modeless dialog in a Windows Forms
Application, because of a Debug Assertion Failure in afxwin1.inl, line 26.

I don't know where the problem could be, because I don't do anything fancy
in the creation process.
(add a dialog resource, add a class for it, and then execute this code on a
click event: CMyDialog mydialog; mydialog.DoModal();)

I've searched Google, and lots of C++ sites for an EXAMPLE on how to show
dialogs in Forms Applications (.NET), but found none.

If anyone could point me to a site where there's a solution for this, or
better, give me a working example about using dialogs in a .NET Forms
Application, it would GREATLY be appreciated!

I go nuts about this, a simple dialog not showing.... In an MFC app.,
absolutely no problems!
Thank you very much in advance!


Ask in microsoft.public.dotnet.languages.vc.
If it doesn't appear in your news server use the public MS one:

msnews.microsoft.com


--
Ioannis Vranos

http://www23.brinkster.com/noicys
Jul 22 '05 #3

P: n/a
Thank you for the replies, apparently the situation changed somewhat, as now
I can successfully run the application with the dialogs - but only with
debugging disabled (release mode).

I will browse through MSDN, and try the newsgroup you mentioned.

Thank you!

-David
Jul 22 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.