|
You need to look for things like...
RUNTIME_CLASS (CLeakingObject)
and
CRuntimeClass->CreateObject ();
and so on.
If you look at the definition of the macro,
you can see the Create functions it hides.
Iain.
|
|
|
|
|
Thanks - not sure I understand...
Clicking on one of the memory leak messages in the debug window takes me to:
IMPLEMENT_DYNCREATE(CPalsView, CScrollView)
The next is:
IMPLEMENT_DYNCREATE(CMainFrame, CFrameWnd)
and the last is:
IMPLEMENT_DYNCREATE(CPalsDoc, CDocument)
does this mean that it thinks I (or maybe MFC) has a memory leak in one of these classes?
The only place I see the RUNTIME_CLASS macro is here in the App.InitInstance function:
CSingleDocTemplate* pDocTemplate;
pDocTemplate = new CSingleDocTemplate(
IDR_MAINFRAME,
RUNTIME_CLASS(CPalsDoc),
RUNTIME_CLASS(CMainFrame), // main SDI frame window
RUNTIME_CLASS(CPalsView));
AddDocTemplate(pDocTemplate);
which is of course a memory leak since I can't seem to find a cooresponding delete (unless MFC is handling that in some hidden way) ????
Any comments?
|
|
|
|
|
Need your advertisment on the following subject.
Does anybody know how to obtain the text from the statusbar?
Simple call of the GetWindowText retrieve only the text in first cell if is.
How to get the text from the others areas, is a question for me...
Any ideas?
4apai
There're no impossible tasks. There're tasks that required infinite period of execution time.
|
|
|
|
|
Have look at CStatusBar::GetPaneText (...).
Iain.
|
|
|
|
|
when i design any program use MFC Dialog box if u press Esc key ur program will end and if i want save setting when my program end but if i press Esc offcourse y program didnot save any thing so how i can stop Esc effect in my program or how i make any effect if i press it like save setting or else..
plz any one help me
|
|
|
|
|
Override the dialog's OnCancel() method. See here for more.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
you should use an Keyboard hook.(key board filter function)
use SetWindowsHookEx,
lowlevelkeyborad event.
|
|
|
|
|
Hello,
I'm trying to disable some compiler warnings generated while using the stl. The warnings that I try to disable are:
4663, 4018, 4100, 4786, 4245, 4146, 4244.
I installed the latest service pack and processor pack for visual studio 6.
Does anybody have a clue why these warnings do not get disabled?
Multiply it by infinity and take it beyond eternity and you'll still have no idea about what I'm talking about.
|
|
|
|
|
Where are you placing the #pragma directives?
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
At the top of my precompiled header file "StdAfx.h".
But I found some article here on codeproject that explains that some stl headers are setting the warnings back to default (on). Because of that my #pragma is everruled by the stl...
Multiply it by infinity and take it beyond eternity and you'll still have no idea about what I'm talking about.
|
|
|
|
|
I understand the article's intent, but it seems excessive. I placed the following in my project's stdafx.h file right before any other STL includes:
#include <yvals.h>
#pragma warning(disable:4018 4100 4146 4244 4663)
#include <iostream>
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
And you get a clean build? If I do that, the warnings keep on coming...
Multiply it by infinity and take it beyond eternity and you'll still have no idea about what I'm talking about.
|
|
|
|
|
Bob Stanneveld wrote:
And you get a clean build?
Yes, for those particular warnings.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
Do you also have the latest sdk installed?
Multiply it by infinity and take it beyond eternity and you'll still have no idea about what I'm talking about.
|
|
|
|
|
I have the Febuary 2003 (5.2.3790.0) edition installed.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
And now I'm starting to think that some paranormal influence wants me to go crazy...
Multiply it by infinity and take it beyond eternity and you'll still have no idea about what I'm talking about.
|
|
|
|
|
Please show the contents of your project's stdafx.h file.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
#ifndef __StdAfx_h_included__
#define __StdAfx_h_included__
#define VC_EXTRALEAN
#include <afx.h>
#include <afxwin.h>
/*
// these didn't work
#pragma warning(disable: 4018)
#pragma warning(disable: 4100)
#pragma warning(disable: 4146)
#pragma warning(disable: 4244)
#pragma warning(disable: 4245)
#pragma warning(disable: 4511)
#pragma warning(disable: 4512)
#pragma warning(disable: 4663)
#pragma warning(disable: 4710)
#pragma warning(disable: 4786)
*/
// warning 4018 still falls through
#define STL_USING_STRING
#include "Stl.h"
#endif // __StdAfx_h_included__
Multiply it by infinity and take it beyond eternity and you'll still have no idea about what I'm talking about.
|
|
|
|
|
I finally solved it.
After digging through the slt headers for a long time, I discovered that in the header <xlocale> the warnings 4018 and 4663 get set to their default state.
The solution was editing the Stl.h file in the STRING section so that those warnings get disabled after <xlocale> was included...
Now I can go to sleep with a clear mind...
Thanks for your help
Multiply it by infinity and take it beyond eternity and you'll still have no idea about what I'm talking about.
|
|
|
|
|
Maybe you're having a hard time with precompiled headers? Try deleting the debug (or release) subdir and build again. Sometimes this does wonders.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
Want a Boost forum in Code Project? Vote here[^]!
|
|
|
|
|
Nope, does not work either..
Multiply it by infinity and take it beyond eternity and you'll still have no idea about what I'm talking about.
|
|
|
|
|
What Windows Explorer stores in the lParam of TVITEM structure
If you retrieve information about treenode you have to use TVITEM structure. lParam of this structure allows to you to cache some data. Do you know what Windows Explorer caching here?
Thanks.
|
|
|
|
|
There is a good reason it is undocumented, to stop people from playing about too much.
That said, the ListView control has the PIDL stored in the items LPARAM. So, chances
are that will be the same for the Tree.
See here[^].
It is also possible that the LParam simply points to some internal structures holding pidls, and all sorts of com objects.
Iain.
|
|
|
|
|
How do you get your program to have XP-style buttons when running on XP? My buttons are still regular style.
~Nitron.
ññòòïðïðB A start
|
|
|
|
|
Quick Answer.
To get all the nifty new autotheme stuff, you need to have a manifest file.
Though I'm not the right person to ask more detail! I treat XP as W2K+Pretty.
OK, that was vague, but I hope it gives you a head start.
Iain.
|
|
|
|