|
Call AfxEnableControlContainer() in InitInstance function of your ActiveX contol's application class
hope this will work .if yes then plz do inform me.
Muhammad Azam
muhammadazam_cis08@hotmail.com
|
|
|
|
|
Hi,
Thanks Muhammad.Some Times We Forget The Important Things.Once Again Thanks For Helping Me.
by
baijumax
|
|
|
|
|
Hi all,
I did some basics of C and C++ a few years ago at college and now i'm looking to leran C++ and MFC, any sites, books, tutorials etc that you would recommend.
Cheers
Kev
|
|
|
|
|
hi,
1) www.functionX.com
2) "http://pomelo.ivia.es/mecanizacion/www/vcpp/"
by
baijumax
|
|
|
|
|
Thanks, i'll look them up over the weekend
Kev
|
|
|
|
|
My suggestions are for VC++6, I don't know if that's what you will be using, but I have a few books and thses are my favorites
I am found Practical Visual C++ By Jon Bates & Tim Tompkins to very good starter / tutorial book & Programming Windows with MFC By Jeff Prosise is very good for MFC.
There are also lots & lots of great articles here on CP suitable for the beginner.
Happy Coding
Ali
|
|
|
|
|
I'm gonna be using VS2003, i already use it to write C# apps but i've been looking for work and people that are after C# skills also want people with MFC / C++ skills, so i think i need to broaden my knowledge a bit
Kev
|
|
|
|
|
Learning by doing...
Don't try it, just do it!
|
|
|
|
|
Hi All
does any one know what would be the best way to convert a CString containing only
characters to a numeric value.
for example
CString str = "AFG"
output to be say
int 653790;
and each time you convert the str, you get the same result
Thanks
Si
|
|
|
|
|
si_69 wrote:
CString str = "AFG"
output to be say
int 653790;
Do you want a hash value of the string, or simply want each character in the CString to be converted to its ASCII value?
* Artificial intelligence is no match for natural stupidity! *
|
|
|
|
|
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
|
|
|
|