Click here to Skip to main content
15,899,475 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: to make a tab key work Pin
prithaa26-Oct-06 21:29
prithaa26-Oct-06 21:29 
GeneralRe: to make a tab key work Pin
Rajesh R Subramanian26-Oct-06 21:42
professionalRajesh R Subramanian26-Oct-06 21:42 
GeneralRe: to make a tab key work Pin
prithaa26-Oct-06 22:07
prithaa26-Oct-06 22:07 
GeneralRe: to make a tab key work Pin
Rajesh R Subramanian26-Oct-06 22:12
professionalRajesh R Subramanian26-Oct-06 22:12 
GeneralRe: to make a tab key work Pin
ThatsAlok28-Oct-06 1:24
ThatsAlok28-Oct-06 1:24 
QuestionConvertingDWord to String. Problems using right shift operator Pin
Monk11126-Oct-06 6:10
Monk11126-Oct-06 6:10 
AnswerRe: ConvertingDWord to String. Problems using right shift operator Pin
PJ Arends26-Oct-06 7:43
professionalPJ Arends26-Oct-06 7:43 
AnswerRe: ConvertingDWord to String. Problems using right shift operator Pin
Mark Salsbery26-Oct-06 8:28
Mark Salsbery26-Oct-06 8:28 
The function is just ensuring that the bytes are in little-endian order no matter what processor
it's running on.

On an x86 machine you could just do this
string
DWORDToString(DWORD dword)
{
string str = "1234";
*((DWORD*)(&str[0])) = dword;
return str;
}
but it wouldn't be the same on a processor that stores 32-bit integers in big-endian order.

The function
Takes the low-order 8 bits and puts it at index 0 position in the array
Takes the next highest order 8 bits and puts it at index 1 position in the array
Takes the next highest order 8 bits and puts it at index 2 position in the array
Takes the highest order 8 bits and puts it at index 3 position in the array

I don't know if this was a typo but
1 0000 0000 Right shift >> 16 gives 0000 0000 0000 0001
is wrong. Should be
1 0000 0000 Right shift >> 16 gives 0000 0000 0000 0000
1 0000 0000 Right shift >> 24 gives 0000 0000 0000 0000

GeneralRe: ConvertingDWord to String. Problems using right shift operator Pin
Monk11126-Oct-06 21:00
Monk11126-Oct-06 21:00 
GeneralRe: ConvertingDWord to String. Problems using right shift operator Pin
Mark Salsbery27-Oct-06 6:01
Mark Salsbery27-Oct-06 6:01 
QuestionSoftware Required to be Developed Pin
Alleyes26-Oct-06 5:34
Alleyes26-Oct-06 5:34 
AnswerRe: Software Required to be Developed Pin
toxcct26-Oct-06 5:55
toxcct26-Oct-06 5:55 
GeneralRe: Software Required to be Developed Pin
Trollslayer26-Oct-06 8:25
mentorTrollslayer26-Oct-06 8:25 
GeneralRe: Software Required to be Developed Pin
Lord Kixdemp26-Oct-06 10:53
Lord Kixdemp26-Oct-06 10:53 
GeneralRe: Software Required to be Developed Pin
ThatsAlok28-Oct-06 1:23
ThatsAlok28-Oct-06 1:23 
QuestionCPPUnit - writing test results in xml file Pin
jayart26-Oct-06 5:24
jayart26-Oct-06 5:24 
AnswerRe: CPPUnit - writing test results in xml file Pin
Wes Aday26-Oct-06 6:09
professionalWes Aday26-Oct-06 6:09 
GeneralRe: CPPUnit - writing test results in xml file Pin
jayart26-Oct-06 6:28
jayart26-Oct-06 6:28 
QuestionCreating a Picture Box Control Pin
jerry1211a26-Oct-06 5:04
jerry1211a26-Oct-06 5:04 
AnswerRe: Creating a Picture Box Control Pin
Mark Salsbery26-Oct-06 5:56
Mark Salsbery26-Oct-06 5:56 
GeneralRe: Creating a Picture Box Control Pin
jerry1211a26-Oct-06 7:43
jerry1211a26-Oct-06 7:43 
AnswerRe: Creating a Picture Box Control Pin
Hamid_RT26-Oct-06 19:40
Hamid_RT26-Oct-06 19:40 
QuestionHandle of child windows Pin
Max++26-Oct-06 4:26
Max++26-Oct-06 4:26 
AnswerRe: Handle of child windows Pin
Jonathan [Darka]26-Oct-06 5:05
professionalJonathan [Darka]26-Oct-06 5:05 
AnswerRe: Handle of child windows Pin
Stephen Hewitt26-Oct-06 13:30
Stephen Hewitt26-Oct-06 13:30 

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.