|
You should do a delete this in PostNcDestroy()
void CModelessDlg::PostNcDestroy() <br />
{<br />
delete this;<br />
}
John
|
|
|
|
|
same problem.
Details:
File: dbgheap.c
Line: 1084
Expression: pHead->nBlockUse == nBlockUse
Any ideas?
- Nitron
"Those that say a task is impossible shouldn't interrupt the ones who are doing it." - Chinese Proverb
|
|
|
|
|
Hmm.....
From that file:
I'll look into it. Thanks for your reply.
- Nitron
"Those that say a task is impossible shouldn't interrupt the ones who are doing it." - Chinese Proverb
|
|
|
|
|
I tracked it down to a library I'm linking to. (It was built with MFC in a shared DLL)
If I remove the library (i'm not using it yet), everything works fine. If I put it back in, I get linker messages saying mfc42.lib conflicts with another library, use /nodefaultlib:LIB .
If I run the app anyway, that's when I get the assertion failures. If I build in release mode (with the same library), all is good.
So i'm thinking it's something with my library. Any ideas from y'all are still anticipated...
- Nitron
"Those that say a task is impossible shouldn't interrupt the ones who are doing it." - Chinese Proverb
|
|
|
|
|
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.
|
|
|
|