|
monsieur_jj wrote: ii = strlen(buff);
I guess in your project, UNICODE is defined and strlen() is not unicode compatible. Since your string is TCHAR array, you should use _tcslen() .
monsieur_jj wrote: Now I am wondering why this compiles fine with the project i copied this snippet from.
In that project UNICODE might not be defined.
Regards,
Jijo.
_____________________________________________________
http://weseetips.com[ ^] Visual C++ tips and tricks. Updated daily.
|
|
|
|
|
You have to use the unicode routine instead: _tcslen. I suggest this excelent article[^] if you want to understand things properly. It is a must read for each C++ developper.
|
|
|
|
|
How is it that you knew TCHAR required _T() and _tcscat() , but still tried to use strlen() ?
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
For this, I had to click on the link "Good Question" !!! lol
|
|
|
|
|
I have a ListCtrl to display thumbnail image list, I want to change color of the border of selected item in this ListCtrl but I don't (with SetOutlineColor). Please help me
|
|
|
|
|
Did you try with NM_CUSTOMDRAW?
|
|
|
|
|
Hi all,
If the .chm file is open and appilaction is terminated than the .chm is not close.
Please anyone can tell me how can i close the .chm file when application is terminated.
Thanks in advance.
IN A DAY, WHEN YOU DON'T COME ACROSS ANY PROBLEMS - YOU CAN BE SURE THAT YOU ARE TRAVELLING IN A WRONG PATH
|
|
|
|
|
Use the HtmlHelp function instead of ShellExecute, it takes care of that.
Really, I just checked in one of my apps that uses HtmlHelp function, and the help does in fact close when the app is terminated. I assume that you're using the code I posted?
There is sufficient light for those who desire to see, and there is sufficient darkness for those of a contrary disposition.
Blaise Pascal
|
|
|
|
|
Thanks.
IN A DAY, WHEN YOU DON'T COME ACROSS ANY PROBLEMS - YOU CAN BE SURE THAT YOU ARE TRAVELLING IN A WRONG PATH
|
|
|
|
|
No problem.
There is sufficient light for those who desire to see, and there is sufficient darkness for those of a contrary disposition.
Blaise Pascal
|
|
|
|
|
Hello friends,
How can the program findout which OS is installed?
I want to get the name of the OS which runs in current PC.
Any API or sample code would be appreciated.
Thanks in Advance.
ritz1234
|
|
|
|
|
|
Try GetVersionEx .
Regards,
Paresh.
|
|
|
|
|
|
I am passing a structure as a parameter to a Thread, but with in the structure I should send a couple members as refrences. but I want to inilise it lager on bufore the thread function.
typedef struct THREADSTRUCT_SCOPE
{
// constructor.
THREADSTRUCT_SCOPE( const Scope* ptr )
: _this( ptr )
{}
Class A &a; //want to pass it as reference, Inilize it before entering Thread
Class B &b; // - do -
const Scope *_this;
}THREADSTRUCT_SCOPE;
|
|
|
|
|
SORRY... I am just going toooo narrow , I used a pointer
|
|
|
|
|
Iam running NTService Using MFC ...In taskmanager its showing 2 exe files.. MFC exe running in username process and NTService exe in System account...but i need both sre running in one mode...How to solve this problem...
|
|
|
|
|
|
tns_ranjith wrote: ...but i need both sre running in one mode...How to solve this problem...
Read here.
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
Hi,
I am writing a dialog application. In that i have a bitmap button.
I need to disable that button depending on some conditions.
Say my button variable is m_btnVerfiy i am using m_btnVerify.EnableWindow(false) to disable the button. But this code is not working. Please help me.
|
|
|
|
|
try this:
GetDlgItem(IDC_BUTTON)->EnableWindow(FALSE)
龍
|
|
|
|
|
No, this is also not working.
|
|
|
|
|
IF YOU WANT,YOU CAN GIVE ME YOUR CODE!
龍
|
|
|
|
|
Can you post the relevant code?
There is sufficient light for those who desire to see, and there is sufficient darkness for those of a contrary disposition.
Blaise Pascal
|
|
|
|
|
Its a Bitmap Button and i feel it is not getting the proper handle to execute any further operations kindly send the code
|
|
|
|