|
Rajkumar R wrote: personally i prefer reference in this situation.
void Foo(CString &str);
Actually the recommended way is to pass as a LPCTSTR and return as a CString, see here[^]
Peter
"Until the invention of the computer, the machine gun was the device that enabled humans to make the most mistakes in the smallest amount of time."
|
|
|
|
|
good link dude but when i just opened my eyes looks this,
"If a string is an input to a function, in most cases it is best to declare the string function parameter as LPCTSTR. Convert to a CString object as necessary within the function using constructors and assignment operators. If the string contents are to be changed by a function, declare the parameter as a nonconstant CString reference (CString&)."
that if u want to modify a CString, CString &.
LPCTSTR is for const readonly object. And i don't see it is the recommended way, it is one of the way.
when i want to pass the readonly object to a MFC C++ function, i prefer "const CString &" than LPCTSTR as it requires to call constructor and destructor additionally to get a CString Object and i try to avoid it.
offcource, if i want to pass to a C function, that is not aware of CString, then LPCTSTR or LPTSTR is the fit.
|
|
|
|
|
Yanshof wrote: CString sStr("SomeString")
Maybe it's the missing semicolon.
Yanshof wrote: Foo(void*(&sStr) ); //call the function
Or the missing parenthesis.
Other than that, your code works fine in VC6.
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Hi experts,
I have retrived all files and folders from RecycleBin. How can I make a path so that I can open handle for Recycle Bin files.
|
|
|
|
|
The recycle bin isn't a *real* folder, so therefore the "files" in it are not real - so no handle to read from them.
They're *deleted*...
That said, I'm sure there's some undelete shell method, but it may only put them back in their original location with original permissions. I'd suspect any other way would be a security hole. You put "sandras secrit diary" onto FAT32 memory stick, and be able to read all about her affair with Brad. And that would be BAD.
If you haven't already discovered it, the following article may be of some use to you.
http://www.codeproject.com/KB/shell/recyclebin.aspx[^]
That said, I haven't yet found an "undelete" interface with a quick google.
Have a look at:
http://answers.yahoo.com/question/index?qid=20070722094025AAk7DJ3[^]
It gives a load of information that could be handy for you.
Iain.
Iain Clarke appearing in spite of being begged not to by CPallini.
|
|
|
|
|
Hello All
I am developing Activex Application in which i want to use shockwave flash control.
I can use it in simple dialog based application.
i can successfuly display a dialog box in activex control, But when i add shockwave flash control to my dialogbox it is not displying even dialog and doesen't give any error
So is there anybody who can solve my problem?
Any help would be highly appriceated.
Thanks
Manish Patel.
B.E. - Information Technology.
|
|
|
|
|
These links may help you:
Tutorial at BytesCount[^]
Flash Gui[^]
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
Thanks for your reply.
As above article shows, i can also diplay swf in dialog based application
But the problem is with avtivex control.
I am giving my steps to add sockwave flash cntrol
1 -> i have created MFC ActiveX control application
2 -> Then i have added one dialog to it.
3 -> Added Class for that dialog
4 -> In OnCreate method of activex control i had make onject of the dialog class and call DoModel()
method of it.
5 -> When i run only this code it will display a Dialog box to me.
6 -> Now if i add shockwave flash object to this dialog box from tool box and run it, it will not
Diplaying dialog box to me. Right now i have not provided swf to shockwave flash control.
Now hope so You will understand my problem.
Is there any solution for me?
Thanks in advance
Manish Patel.
B.E. - Information Technology.
|
|
|
|
|
add AfxEnableControlContainer() to the constructor of your dialog
|
|
|
|
|
I would appreciate anyone help me out here.. I have 2 tools that are supposed to open a file called RSC0000.RSB, this file keeps all the text in a game for the client to use..
1 tool is outdated, the other one is designed for this version (Ressurection) and for some reason, it errors out when you set the password to RESSURECTION and try to open the RSB
If anyone can help me out, please, let me know
Shissar@gmail.com
http://www.mediafire.com/?11e2emujwnh[^]
There is the download link to the files & tools, please check it out, I'd appreciate any help fixing the tools.. they dont work...
|
|
|
|
|
What does it have to do with C++ ??
|
|
|
|
|
You're worried about C++. But I see this question has been cross-posted in Lounge, Soapbox, C# forum, etc.,
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
|
(1) enclose code snippets with <pre> tags.
(2) Do you think it is really useful to post such huge amount of code without mentioning the errors or problems you're facing?
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
|
|
|
|
|
You've changed your display name and you're asking the same question after about a month? Haven't you still solved this problem? Even after I gave you a working solution[^] in January. Oh man! I pity you.
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
Rajesh R Subramanian wrote: Oh man! I pity you.
And I pity his Employer.
Regards,
Vijay.
|
|
|
|
|
vijay7173 wrote: And I pity his Employer.
See point #4 here[^]
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
If it compiles OK, did you try the debugger?
Alcohol. The cause of, and the solution to, all of life's problems - Homer Simpson
|
|
|
|
|
yes ..i am checked ...but its not generate the serial no in file ..wat i can do
Thanks!
Nisha.S
...."LIFE IS BEAUTIFUL"....
|
|
|
|
|
why u deleted the message, who cares to read so long a code segment / message,
i suggest u to specify exactly the problem and if requires suspected code snippet.
Is this the way, u make ur life beautiful. (Signature)
|
|
|
|
|
No, he'll post such messages repeatedly, won't understand a thing that he's been told and make our lives miserable.
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
dear all
tried my best effort to find solution already, anyone can list what i can check step by step for this issue? thanks a lot.
LINK : fatal error LNK1104: cannot open file "vic32sS.lib"
Li Zhiyuan
|
|
|
|
|
may the path is not set, set the path to the library,
vsproperty->linker->Additional library directory.
|
|
|
|
|
li zhiyuan wrote: ...anyone can list what i can check step by step for this issue?
See here.
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
I am displaying image using gdi+ using DrawImage() method . but I cannot set the opacity of the drawn image,
like AlphaBlend() method of the win32 api.
Trioum
|
|
|
|