if he only want to do set color he can do it by defining a simple brush at OnCtlColor function. Why should we take unwanted services for our application.
I think he want to set back color for his dialog. actually the CColorDialog is used fo rcolor choosing purpose naaa? I think we can use it services to get teh color selected. no need to derive a new class.
im not sure whether me and he is talking about same problem
"Don't Do Different things... Do Things Differently..."
I need to copy a string which may contain NULL characters in between. I may run a loop but I just wanted to know if there is any other way to do this. Normal function like strcpy and all will stop reading after it encounters a NULL since it assumes end of string when it reads NULL.
The strncpy function copies the initial count characters of strSource to strDest and returns strDest. If count is less than or equal to the length of strSource, a null character is not appended automatically to the copied string. If count is greater than the length of strSource, the destination string is padded with null characters up to length count.
Hi, may i please request you to just try this code and comment on why memcpy is failing? Is it the way it goes or am I wrong somewhere? Can you suggest some workaround? Thanks for your time.
Sure! Please look up memcpy in MSDN. There is a working demo there.
See you were saying that szSource contains NULL characters right? So strlen won't work because it will return when it finds the first null character. Same with printf and other functions. They all return when the first NULL character is found. So if your string is...