|
Nirav Doshi wrote:
Do you want a hash value of the string, or simply want each character in the CString to be converted to its ASCII value?
yeah i would need for each character in the CString to be converted to its ASCII values
thanks
|
|
|
|
|
A simple function would do for that!
CString GetASCIICodedString(CString& srcString)
{
CString srcResult, srcBuffer;
for(int nIndex = 0; nIndex < srcString.GetLength(); nIndex++)
{
srcBuffer.Empty();
srcBuffer.Format("%d", srcString.GetAt(nIndex));
srcResult += srcBuffer;
}
return srcResult;
}
This should work... I've not compiled it, just some rough code, so please test it properly.
* Artificial intelligence is no match for natural stupidity! *
|
|
|
|
|
Is possible, please let me know if this helped, or if it gave you any further problems!
* Artificial intelligence is no match for natural stupidity! *
|
|
|
|
|
srcBuffer.Empty(); seems extraneous.
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
Did you try atoi or _atoi64 ?
MS
|
|
|
|
|
Manfred Staiger wrote:
Did you try atoi or _atoi64 ?
yes, both return 0
i have lots of character ID's such as 'AB', 'POL', 'AA' etc
i need to convert them to unique values
|
|
|
|
|
What about converting each character of the string to it's ASCII code (__toascii) assemble the results to a number ? I hope you understand what I mean, my english is not the best.
MS
|
|
|
|
|
Hi All,
I've a simple question. Is the color table for DIB images are same for all images. I mean for 16-colors (or 256-colors), the RGB values in each index is same for different images of 16-colors (or 256-colors)?
Thanks in advance
|
|
|
|
|
hey guys does any one here knows hoe to make RAM drive Programmatically ???not by wizard
thx alot for you time
|
|
|
|
|
download the microsoft source codes for a ramdisk driver and change it the way you want to.
Don't try it, just do it!
|
|
|
|
|
I have an application that is executing another and after that is closing itself. How can i detect in the second (child) application that the first (parent) is closed.
|
|
|
|
|
I don't understand. You've said the parent closes after the child closes, which means the parent is always running as far as the child is concerned.
Neville Franks, Author of ED for Windows www.getsoft.com and coming soon: Surfulater www.surfulater.com
|
|
|
|
|
No, after the child is executed and start running the parent is closed. But the child must to know when exactly the parent is closed. This is need because i must to change the .exe file. So i thought that i can try to open the .exe file and if this fails it is still running. But this is very unsecure. So i want either to check if the parent process is running or check somehow is the parent's hInstance valid.
|
|
|
|
|
If the child program knew the handle of the parent program, it could call GetModuleFileName() . If it knew the process identifier, it could call OpenProcess() .
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
I can think of several ways. One way would be to use a named Mutex in the child which the parent can signal when it closes. Another would be to use a Memory Mapped File that the parent could write something to when it closed. There may also be someway for the child to find out or be passed the process handle for its parent and it could check on that.
Neville Franks, Author of ED for Windows www.getsoft.com and coming soon: Surfulater www.surfulater.com
|
|
|
|
|
Parent can create mutex and acquire it.
Child can open mutex and wait for mutex abandonment (WAIT_ABANDONED) and know that parent is gone.
A mutex will be released with WAIT_ABANDONED if the process owning it is terminated or exits.
|
|
|
|
|
hi all,
I want to change the System Date & time using C++.If any ome know that please help me...
thanks...
|
|
|
|
|
|
hi
Many thanks...I search it .But coundn't find that.
thanks...
|
|
|
|
|
I actually wanted to an application just like narrator for vision impairment computer users.
For this I need to get the text of windows items, when we move mouse over to any button, menu items etc.
I'll then put that text to "text ti voice engine" to convert that text into voice.
For this how can I get access to the item text whether it is a tooltip text or windows text.
Thnx for replying
|
|
|
|
|
I want to merge cell of the word by VC and my codes as follow:
for(int i=3,j=0;j<hostcount;++j,++i)
{
c1.releasedispatch();
="" c2.releasedispatch();
="" c1="pTable-">Cell(i,1);
c2=pTable->Cell(i+DayCount,1);
c1.Merge(c2);
}
the first time this section codes work well, but the second time bug happened.
and if I merge the first row in the seconde time and don't merge the first column it works well too.and continuiously merge the first column buf happned too,why?
|
|
|
|
|
Hello Friends,
I am using splitter window and One of the Splitter window is derived from CTreeView. In this CTreeView I need to display the components like my computer, C:,D: etc.,(nothing but Browse for the file);
Please help regarding it.
Thanking you,
Regards
Neelesh K J Jain.
|
|
|
|
|
|
My Question is How to display the left side of the Explorer Window i.e., The Folders part in the Splitter window? The splitter window is being derived from CTreeView.
|
|
|
|
|
OK, in other words, you want to know how to populate the TreeControl in your TreeView derived splitter. Thats not easy to describe in one sentence. I don't know about your skills in VC, but this example from P.J. Naughter is should be easily adaptable for your needs:
http://www.codeproject.com/treectrl/filetree.asp
MS
|
|
|
|