Click here to Skip to main content
15,898,036 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Hook file access Pin
Tschieses30-Jan-06 23:04
Tschieses30-Jan-06 23:04 
GeneralRe: Hook file access Pin
Stephen Hewitt30-Jan-06 23:45
Stephen Hewitt30-Jan-06 23:45 
GeneralRe: Hook file access Pin
Tschieses31-Jan-06 0:07
Tschieses31-Jan-06 0:07 
GeneralRe: Hook file access Pin
Chintoo72331-Jan-06 0:11
Chintoo72331-Jan-06 0:11 
GeneralRe: Hook file access Pin
Stephen Hewitt31-Jan-06 11:18
Stephen Hewitt31-Jan-06 11:18 
QuestionProblem in scrolling Pin
Anu_Bala30-Jan-06 22:19
Anu_Bala30-Jan-06 22:19 
AnswerRe: Problem in scrolling Pin
Owner drawn30-Jan-06 22:28
Owner drawn30-Jan-06 22:28 
Questionscrolling problem in listbox Pin
Anu_Bala30-Jan-06 22:02
Anu_Bala30-Jan-06 22:02 
AnswerRe: scrolling problem in listbox Pin
Rage30-Jan-06 22:14
professionalRage30-Jan-06 22:14 
Questiondifference between win32app & mfc Pin
samira forooghi30-Jan-06 21:56
samira forooghi30-Jan-06 21:56 
AnswerRe: difference between win32app & mfc Pin
kakan30-Jan-06 22:02
professionalkakan30-Jan-06 22:02 
GeneralRe: difference between win32app & mfc Pin
khan++30-Jan-06 22:20
khan++30-Jan-06 22:20 
GeneralRe: difference between win32app & mfc Pin
kakan31-Jan-06 0:18
professionalkakan31-Jan-06 0:18 
AnswerRe: difference between win32app & mfc Pin
khan++30-Jan-06 22:27
khan++30-Jan-06 22:27 
AnswerRe: difference between win32app & mfc Pin
toxcct31-Jan-06 0:36
toxcct31-Jan-06 0:36 
QuestionFocus does not return back to Button after the event handler for the button is executed Pin
GayathriNaveen30-Jan-06 21:32
GayathriNaveen30-Jan-06 21:32 
QuestionRe: Focus does not return back to Button after the event handler for the button is executed Pin
Prakash Nadar30-Jan-06 21:43
Prakash Nadar30-Jan-06 21:43 
QuestionHow to convert hex to string? Pin
Rostfrei30-Jan-06 20:20
Rostfrei30-Jan-06 20:20 
Hello!

I have some char array of hexadecimal values I get from the network. I want to convert them to some printable form. For example I did it like:

<br />
	string print_buff;<br />
<br />
	char buffer2[100] = {0x7f, 0x80, 0x1a};<br />
<br />
	for(int i = 0; i < 3; i++){<br />
		char a[3] = {0};<br />
		sprintf(a, "%2.0x", buffer2[i]);<br />
		print_buff.append(a, 2);<br />
	}<br />


This works well to the values 0x7f (127), but for the numbers bigger than 0x7f it doesn't work properly anymore. If I look at 'a[3]' character array (in debuger) I can see that 0x80 has converted to "ffffff80" string. How is this even possible when I limited string with formating option to 2? When I append characters afterwards, "ff" is appended not "80".



Rostfrei
AnswerRe: How to convert hex to string? Pin
Owner drawn30-Jan-06 20:43
Owner drawn30-Jan-06 20:43 
GeneralRe: How to convert hex to string? Pin
Rostfrei30-Jan-06 20:53
Rostfrei30-Jan-06 20:53 
GeneralRe: How to convert hex to string? Pin
Owner drawn30-Jan-06 20:59
Owner drawn30-Jan-06 20:59 
GeneralRe: How to convert hex to string? Pin
Rostfrei30-Jan-06 21:08
Rostfrei30-Jan-06 21:08 
AnswerRe: How to convert hex to string? Pin
Owner drawn30-Jan-06 21:08
Owner drawn30-Jan-06 21:08 
GeneralRe: How to convert hex to string? Pin
Rostfrei30-Jan-06 21:12
Rostfrei30-Jan-06 21:12 
AnswerRe: How to convert hex to string? Pin
Stephen Hewitt30-Jan-06 21:56
Stephen Hewitt30-Jan-06 21:56 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.