|
CMyModelessDlg* pDlg = new CMyModelessDlg();
ASSERT (pDlg != NULL);
pDlg->Create (...);
pDlg->ShowWindow (SW_SHOW);
...
pDlg->DestroyWindow();
delete pDlg; /ravi
Let's put "civil" back in "civilization"
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
That's what I'm doing except for ASSERT (pDlg != NULL); What will that do for me? If pDlg was NULL, would I even be able to create it and show it? (which the app does just fine)
- Nitron
"Those that say a task is impossible shouldn't interrupt the ones who are doing it." - Chinese Proverb
|
|
|
|
|
ASSERT s are good programming practice - it's just a way of asserting conditions that must be true. ASSERT s only work in debug builds. It seems you're doing the right thing - there are likely other problems in your code.
/ravi
Let's put "civil" back in "civilization"
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
Getting compiler errors for this:
#include "stdafx.h"
#using <mscorlib.dll>
#using <System.dll>
#using <System.Windows.Forms.dll>
__gc public class CppForm : public Form {
public:
CppForm(){}
};
#include <tchar.h>
using namespace System;
using namespace System::ComponentModel;
using namespace System::Windows::Forms;
int _tmain(void)
{
Console::WriteLine(S"forms World");
Application::Run(new CppForm());
return 0;
}
e:\vc7practice\CppForm\CppForm.cpp(10): error C2504: 'Form' : base class undefined
and
e:\vc7practice\CppForm\CppForm.cpp(25): error C2665: 'System::Windows::Forms::Application::Run' : none of the 3 overloads can convert parameter 1 from type 'CppForm __gc *'
What am I doing wrong?
Thanks!
Appreciate your help,
ns
|
|
|
|
|
Can't help you but just to make things clear, this code is not VC7. It is VC++.NET made with studio.NET. We use VC7 to mean VC++ MFC7 which is also made with studio.NET by selecting a different project option.
Art
|
|
|
|
|
Hi,
I'm looking for information on how to create interesting
non-rectangular GUI. Something that could look like windows media players V.9. I believe that it's not something easy and I just want some reference on a book or a tutorial that could help me.
Thanks
Regards
Mykel
Everything's beautiful if you look at it long enough...
|
|
|
|
|
There's some articles on CodeProject...
http://www.codeproject.com/dialog/skinsyse.asp[^]
http://www.codeproject.com/dialog/skinstyle.asp[^]
The main thing you're going to want to do is take a bitmap and turn it into an HRGN GDI object. Then you can call SetWindowRgn on the specific window and you'll have a non-rectangular window.
Chris Richardson
You can stash and you can seize
In dreams begin, responsibilities U2 - Acrobat[^]
Stop being PC and accounting for everyone and his momma's timeframe. Just enjoy your - Rohit Sinha in the content-challenged thread
|
|
|
|
|
How do you format those???
|
|
|
|
|
Never mind, figured it out.
|
|
|
|
|
Hi,
I have some very old database files that belong I think to DBASE or DB2 andI would like to convert the data into a text file.
Does anyone know of some tools that can help do this.? THe files are extension .001 or .fil
Thanks in adavance.
|
|
|
|
|
I'm pretty sure Access will import dBase stuff. You can always check out: http://www.dbase.com/mainpage.htm[^]
- Nitron
"Those that say a task is impossible shouldn't interrupt the ones who are doing it." - Chinese Proverb
|
|
|
|
|
Hi:
Is it possible to hide the dialog in a dialog-based application?
if possible,where and how ? in OnInitDialog and with ShowWindow(SW_HIDE) or...please help me.
Best Regards.
|
|
|
|
|
Why do you want to hide it? It would disappear from task switching list (Alt+Tab) and user wouldn't be able to show it back.
Anyway, you may call ShowWindow(SW_HIDE) , or even reset a dialog template's Visible flag in the resource editor.
Regards,
BB
|
|
|
|
|
MR ZarrinPour wrote:
in OnInitDialog and with ShowWindow(SW_HIDE)
Yes. But, you probably don't want to do this for a modal dialog.
/ravi
Let's put "civil" back in "civilization"
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
Hi!
I'm working on an application displaying short medical video runs. I currently use ::StretchDIBits to get the pics on the screen.
It works all right, but one might want to enlarge the view by a factor of 2. This does still work, but the ::StretchDIBits-function appears to be quite slow when enlarging bitmaps.
Any suggestions? Alternative functions?
Thanks a lot in advance
Matthias
|
|
|
|
|
|
I use bilinear interpolation and direct draw in my medical applications. I fractionally scale 55 MB (grayscale mammograms 12bpp) images onto 5 mega pixel displays.
John
|
|
|
|
|
what are the options to use XML with C/C++ for windows, and which is good for a simple database project?
karanba
|
|
|
|
|
If you want to use XML in C++ you can use XML DOM or a third-party lib.
Rickard Andersson8
Here is my card, contact me later!
UIN: 50302279
E-Mail: nikado@pc.nu
Interests: C++, ADO, SQL, Winsock, 0s and 1s
|
|
|
|
|
I've been very happy with XML4C[^]. Easy to use, fast, open source and free!
/ravi
Let's put "civil" back in "civilization"
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
I have written many tutorials on XML and VC++.
http://www.ltpb.8m.com/tutorial/listall.html
-Steven
CPACodeProjectAddict
By reading this message you are held fully responsible for any of the mispelln's or grammer, issues, found on, codeproject.com.
For those who were wondering, actual (Linux) Penguins were harmed in creating this message.
|
|
|
|
|
|
There are lots of tools, libraries...
But why not using the MSXML? Microsoft is improving their products continuously, and moreover, the functions are docummented...
Using that you'll be able to use DOM and SAX...
it's your choice...
|
|
|
|
|
Hi out there.
I got a problem with an application compiled with Visual NET 2002.
My application will not launch when I perform a 'Start without debugging', but will start perfectly if I perform a Start (From the Debug Menu).
Once I've performed the start without debugging, I can see that my App is running (an even with 90% of the cpu), but it won't go further ! Same thing if I launch it manually by double-clicking my exe
A basic check has been to put a MessageBox at the very first beginning of the program (I can see it when starting From the 'start' menu).
This problem only happens with the release configuration of my projects (The debug exe works fine).
If anybody could Help, it would be great cyz that stuff is goin to drive me crazy.
Thanx in advance Mike.
|
|
|
|
|
The things I would check:
1. Project settings. Are they the same for release as they are for debug?
2. Paths. Perhaps you have relative paths in your code that are breaking when you run from a different spot.
3. Uninitialized variables. Sometimes the debugger will initialize these to 0 and mask out bugs that will manifest in the release builds.
"When a man sits with a pretty girl for an hour, it seems like a minute. But let him sit on a hot stove for a minute and it's longer than any hour. That's relativity." - Albert Einstein
|
|
|
|