|
You must know that reply was of Mr Pallini.
|
|
|
|
|
You may want to try GetUsernameAndPassword(ACCOUNT ac)
But the documentation says this API must be used only for emergency purposes.
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
Rajesh R Subramanian wrote: But the documentation says this API must be used only for emergency purposes.
The subject contains two exclamation points. Does that qualify as an emergency?
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
My bad. I missed the double exclamation marks!
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
Why you want to try this program?
|
|
|
|
|
Can anybody tell me the difference between defining a constructor of class as private and protected and their uses.
|
|
|
|
|
The same difference there is between defining any class member private and protected .
See [^].
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
|
|
|
|
|
|
To complete what CPalllini said: if you have a private constructor, you won't be able to derive a class from this class (the child class cannot access the constructor of the base class, so you'll have a compilation error). In both case, only the class itself (or derivate) can create an instance. The only way to do this is through a static function (because to be able to call a non-static function, you already need to have an instance).
|
|
|
|
|
Adding to other replies, private, protected access specifier acts the same way as with other functions; with private the member is not accessible outside the class, you can make this property useful in many ways;
modified on Thursday, April 24, 2008 5:29 AM
|
|
|
|
|
You know that if you provide any constructor (even one which is not the default), then the default constructor which is implicitely added by your compiler will be ignored ?
Try your code and remove the default constructor. Try now to construct an object by using its default constructor. You'll see that you won't be able to compile because there's no default constructor for the class.
|
|
|
|
|
Yes, You are correct, I should have compiled to remember it.
|
|
|
|
|
Hi All !
How do I create a tooltip (using CToolTipCtrl) for a CStatic member in a dialog ? for a CButton class member it works just fine but for the CStatic class member I get no tooltip.
Thanks,
Amit
|
|
|
|
|
Does your static control have the SS_NOTIFY style?
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
|
Hamid Hi !
Thanks for the link - it helped,
However, when I try to create it dynamically (using Create function) I get an error...
Amit
|
|
|
|
|
|
How can i copy a string (LPSTR) to a wide string variable (LPWSTR).
When i am assigning directly (=) i am loosing some data.
Thank you.
Saadhinchaali
|
|
|
|
|
Saadhinchaali wrote: How can i copy a string (LPSTR) to a wide string variable (LPWSTR).
When i am assigning directly (=) i am loosing some data.
You sure about that? Such an attempt will cause a compiler error.
LPCSTR pChar = "LPCSTR";
LPCWSTR pWChar = L"LPCWSTR";
pWChar = pChar;
Even if that made sense, which it doesn't, it would only copy the pointers.
Don't tell me you cast the problem away!
Show us some code.
Steve
|
|
|
|
|
Stephen Hewitt wrote: LPCSTR pChar = "LPCSTR";
LPCWSTR pWChar = L"LPCWSTR";
pWChar = pChar; // error C2440: '=' : cannot convert from 'const char *' to 'const unsigned short *'
sorry. I casted the problem away
LPCWSTR pWChar = (LPWSTR) pChar
Saadhinchaali
|
|
|
|
|
Saadhinchaali wrote: sorry. I casted the problem away
Don't! The compiler issues an error for a reason! Calling a dog a cat doesn't make it one!
Steve
|
|
|
|
|
Actually the compiler is happy about it (I suspect it enjoys such mistakes...).
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
|
|
|
|
|
Stephen Hewitt wrote: Calling a dog a cat doesn't make it one!
Too funny!
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Saadhinchaali wrote: How can i copy a string (LPSTR) to a wide string variable (LPWSTR).
They are quite different beasts, do you need to convert.
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 suggest you try to understand the concepts that are behind by reading this series of articles[^]. At least, you will understand why you can't cast the pointers directly.
|
|
|
|