|
My god!
It is very good and very easy!
And it's also very regretful for me to say that and not to read MSDN carefullly after you gave me the tip.
Thank you very much!
LeonOrient
|
|
|
|
|
A frequent conversion?
not for me... it's rare that I want to convert a string into a hex string of individual bytes. If I was writing hex dump programs, it might be.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br />
Peter Weyzen<br />
Staff Engineer<br />
Santa Cruz Networks
|
|
|
|
|
I should use "not very easy" to replace "difficult".
Sure, it is a good way to solve the problem.
In addition, maybe we will program simply to find the endptr's value, do you think so? ( I am not good at using the function yet, maybe i am wrong again.)
Could you give us an example, please?
LeonOrient
|
|
|
|
|
Just use NULL for endptr
-Dominik
_outp(0x64, 0xAD);
and
__asm mov al, 0xAD __asm out 0x64, al
do the same... but what do they do??
|
|
|
|
|
;PProblem: Convert CStrring to int. etc
We can use the function: atoi,atof,atol etc
LeonOrient
|
|
|
|
|
As far as I know atoi, atof and atol cannot read Hex strings
-Dominik
_outp(0x64, 0xAD);
and
__asm mov al, 0xAD __asm out 0x64, al
do the same... but what do they do??
|
|
|
|
|
int n;
sscanf((const char*)(yourString),"%x",&n);
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
This is a good thought!
All is right!!
3Ks!
LeonOrient
|
|
|
|
|
I want to know if you could create a real life world inside C++? Because I have had a really crazy idea.. now I know it may seem really stupid but think about the possiblities if you could do it. That is why I am trying to find some people to help me in the creation of a world that you would be able to enter through VR. Yes, if you are asking it is sort of like the matrix. However, you will be able to access it through a VR helmet or something of that nature however, that is beside the point. Firstly, I just want to know if it is possible. So please help me.
"Life is a game that can't be won..."
|
|
|
|
|
What have you been smoking and where can I get some?
|
|
|
|
|
|
Theoretically possible, practically not (or do you have a 1000000-PetaHz processor and 10000000 PetaBytes RAM)?
-Dominik
_outp(0x64, 0xAD);
and
__asm mov al, 0xAD __asm out 0x64, al
do the same... but what do they do??
|
|
|
|
|
a. "Real life" is always (*always*) != "Simulations of RL" and will *always* be no matter how 'sophisticated' they are made.
b. Computers can only (*only*) handle simulations and that's always TRUE to all time.
Therefore what you are asking is impossible.
Regards,
Michael Mogensen, mm it-consult dk.
|
|
|
|
|
What makes you so sure that we aren't living in the matrix?
_outp(0x64, 0xAD);
and
__asm mov al, 0xAD __asm out 0x64, al
do the same... but what do they do??
|
|
|
|
|
I suggest that VRML might be a start. You can write your worlds as text files, which gets processed by a VRML engine to create the world that could be viewed through a VR helmet or just on screen.
Elaborate and interactive worlds can be created without using any C++ programming. Scripts can also be run enabling the author to create movement of objects within the world independant of the viewer.
I would suggest doing a search for some VRML worlds on the internet.
In programming terms, the ParallelGraphics VRML Cortona engine has some neat COM interfaces which allows the inclusion of 3D worlds in your own programs and 3d interaction ( see www.parallegraphics.com)
Processing speed is a real problem though. The more real the simulation, the bigger the volume of data to process which takes longer and longer to update. Currently, PCs do not have enough grunt to produce a real real world. To produce realistic animated faces etc as well all the usual viewer parallelaxes etc will kill most PCs for a long time in the future (but I would like to be wrong).
Using VRML, you can only produce simple dynamic and interactive worlds. Most authors use it model sophisticated shapes rather than whole worlds. If you want something more complicated, I guess that you would have to resort to using the imagination, as we currently do.
MA
|
|
|
|
|
Thank you very much for your help. I understand that most pc's today are just to slow to handle such a request I just wondered if it were possible to do such a thing.. at this point in time... Till then...
"Life is a game that can't be won..."
|
|
|
|
|
You may be better off looking a the game Wolfenstein 3D. This type of approach, where you preconstruct the images at startup may be a better starting point and more practical, given today's processing speeds. I think that if you could pull it off, it would be COOL.
|
|
|
|
|
Hi all,
I'm trying to make the child window (in C123 class) pop-up with focus on a Edit text box (m_CName).
Then I write :
//in parent class function
//CString m_SName;
//CEdit m_CName;
C123 abc;
abc.m_SName = "john";
abc.m_CName.SetFocus();
abc.DoModal();
//RESULT
only display the name "john" in the edit box, without set the focus on this field.
What's wrong?
Thx
Joli
|
|
|
|
|
One solution is to override OnInitDialog() and call SetFocus() on the editbox inside it.
Kuphryn
|
|
|
|
|
Does it mean to override the OnInitDialog of the child C123?
If yes,
I wrote:
BOOL C123::OnInitDialog()
{ m_CName.SetFocus();
CDialog::OnInitDialog();
return TRUE;
}
but there is no change.
??
|
|
|
|
|
Post a message vis PostMessage(). Post WM_SETFOCUS.
Kuphryn
|
|
|
|
|
I have used :
m_CName.PostMessage(WM_SETFOCUS);
// and delete the CDialog::OnInitDialog in C123::OnInitDialog but still not work
|
|
|
|
|
You can't call SetFocus() until the dialog is created. The way you have it now, you're calling a method of m_CName before the control exists. THe proper way to set focus to a control is in OnInitDialog() and return FALSE from OnInitDialog()
--Mike--
Latest blog entry: *drool* (Alyson) [May 10]
Ericahist | Homepage | RightClick-Encrypt | 1ClickPicGrabber
"You have Erica on the brain" - Jon Sagara to me
|
|
|
|
|
I stand to be corrected but in OnInitdialog looks good to me but should you not
return FALSE when specificaly setting the focus. You are returning TRUE which
If my memory serves me correctly is wrong.
The default implimentation adds a comment stating this.
Hope it was of some help
cheers
|
|
|
|
|
Sorry,
I see "Michael Dunn" has already said this, I did not see his response at the time.
cheers
|
|
|
|