|
It Crashes While going in side the SetClipboard() ;
thanx
Regards.
|
|
|
|
|
What about the other two questions I asked?
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
Sorry i not Read your this question in hurry
COleDataSource* pData = new COleDataSource;
Where is the corresponding delete?
new is successfull.
Its am not deleting it ? Where should i delete it in the above code.
thanx
Regards.
|
|
|
|
|
zahid_ash wrote:
new is successfull.
But there is no guarantee that it will be. If it fails, any attempt to dereference pData will result in some sort of crash.
zahid_ash wrote:
Where should i delete it in the above code.
After it is no longer needed.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
Is PData is required till we paste the image some where.
or We can delete it as we copy the image .
As i am doing i Copy the image and then paste it to MS Word .
and then come back again and then As i copy the Image again it Crashes down .
So where I should Delete it / I m not sure where it is no longer needed .
As i found no clue about it on MSDN on ClipBoard topic. they not mentioned where to delete it .
thanx
Regards.
|
|
|
|
|
zahid_ash wrote:
So where I should Delete it / I m not sure where it is no longer needed .
A variable is no longer needed after it is no longer used. That has the makings of a tongue twister, but think about it slowly and it will make sense.
After you have used pData for the last time, its memory can be freed.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
How does one remove tool settings programmatically?
I have added the following tool setting:
var CLTool = config.Tools('VCCLCompilerTool');
CLTool.PreprocessorDefinitions = "_CONSOLE";
now how do I remove it other than by manipulating the string?:
var strValue = CLTool.PreprocessorDefinitions;
and now removing the substring - '_CONSOLE' from strValue.
I was thinking of using |= or &=.
I am the handsome one in the crowd.
|
|
|
|
|
laugh:i am using Hooking concept in my application for capturing all the mouse events around the system and sending that message to tts machine to speak out. Now i am posed one problem.i am using Insert + a keys to execute one function but if i press insert + a it's also spelling out insert key name. How to avoid this problem
Thanking you..
E.Veera Raghavendra
E.Veera Raghavendra
|
|
|
|
|
this function does the job when the keys are pressed while the application is on focus. maybe this will give you an idea. you can do something similar on the application side, within the function, which catches your hooking messages from the hooking dll.
BOOL CMyDialog::PreTranslate(MSG *pMsg)
{
if(pMsg->message==WM_KEYDOWN)
{
if(pMsg->wParam==VK_ESCAPE)
return TRUE;
elsif (GetAsyncKeyState(VK_INSERT) < 0 && (pMsg->wParam=='A'))
return TRUE;
}
return CDialog::PreTranslateMessage(pMsg);
}
|
|
|
|
|
I recently had a look at the windows media format sdk 9 and tried to write a simple audio player using the sdk. Currently I met trouble in playing more than one audio files. I modified the AudioPlay example by rewritting it using mfc. Currently when I handle WMT_EOF in the OnStatus method to open another audio file. The program hangs and could not open the audio file. Any suggestions? Thanks.
|
|
|
|
|
Hello,
If I create a new project in MFC and work with it. its ok.
But if I close is and try to open the project and try to build I get this error;
fatal error C1853: 'Release/Test.pch' is not a precompiled header file created with this compiler
And Its stand on: #include "stdafx.h"
What I have try;
1) Delite all the files in the Debug and Release folder.
2) Clean and rebuild all
Byt I still get this error. Is it possible to make it work. And way does it work at the first time I start working with the project and not after?.
There is in 2 *.cpp files I get this error at the same file.
|
|
|
|
|
Go in the menu Projects | Settings and then search in it to see Precompiled header files and choose not use the precompiled header files... I'm not sure where this option and I can't tell you cause I'm not home and I can't access VS but try that I remember it is somewhere in that menu for sure.
|
|
|
|
|
Well,
I cant find it. Can you please come back to me when you are at home and can see it.
|
|
|
|
|
This is the text I have and I need to make a compile without using this!
/nologo /MT /W3 /GX /O2 /I "../Shared" /I "../Zlib" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /Fp"Release/Test.pch" /YX"stdafx.h" /Fo"Release/" /Fd"Release/" /FD /c
Like you can see the file /Fp"Release/Test.pch" /YX"stdafx.h"
I need to compile without use this swithes. And how can I do that.?
|
|
|
|
|
Are you compiling in release mode???
|
|
|
|
|
|
Hey it's me I'm home now!!!
OK then I'm not sure if your problem is cause by that after all but try it...
Go in the menu Projects --> Properties and then in the tree on the left go in C/C++ section and then Precompiled Headers and on the right now in the first box (it's a combo box) choose "Not using precompiled headers".
If it doesn't work with that I don't know what's the problem.
--------------
The Thruth Is Out There
|
|
|
|
|
Ok I find it.
But Now I get;
fatal error C1083: Cannot open include file: 'stdafx.h': No such file or directory
How can I fix that?
|
|
|
|
|
Larsson wrote:
fatal error C1083: Cannot open include file: 'stdafx.h': No such file or directory
How can I fix that?
By verifying that the file exists. Does it?
What does the statement, and any above it, look like that generates this error? What extension does the referencing file have?
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
|
Does this help at all?
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
I hope so.
But not this. I need help to get this problem away.
So I hope for all the help I get get.
|
|
|
|
|
I have created a simple MFC MDI application using the MFC application wizard and apparently it creates a child window when I start the application. The application I'm writing ONLY provides the possibility to open certain files. This means that I do NOT want a child window when i start the application.
Is there some way i can avoid this 'default' behaviour, without having to create child windows myself (through 'Create' or 'LoadFrame')?
Any help will be greatly appreciated.
Er zit een korstje op mijn aars.
|
|
|
|
|
I wish you luck, because I have the same problems... The text books I have don't take me far enough into the nuts and bolts of what I really want to do.
I will keep my eye on this thread
Thomas
|
|
|
|
|
Well....i found the reason for this behaviour. The 'CCommandLineInfo' class, which is commonly created in the 'InitInstance' of the 'CWinApp' derived class, contains a 'CCommandLineInfo::FileNew' command by default. You can prevent a child frame from being created by assigning a 'FileNothing' command to the 'm_nShellCommand' attribute:
<br />
CCommandLineInfo cmdInfo;<br />
cmdInfo.m_nShellCommand = CCommandLineInfo::FileNothing;<br />
ParseCommandLine(cmdInfo);<br />
Er zit een korstje op mijn aars.
|
|
|
|