|
|
Of course you have other good choice GetFileAttributesEx.
|
|
|
|
|
hello...
I want to open some "Output.bmp" in MSpaint, when i click "Display" button.How it is Possible?????
Thanks in advance...
KEEP SMILING.....
|
|
|
|
|
Use ShellExecute or CreateProcess functions to spawn the MSPaint.exe and pass your file name "Output.bmp" as command line argument.
Regards,
Sandip.
|
|
|
|
|
I am assuming that Output.bmp is in D:\somefolder
Now, try this:
ShellExecute(NULL, _T("open"), _T("mspaint.exe"), _T("D:\\Somefolder\\Output.bmp"), NULL, SW_SHOW);
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
Thanks...Its working Fine....
Thanku...
|
|
|
|
|
Good that it worked. You're welcome.
phanindra varma wrote: Thanku
Please don't use SMS language on these boards. My sincere request.
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
SehllExecute or CreateProcess are helpfuls for you.
|
|
|
|
|
I have created the dll project, this dll needs other two dll, and
I want to finally provide only one dll(the one generated from this dll project, and hopefully the other two dll can merge in this dll),how should I do?
It seems the directly genrated dll is not ok.
|
|
|
|
|
Do you have source code for all the dlls??
Regards,
Sandip.
|
|
|
|
|
no.
this problem really make me annoying.
do you have any suggestions.?
|
|
|
|
|
No then you cant merge them in to one dll no sugessitions also
you have to distribute three dlls.
Just check incase if these dlls support static linking like MFC then you wont need to distribute all dlls.
Regards,
Sandip.
|
|
|
|
|
But I think its better you dont merge them.
|
|
|
|
|
//MFC Single doc Exe
#ifdef _DEBUG
CMemoryState oldMemState,
newMemState, diffMemState;
#endif
void CLeakTestView::OnDraw(CDC* pDC)
{
CLeakTestDoc* pDoc = GetDocument();
ASSERT_VALID(pDoc);
// TODO: add draw code for native data here
//noting
#ifdef _DEBUG
newMemState.Checkpoint();
if(diffMemState.Difference(oldMemState,newMemState))
{
TRACE("Memory Is Leaking!!! \n\n");
diffMemState.DumpStatistics();
}
#endif
}
int CLeakTestView::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
if (CView::OnCreate(lpCreateStruct) == -1)
return -1;
// TODO: Add your specialized creation code here
#ifdef _DEBUG
oldMemState.Checkpoint();
#endif
return 0;
}
output:(Total allocations are increasing when ondraw)
0 bytes in 0 Free Blocks.
434 bytes in 11 Normal Blocks.
0 bytes in 0 CRT Blocks.
0 bytes in 0 Ignore Blocks.
672 bytes in 4 Client Blocks.
Largest number used: 1374 bytes.
Total allocations: 11950 bytes.
Memory Is Leaking!!!
0 bytes in 0 Free Blocks.
434 bytes in 11 Normal Blocks.
0 bytes in 0 CRT Blocks.
0 bytes in 0 Ignore Blocks.
672 bytes in 4 Client Blocks.
Largest number used: 1374 bytes.
Total allocations: 12170 bytes.
Memory Is Leaking!!!
0 bytes in 0 Free Blocks.
434 bytes in 11 Normal Blocks.
0 bytes in 0 CRT Blocks.
0 bytes in 0 Ignore Blocks.
672 bytes in 4 Client Blocks.
Largest number used: 1374 bytes.
Total allocations: 12390 bytes.
Memory Is Leaking!!!
0 bytes in 0 Free Blocks.
434 bytes in 11 Normal Blocks.
0 bytes in 0 CRT Blocks.
0 bytes in 0 Ignore Blocks.
672 bytes in 4 Client Blocks.
Largest number used: 1374 bytes.
Total allocations: 12610 bytes.
The thread 0xD0C has exited with code 0 (0x0).
|
|
|
|
|
USE oldMemState.DumpAllObjectsSince(); to find which all objects are leaking.
Regards,
Sandip.
|
|
|
|
|
Dumping objects ->
strcore.cpp(118) : {119} normal block at 0x00375B58, 17 bytes long.
Data: < > 01 00 00 00 04 00 00 00 04 00 00 00 BE CD D0 F7
strcore.cpp(118) : {98} normal block at 0x00375838, 19 bytes long.
Data: < > 01 00 00 00 06 00 00 00 06 00 00 00 CE DE B1 EA
array_p.cpp(110) : {96} normal block at 0x003757E0, 20 bytes long.
Data: < xJ7 > 00 00 00 00 78 4A 37 00 00 00 00 00 CD CD CD CD
array_p.cpp(71) : {95} normal block at 0x00375798, 4 bytes long.
Data: < > 00 00 00 00
winfrm2.cpp(66) : The thread 0x23C has exited with code 0 (0x0).
|
|
|
|
|
If you use the debugging version of new then you can get file/line number
information that can help you find the line of code making the allocation(s)
that aren't being freed.
Add something like this to the top of all your source files...
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Hi
In Visual Studio .Net ,Why we r using #using <mscorlib.dll> this dll ?Is there any advantages for using that DLL?
Thanks & Regards
Nisha.S
|
|
|
|
|
nisha00000 wrote: In Visual Studio .Net ,Why we r using #using this dll ?Is there any advantages for using that DLL?
What are you talking about?
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
Answering on National Day: you're addict (or possibly you're not Italian )!
More drugz plz plz!
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
|
|
|
|
|
Say what? There are actually Italians that are making posts too, on this National day! Talk about the C++ MFC addicted polyglot.
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
Hey man, Wish you a very very Happy National Day.
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
Thank you very much.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
|
|
|
|
|
My Wishes too.
|
|
|
|
|
Thanks Rajkumar
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
|
|
|
|