|
Do this way,
Suppose strKey contains the registry value it read.
int nTemp = atoi (strKey.operator LPCSTR ());
This will surely work.
Come online at:-
jubinc@skype
|
|
|
|
|
Do this way,
Suppose strKey contains the registry value it read and it is a CString object.
int nTemp = atoi (strKey.operator LPCSTR ());
This will surely work.
Come online at:-
jubinc@skype
|
|
|
|
|
Thank you.. i will try this out and let tou know
Harsha
|
|
|
|
|
Never call an operator this way, this is just uggly. You can simply do that:
int nTemp = atoi((LPCSTR)strKey);
But I don't think it will work because if the cast was possible it would have been implicitely done already and you wouldn't have an error.
|
|
|
|
|
i wonder why you needed atol here. If using MC++ , then you can use Convert::ToInt32 function for this purpose, instead of mix of all these things.
System::String* valueNames[] = keySoftware->GetValueNames();
for( int i = 0; i < valueNames->Length; i++)
{
int nValue = Convert::ToInt32(valueNames[i]);
...
}
And use <pre> tags while posting code.
|
|
|
|
|
Hi
All
I want to change dialogBox size and controls positions on DialogBox at run time in VC++ 6.0,so any body have code of this, then plz forward me.
Thanks in Advance
Atool
|
|
|
|
|
use MoveWindow() API.
nave
|
|
|
|
|
|
I guess you can use Marcs' nice EasySize[^] class.
cheers,
mykel
OMM: "Let us be thankful we have commerce. Buy more. Buy more now. Buy. And be happy."
|
|
|
|
|
M. Atul wrote:
Hi
All
I want to change dialogBox size and controls positions on DialogBox at run time in VC++ 6.0,so any body have code of this, then plz forward me.
movewindow and setwindowpos!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and you
|
|
|
|
|
is there getcount method in CObArray class?
Arise Awake Stop Not Till ur Goal is Reached.
|
|
|
|
|
Yes.
INT_PTR GetCount( ) const;
Returns the number of array elements.
|
|
|
|
|
but when i decalred as objarray.GetCount() it caused error ."error C2039: 'GetCount' : is not a member of 'CObArray'" why this occurs
Arise Awake Stop Not Till ur Goal is Reached.
|
|
|
|
|
deeps_cute wrote: is there getcount method in CObArray class?
Why do you ask such question in forums. The answer to these questions are readily available in MSDN along with aditional information and better options if any.
A simple look up of class members of CObArray would have fetched the answer for you.
|
|
|
|
|
People are getting lazy ?
|
|
|
|
|
Cedric Moonen wrote: People are getting lazy ?
Laziness can be understood but this I can't. It's so simple but yet...
Even better the name of the function is GetCount . It can't be any simpler than this.
|
|
|
|
|
see i am not lazy. i got the error as getcount is not the member of cobjarray. also in afxcoll.h i cant see such event thats why i asked. can you say why this error occurs
Arise Awake Stop Not Till ur Goal is Reached.
|
|
|
|
|
deeps_cute wrote: i got the error as getcount is not the member of cobjarray
That's why I said read the docs. The method is GetSize.
|
|
|
|
|
|
MaHeSG wrote: Both GetSize() and GetCount() can be used.
Another option.
|
|
|
|
|
Cedric Moonen wrote: People are getting lazy ?
god save me!!!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and you
|
|
|
|
|
Hi
The SendMessage function is used to send a message directly to a window procedure.
Does this means that for messages received by SendMessage, the message loop( GetMessage & DispatchMessage) is not needed to process the message and call the windowproc.
What happens internally on SendMessage?
Welcome all suggestions
Thanks
Anil
|
|
|
|
|
anilFirst wrote: to send a message directly to a window procedure.
no. It will go through the message loop. Why dont you try it for your self?
nave
|
|
|
|
|
Naveen R wrote: no. It will go through the message loop.
No, it wont. Thats why its SendMesssage.
As opposed to PostMessage , which are posted to message loop.
|
|
|
|
|
ok ok..
So it directly call the window proc?
nave
|
|
|
|