Quantcast
Channel: CodeGuru Forums - Visual C++ Programming
Viewing all articles
Browse latest Browse all 3027

display hex in an edit box

$
0
0
I'm trying to take a value from an edit box and display it in the edit box as hex. I'm using this code:


CString buffer;
int intbuf;
m_edit[5]->GetWindowTextA(buffer);
intbuf = atoi(buffer);
buffer.Format("%02X", intbuf);
m_edit[5]->SetWindowTextA(buffer);


If I include the last line of code here I get a stack overflow error. If I don't include it, I can run through the debugger and the buffer CString is converted to hex just like I want, I just can't display it because I get that error. Any help is appreciated as to why I get the error. Thanks for the help!!!

Viewing all articles
Browse latest Browse all 3027

Latest Images

Trending Articles



Latest Images