|
Thanks Jijo,
As the dialogs are not in series & can call previous dialog also. So I call messages SHOW_NEXT_DIALOG with the child dialog # to be shown & it works perfectly. I figured out to work as expected.
Thanks jijo for the efforts.
Jijo, I can't add an int, float to CString. Like I want to add up "Name " + int + float in a CString. How do I achieve it. I tried many ways, but gives error or warnings only. Help me if you can.
Thanks
Terry
|
|
|
|
|
Trupti Mehta wrote:
Jijo, I can't add an int, float to CString. Like I want to add up "Name " + int + float in a CString. How do I achieve it. I tried many ways, but gives error or warnings only. Help me if you can.
CString csMessage;
int nInteger = 10;
float fFloat = 20.0f;
csMessage.Format( _T("%s %d %f"),
_T("Name :"),
nInteger,
fFloat );
Hope the code snippet explains everything you asked.
Regards,
Jijo.
_____________________________________________________
http://weseetips.com[ ^] Visual C++ tips and tricks. Updated daily.
|
|
|
|
|
How to convert GUID string of
{ 04C99667-DFF4-489F-92C5-5EFE5D18DDD5 }
to
{ 0x00,0x7B,0x00,0x30,0x00,0x34,0x00,0x39,0x00,0x39,........}.
Please help me.
Reagards
Shiva
|
|
|
|
|
[UuidFromString^] may be useful, if you know what this ID stands for you can use CLSIDFromString IIDFromString API.
modified on Monday, June 2, 2008 9:29 AM
|
|
|
|
|
Hello All,
Is there any diff between these 2 ON_MESSAGE & ON_THREAD_MESSAGE.
Both does the same thing & both works for my thread appln.
can any 1 plz tell me the diff of 2 & when 2 use them ??
Thanks in Advance
Vivek
|
|
|
|
|
ON_MESSAGE: Message in one thread, sended with PostMessage
ON_THREAD_MESSAGE: Message in different threads, sended with PostThreadMessage
Read the fine MSDN about it.
Greetings from Germany
|
|
|
|
|
MSDN says
ON_THREAD_MESSAGE must be used instead of ON_MESSAGE when you have a CWinThread clas
Is this the only 1 difference
|
|
|
|
|
Am I missing something here? OK - I can derive a class and write my own method spending a minute of my time, but what annoys me is - am I not supposed to use a CStringArray if I will require to execute a find operation on it? Is there a valid reason for this class not supporting a find method, or is it just ridiculous?
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
An argument for not including such Find function is that there are different methods for finding a match. For instance as CString::Compare and CString::CompareNoCase.
I'm not so sure but an array isnt suitable for a lot of findings. If you search a lot you should use an other data type with Hashes, so the members are pre-sorted.
Greetings from Germany
|
|
|
|
|
KarstenK wrote: An argument for not including such Find function is that there are different methods for finding a match. For instance as CString::Compare and CString::CompareNoCase.
Nope, I'm talking about a simple search, the same exact thing, what CString is providing me. If I buy the case sensitivity argument, why not give me an overload?!
KarstenK wrote: I'm not so sure but an array isnt suitable for a lot of findings.
OK - that's the only valid reason I could also think of. I was just wondering if someone else will come up with a different opinion or provide me another reason.
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
In case of array , only association is index and element. What purpose should Find operation serve, if provided one ? It should only return it's index. And how that index will be usefull, given that you already have string at that index ? This may be the reason, that it is not logical to provide such function.
Or, you are talking about some more functionality from find operation ? Because, as already mentioned, for string specific find there are already such functions available.
|
|
|
|
|
No, I did not get that first paragraph. When I look at this class as a container, I will expect it to provide me a find function (I pass a string to it, and then it comes back to me to tell that the string is found at location N). It should take less than one minute to derive a class and implement this find method, but I was just wondering why would it not be given to me. This makes the class look like an unfinished container. Can you please explain me the first paragraph? I simply didn't get it. May be I need a whack on my head and a cup of coffee.
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
Let me explain.
Functions would be provided,only when it is needed,
e.g CMap::Lookup gives you fast access to element.
In this case, suppose, there is function long CStringArray::Find(CString strToFind) , returning index of element in array. But, question is, why and how often that index will be needed ?
And you answer, that it will be useful for faster access ,etc. Then there are other datastructure, which are more efficient doing this.
The reason could be, just keep this class simple, not adding overhead to it.
|
|
|
|
|
OK - you mean to say that if I do a lot of searches, then an indexed container would be an ideal candidate. That's the same exact thing I thought. But nevertheless, it was shocking to me that MS hasn't provided a find on CStringArray.
Thanks for the reply man, I appreciate it.
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
INT, INT32, LONG and LONG32 all are 32-bit signed integer.
Then what is the main difference among them?
Also I have saw other many similar data types (e.g LONGLONG, LONG64.
What is the need of this difference?
Any one please describe about it.
Regards
Maxim
|
|
|
|
|
This would be compiler and platform dependent.
Regards,
Sandip.
|
|
|
|
|
I dont think so. All are used in VC++ on same compiler(VS 2005) and same platform(Windows).
Please describe the difference.
By the way, Thanks for your effort.
|
|
|
|
|
see int and long both will be 4 bytes each on windows(VC++). but still they are kept as is may be for backward compatibility.
If you really want the difference try to find sizes for these data types on all the windows versions for above then you will get an idea.
Regards,
Sandip.
|
|
|
|
|
Please tell me about all not only two. Also, I want to know about INT, INT32, LONG, LONG32 not int and long. If you can, please compare atleast these four data types.
Regards,
Maxim.
|
|
|
|
|
Have you problems with documentation?
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
|
|
|
|
|
No, not at all. But I am little bit confused.
I am just curious to know the difference among them on same windows version with same compiler.
I am talking about their uses and importance also need. I have used all in my program and not found any difference. That is why I am asking here.
Because you all are experienced and experts.
Please guide me.
Sorry, If i am wrong or rude anywhere.
Regards,
Maxim.
|
|
|
|
|
Sir, Can I know the reason of down voted?
Is my way of asking question is not right?
I am new here in this forum. I was just trying to explain me before all of you...
Thanks.
Maxim.
|
|
|
|
|
I can only guess (since I didn't down vote you): possibly your post appeared a bit rude.
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
|
|
|
|
|
i am trying to tell you only one thing is today there might not be any difference but still these will be kept as is for compatibility.
Tomo with vista and 64bit machines coming in , int , long, int64 all might have 64 bit values but still they will be maintained different for compatibility.
Regards,
Sandip.
modified on Monday, June 2, 2008 8:03 AM
|
|
|
|
|
SandipG wrote: Tomo with vista and 64bit machines coming in , int int32 int64 all might have 64 bit
if int32 have 64 bit then it is meaningless.
|
|
|
|