|
Related topic! Ofcourse another "root"
James, Imagine I'm initializing a char-string array statically like :
char chArray[MAX_LEN][MAX_LEN]={"ONE","TWO","THREE".....};
This being declared/defined globally makes no issues. Now I want this be wrapped up inside a class. and still wanting to do it in a single line. like the above. You cannot certainly init it inside a class' declaration.
and if you take this to the constructor, you would lose the declaration(data memeber!) inside the class. so how to go? Should I use refs inside the constructor?
|
|
|
|
|
VuNic wrote: char chArray[MAX_LEN][MAX_LEN]={"ONE","TWO","THREE".....};
That still creates a single linear block of memory, and the indexes are just calculations to index into it. So you can still allocate all of it in one shot (size == MAX_LEN * MAX_LEN), and still use multiple bracket operators to get specific memory locations and initialize those locations. You could (theoritically) initialize all of those locations them on a single line, although not a single statement.
But then again I might not be understanding your question correctly...
If you need to "hide" access to chArray , you can place it into a namespace and then have the class manipulate it in that namespace...
Peace!
-=- James Please rate this message - let me know if I helped or not!<HR> If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! See DeleteFXPFiles
|
|
|
|
|
I want to know, after registration of COM server object to windows and if i want to ship that object to other machine, whether that object will carry registration information(e.g. CLSID registered with that object) or not?
If it is not carring this information then is another CLSID generated after i installs that object to other machine than the CLSID that of previous machine?
If it is true then how windows maintains GLOBAL UNIQUE IDENTIFIER for that COM object.
|
|
|
|
|
sachinjegaonkar wrote: GLOBAL UNIQUE IDENTIFIER
Here[^] is some information on this topic.
|
|
|
|
|
A GUID comprises of information taken from the resources on your machine, however the algorithm for creating GUID's is criticized worldwide for the way it is implemented. Every machine has a network card MAC address. This network cards MAC address provides the basis of creation of GUID. Then the algorithm uses some other details to create a unique ID. The ID is itself not guaranteed to be unique but the probability of two ID's to be same is very low.
The CLSID does not change for a object from machine to machine. It remains the same.
I hope this helps you.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
Hi
COM server's CLSIDs are inside them.
these CLSIDs are set with the COM server when it is developed.
So it is developers work, When any body installs a COM server
that CLSID which is embed inside the COM server is written in the
registry of the computer where that server is being installed.
|
|
|
|
|
Hello all i have made a sdi application having view derived from CFormView Class. In that class i have made a list control. I have also made ui thread which performs certain task and then has to return some CString and int values using which we fill our list control. now i want to know how do i pass these values to my list control class.
Can anybody please tell me the way with the code
thanks in advance...
|
|
|
|
|
neha.agarwal27 wrote: now i want to know how do i pass these values to my list control class.
Allocate them on the heap in the view class. Pass that address to the thread.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
can you please tell me how to code for them...
|
|
|
|
|
See this article, about 1/4 way down.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
As David said:
Create your variables on the heap, using the new operator.
MyClass *a = new(MyClass);
Then, when you create your thread, pass the pointer (in this case *a ) to the thread as an argument. After processing data in the thread, you can assign them to *a , and then close the thread.
|
|
|
|
|
Hello,
I have a list box using CListBox class in which I want to select multiple choices in the list box. But how do I get all the strings selected in an array.
The documentation of CListBox tehre is no function to get multiple strings.
The GetSelItems() function gives multiple ints then What should I do.
Thanks
Prithaa
|
|
|
|
|
prithaa wrote: The GetSelItems() function gives multiple ints then What should I do.
Those are the indexes of the selected items.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Hello,
Thanks,I overlooked the docs.
Prithaa
|
|
|
|
|
prithaa wrote: Thanks,I overlooked the docs.
Now THAT is something that is just begging to be in a signature...!
Peace!
-=- James Please rate this message - let me know if I helped or not!<HR> If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! See DeleteFXPFiles
|
|
|
|
|
Mornin' James
Mark Salsbery
Microsoft MVP - Visual C++
"Thanks,I overlooked the docs."
|
|
|
|
|
|
You just stole a document from James! Naa too bad.
|
|
|
|
|
I haven't heard from his attorneys yet
Mark Salsbery
Microsoft MVP - Visual C++
"Thanks,I overlooked the docs."
|
|
|
|
|
Didn't you just hear from me?
|
|
|
|
|
Fixed.
Mark Salsbery
Microsoft MVP - Visual C++
"You just stole a document from James!"
|
|
|
|
|
Even funnier!
Peace!
-=- James Please rate this message - let me know if I helped or not!<HR> If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! See DeleteFXPFiles
|
|
|
|
|
Hey what are you looking at? I just tricked him with my doc. He's just taken his hands up from your doc! Just grab it back James, fast fast.
btw, Marc is this we call a "sig-Virus",that gets itself attached to the sigs automatically?.
(Very funny indeed!)
|
|
|
|
|
Hi
you youselve have to do it in a for loop
GetSelItems()
GetText()
|
|
|
|
|
Hi all,
currently i'm developing an application with system tray icon support. now i want to display the balloon tool tips on it when some an event occurs.
and i did the application in VC++.Net 2005, it work perfectly. but i want to do in vc++6.0.
the VC++6.0 version is not supporting the latest version of shellapi.h and its related files.
can any one help me to solve this.
Thanks in advace.
Gopinath
"If you can't see the bright side of life, polish the dull side"
|
|
|
|