473,382 Members | 1,359 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

Visual C++ .NET problem

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
3 1504

"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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: John | last post by:
I have a problem, it's not with any code I have because... there is no code. When I run a blank visual basic 6 form, it opens up just fine. When I add a text box, a caption, and a button... it...
7
by: Forecast | last post by:
I run the following code in UNIX compiled by g++ 3.3.2 successfully. : // proj2.cc: returns a dynamic vector and prints out at main~~ : // : #include <iostream> : #include <vector> : : using...
26
by: Bruno Jouhier [MVP] | last post by:
I'm currently experiencing a strange phenomenon: At my Office, Visual Studio takes a very long time to compile our solution (more than 1 minute for the first project). At home, Visual Studio...
7
by: Charles | last post by:
I have Visual Studio 6.0 stand-alone (with C++) and as part of Compaq Visual Fortran 6.6c. I am moving my development from a Win 98 SE machine w/2x 10 Gb HDD (each w/ 1Gb free), 768 Mb RAM to a...
6
by: VR | last post by:
Hi, I read about Master Pages in ASP.Net 2.0 and after implementing some WinForms Visual Inheritance I tryed it with WebForms (let's say .aspx pages, my MasterPage does not have a form tag itself...
18
by: surfrat_ | last post by:
Hi, I am having the following problems in getting Microsoft Visual Studio 2005 Professional to link to an Access .mdb database. Please help me to sort this out. Problem 1: The Microsoft...
4
by: sqlguy | last post by:
Why do we have to contact MS for a problem that has been with this compiler from at least the beta of VS 20005. I am so sick and tired of the 30 - 40 clicks it takes to dismiss VS when there is a...
3
by: Edwin Smith | last post by:
I have a 2 form project in VS2005 that now hangs whenever I try to do anything with the second form. This seems to have started when I added some SQL tables from a Pervasive v.9 database using the...
0
jwwicks
by: jwwicks | last post by:
Introduction This tutorial describes how to use Visual Studio to create a new C++ program, compile/run a program, resume work on an existing program and debug a program. It is aimed at the...
3
by: Johnson | last post by:
I'm not sure if this is an IIS 5.1 issue or ASP.NET issue, or Visual Studio 2008 issue -- thus posting to 3 groups. Please don't be offended. The problem I'm encountering is that Visual Studio...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.