|
CStringT is now a shared class between MFC and ATL. You need to include cstringt.h .
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|
|
Didn't work. Same error.
Are you saying that I have to use CStringT now? This can't be! The dialog control, where I am having this problem, contains a simple edit box. When I use the "Add Member Variable Wizard" to associate a variable with my edit box, I select "Value" for the category. It automatically sets the type to CString. I have been using CStrings throughout my program successfully until this morning. The problem has appeared only because I want to search the string.
It is saying that I must use a PCXSTR pointer as the parameter. I have looked at the documentation for this but I cannot see how to convert a simple, NULL terminated string into one of these. Also, I cannot event get the compiler to recognize PCXSTR.
Any ideas?
Thank you,
Mark
|
|
|
|
|
CString IS CStringT !!!
it is like this for unicode uses...
|
|
|
|
|
Listen, I appreciate your help. I'm not trying to be contentious. You obvious know more about this that I do, however, I cannot see how you can say that "CStringT IS CString".
I'll just take my existing dialog header file and include a member variable:
CStringT m_strHello;
Here is the avalanche of errors that this generates:
c:\Development\uLTD\Software\uLTDTagConfigure\DecodedLogDlg.h(48) : error C2955: 'ATL::CStringT' : use of class template requires template argument list
c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\atlmfc\include\cstringt.h(2245) : see declaration of 'ATL::CStringT'
DecodedLogDlg.cpp
c:\Development\uLTD\Software\uLTDTagConfigure\DecodedLogDlg.h(48) : error C2955: 'ATL::CStringT' : use of class template requires template argument list
c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\atlmfc\include\cstringt.h(2245) : see declaration of 'ATL::CStringT'
c:\Development\uLTD\Software\uLTDTagConfigure\DecodedLogDlg.cpp(59) : error C2512: 'ATL::CStringT' : no appropriate default constructor available
c:\Development\uLTD\Software\uLTDTagConfigure\DecodedLogDlg.cpp(63) : error C2662: 'ATL::CStringT<basetype,stringtraits>::~CStringT' : cannot convert 'this' pointer from 'ATL::CStringT' to 'ATL::CStringT<basetype,stringtraits> &'
Reason: cannot convert from 'ATL::CStringT' to 'ATL::CStringT<basetype,stringtraits>'
Conversion requires a second user-defined-conversion operator or constructor
How can it be the same?
Mark
|
|
|
|
|
Jethro63 wrote: I cannot see how you can say that "CStringT IS CString".
the CString library is more complicated, but simply consider this :
#define CString CStringT
|
|
|
|
|
Jethro63 wrote:
Didn't work. Same error.
How are you calling the Find() method?
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|
|
I have just realized the problem and it is so stupid that I can hardly belive my eyes: The pointer to the NULL terminated string that I was passing as parameter 1 was NOT a pointer to an NULL terminated string. It was a pointer to an array of pointers to NULL terminated strings.
I will now go and look for another line of work.
Thanks for trying to help an idiot.
M.
|
|
|
|
|
i have to execute a executable file which is downloaded from a given URL but when use createprocess() method then it execute successfully at 2000 OS but it does't execute on XP OS
and now i am using shellexecute() method for executing this file but it executes successfully at both OS and now problem is that this correct way or not
and please tell me what is the difference between those functions.
Bankey Khandelwal
Software Engineer
|
|
|
|
|
i don't know much CreateProcess(), but of course you can use ShellExecute() !
i'd even say it's the easiest way to go to execute a file as if you were double clicking on it in the explorer...
show us both lines of code (with createprocess and shellexecute) to see what you were doing wrong...
|
|
|
|
|
Is there any way to record the sound which is going to PC Speaker.
For example, if we are connected to a machine using VNC or RemoteDesktop and want to check the sound is audiable in a remote machine. There is no way at all!!
So if we can record the voice which is to be played by a program, it will help debugging audio applications.....
Any suggestions????
Thanks
-- modified at 6:21 Wednesday 5th April, 2006
|
|
|
|
|
Maybe this[^] will help. Another method would be to visualy display the audio in the form of a graph.
|
|
|
|
|
Hi,
I am working on a web application in ASP.net & C# .For one of the utilities on my site, i need to use an available VC++ project.
This VC++ project produces an exe as its output.
I tried changing the output type of the VC++ project to .dll, but it doesn't help and after this, the project itself stops working.
Can someone please tell me as to how to use this VC++ project into my web application?
Thanks.
|
|
|
|
|
Perhaps your question would be better suited for this[^] forum.
As for using a VC++ project, what exactly are you trying to do?
|
|
|
|
|
My application consists of utilities like Ping and traceroute.
For the Traceroute utility, i have a VC++ application and need to incorporate it into my project.
Any ideas as to how to go about this problem?
I have posted it in the ASP.net category as u mentioned.
Thanks.
|
|
|
|
|
I suppose you would have to create a dll, and incorporate that into your ASP/.NET project. I have done similar things with VB dll's before now. But I know nothing about the .NET languages, you are in the wrong forum.
Maybe some of the other posters would be able to better help you.
|
|
|
|
|
hi
i want to know how to add software in list.i mean suppose i made the mp3
player. now i want to play a mp3 file. so i
right click on that it shows that lists of program which can run it what i should do
that my application also appear on that list.This things is concerned wiht the code or
the installation or what.
Tasleem Arif
|
|
|
|
|
To set 'Default Icons', 'Open with' etc.. You need to change/add registry settings. Usually you would do this only once when you install the app. Personally I use Inno Installer which is pretty easy to use, and configures the registry for you.
|
|
|
|
|
thanks for reply which rejistry key need to be changed or added and where to get the inno installer u mean google search.
Tasleem Arif
|
|
|
|
|
this is called registering...
there a plenty of articles, discussions over Codeproject about that subject...
|
|
|
|
|
|
Why re-invent the wheel? There is no need to start writing shell extensions for a simple task like this. The job can be achieved simply by writing 2-4 values into the registry.
|
|
|
|
|
Can anybody tell me how to send a FAX in landscape mode using the FaxSendDocument API.
aasstt
|
|
|
|
|
AFAIK it is not possible. The FaxSendDocument API uses the default print settings for the document type as setup in the registry. It starts the required program with a /pt command line option.
If you are trying to fax your own document from within your own program then take a look at the FaxStartPrintJob API. It supplies a fax device context that you can print to in any form you wish.
You may be right
I may be crazy
-- Billy Joel --
Within you lies the power for good - Use it!
|
|
|
|
|
Hello , this is Rakesh Here
I am getting one Runtime error when I try to split the main window. Following para describes the situation.
I am having two classes namely CTopSplitter and CNestedSplitter. Through the object of CTopSplitter class I am Splitting the main window into 1 row 2 columns. And then I am trying to Split the second part of the main window into 2 rows 2 columns. But while doing that I get one Runtime error which complains about creating same view again. Even though I am giving the diffrent values in the IdFromRowCol(), I am getting that error.
Please help me out. Should I override the CreateView() method ?
Regards
Rakesh
Rakesh
|
|
|
|
|
Based on the article "How to spawn console processes with redirected standard handles" found at http://support.microsoft.com/default.aspx?scid=kb;en-us;190351
I realize that in order to see whether the spawned process is terminated, the author use the returned code from WriteFile.
If the WriteFile fail to write at the redirected standard handles of another process and the error code is ERROR_NO_DATA, that's mean the pipe was closed through normal child process termination.
However, is there any way to check whether the pipe is still connected to an alived process, without explicitly WriteFile through that pipe.
i.e.
bool IsPipeStillConnectedToAliveProcess (HANDLE pipeHandle);
Thank you very much!
cheok
|
|
|
|