|
CString has a LPCTSTR cast operator, which means you can safely do
LPCTSTR lpStr = (LPCTSTR)oMyCStringObj;
|
|
|
|
|
mimimimilaw wrote: It doesn't work...
How can FilePath change to LPCTSTR ??
What is the type of objEWFFile ??
Knock out 't' from can't,
You can if you think you can
|
|
|
|
|
|
Are you sure the // FilePath = c:/temp/1234.jpg path is correct?
check it and try following for opening file.
objEWFFile.Open((LPCTSTR)FilePath.GetBuffer(0), CFile::modeCreate | CFile::modeWrite, NULL);<br />
FilePath.ReleaseBuffer();
Knock out 't' from can't,
You can if you think you can
|
|
|
|
|
can you explain for me whats wrong in this code
<br />
CString FilePath;<br />
CString writeFilePath;<br />
writeFilePath=_T("e:\\");<br />
CString DMID;<br />
DMID=_T("123");<br />
CString test;<br />
test=_T("jpg");<br />
CFile objEWFFile;<br />
FilePath = writeFilePath+ DMID + _T(".") + test;<br />
objEWFFile.Open(FilePath, CFile::modeCreate | CFile::modeWrite, NULL);<br />
whitesky
|
|
|
|
|
here i have a problem to access the portnumbers of different applications running in my project
#sankar#
|
|
|
|
|
|
Hi,
Iam writing a ComPort related program. Iam setting the state of the com port using SetCommState(). Iam considering stop bits also. When I use 1 or 2 stop bits , SetCommState is working fine. But when I use 1.5 (ONE5STOPBITS), SetCommState() is not working, i.e its returning 0.
Why is it not working?What changes should I make?
Thank you.
Ayesha
|
|
|
|
|
Hi All,
Once I have seen a plugin in codeproject which helps visual studio 6 to load MSDN on "F1" button press. I just forgot its name. Could you help me to find it out?
SaRath.
"Do Next Thing..."
Understanding State Pattern in C++
|
|
|
|
|
hi,
can anbody tell me which header file i include in C++ when i work on BREW application.I develop Brew set-up and make helloworld project and under that project name i want to build C++ code.I write the code but the error will come and tell me Fatal error with header file.i include "iostream" file but it doesn't work.so which i include in header file.please help me out for that.
Thanks...
Nitin Dalal
nitin
|
|
|
|
|
hi all,
how to restrict the alphabets and numbers in edit box
i cant use the PreTranslateMessage since i need to enable a listbox when i press the key .it will block it .how can it be done .can it be done by subclassing
need help
"Men never do evil so completely and cheerfully as when they do it from religious conviction"
-Pascal
|
|
|
|
|
|
chethu665 wrote: how to restrict the alphabets and numbers in edit box
i cant use the PreTranslateMessage since i need to enable a listbox when i press the key .it will block it .how can it be done .can it be done by subclassing
Check EN_CHANGE and EN_UPDATE Notification messages
Knock out 't' from can't,
You can if you think you can
|
|
|
|
|
|
Derive it from (subclass)CMyEdit and override the WM_CHAR.
Regards,
FarPointer
Blog:http://farpointer.blogspot.com/
|
|
|
|
|
CString type = "abcdefghijklmnopqrstuvwxyz";
I only need "defg" in this CString...
How Can I copy it into another CString??
|
|
|
|
|
mimimimilaw wrote: I only need "defg" in this CString...
How Can I copy it into another CString??
Use Find and Mid methods of the CString
Knock out 't' from can't,
You can if you think you can
|
|
|
|
|
THX
|
|
|
|
|
CString ::Right(), CString::Left() may help
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
See here like this
<br />
CString type;<br />
CString str2;<br />
type= "abcdefghijklmnopqrstuvwxyz";<br />
<br />
str2=type.Mid(type.Find(_T("defg"),0),4);<br />
MessageBox(str2);<br />
<br />
whitesky
|
|
|
|
|
Here you are finding for defg and then copying it .
if you know that defg is present then why to copy it .
wont this do:-
CString type(_T("defg"));<br />
CString str2 (_T("abcdefghijklmnopqrstuvwxyz"));<br />
int iFind = str2.Find (type);<br />
if (iFind !=-1)<br />
MessageBox(type);
Regards,
FarPointer
Blog:http://farpointer.blogspot.com/
|
|
|
|
|
it was one help for how to use (only)
whitesky
|
|
|
|
|
Hi,
My boss has told me to develop a program which will connect to client's website. On the site there are links to excel, mdb databases, few images.
So program should be make the task automated. It will take the link of the web page, visit the all links available in there and download to a particular folder. When it finishes, it should flash a message that download complete.
Is there any such program exists on CP? Can someone tell me few guidelines .
Thanks
row
|
|
|
|
|
ROWALI wrote: visit the all links available in there and download to a particular folder. When it finishes, it should flash a message that download complete.
See the URLDownloadToFile(...) API
Knock out 't' from can't,
You can if you think you can
|
|
|
|
|
See:
CInternetSession, HINTERNET ,InternetReadFile, InternetOpenUrl
Cheers
"Peace of mind through Technology"
|
|
|
|