Click here to Skip to main content
15,910,797 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Is it possible to draw on dialog Pin
led mike20-Jun-07 6:35
led mike20-Jun-07 6:35 
GeneralRe: Is it possible to draw on dialog Pin
Mark Salsbery20-Jun-07 7:18
Mark Salsbery20-Jun-07 7:18 
GeneralThank you very much Pin
shivditya22-Jun-07 7:57
shivditya22-Jun-07 7:57 
QuestionA beginer's qustion Pin
Xiaoming Qian20-Jun-07 3:10
Xiaoming Qian20-Jun-07 3:10 
AnswerRe: A beginer's qustion Pin
xyecloudy20-Jun-07 3:16
xyecloudy20-Jun-07 3:16 
AnswerRe: A beginer's qustion Pin
kakan20-Jun-07 4:14
professionalkakan20-Jun-07 4:14 
QuestionRe: A beginer's qustion Pin
David Crow20-Jun-07 4:55
David Crow20-Jun-07 4:55 
AnswerRe: A beginer's qustion Pin
Mark Salsbery20-Jun-07 5:27
Mark Salsbery20-Jun-07 5:27 
Xiaoming Qian wrote:
short i;
memcpy(&Data[3],&i,2);


On Intel machines, i is stored with the least-significant byte first. If you use memcpy like
this then

Data[3] == least-significant byte of i
Data[4] == most-significant byte of i

To get the value back. something like:

short i = (short)((unsigned short)Data[4] << 8) | (unsigned short)Data[3];

or

short i;
memcpy(&i,&Data[3],2);



"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder

AnswerRe: A beginer's qustion Pin
Shatak Gurukar20-Jun-07 7:35
Shatak Gurukar20-Jun-07 7:35 
GeneralRe: A beginer's qustion Pin
David Crow20-Jun-07 7:56
David Crow20-Jun-07 7:56 
AnswerRe: A beginer's qustion [modified] Pin
Erik Midtskogen20-Jun-07 7:54
Erik Midtskogen20-Jun-07 7:54 
GeneralRe: A beginer's qustion Pin
David Crow20-Jun-07 7:57
David Crow20-Jun-07 7:57 
GeneralRe: A beginer's qustion Pin
Erik Midtskogen20-Jun-07 8:09
Erik Midtskogen20-Jun-07 8:09 
QuestionService problem Pin
david bagaturia20-Jun-07 3:05
david bagaturia20-Jun-07 3:05 
JokeRe: Service problem Pin
Matthew Faithfull20-Jun-07 3:46
Matthew Faithfull20-Jun-07 3:46 
AnswerRe: Service problem Pin
david bagaturia20-Jun-07 4:13
david bagaturia20-Jun-07 4:13 
GeneralRe: Service problem Pin
david bagaturia20-Jun-07 4:31
david bagaturia20-Jun-07 4:31 
GeneralRe: Service problem Pin
BadKarma20-Jun-07 4:52
BadKarma20-Jun-07 4:52 
GeneralRe: Service problem Pin
david bagaturia20-Jun-07 19:35
david bagaturia20-Jun-07 19:35 
QuestionRe: Service problem Pin
David Crow20-Jun-07 4:58
David Crow20-Jun-07 4:58 
AnswerRe: Service problem Pin
led mike20-Jun-07 5:14
led mike20-Jun-07 5:14 
GeneralRe: Service problem Pin
Mark Salsbery20-Jun-07 5:36
Mark Salsbery20-Jun-07 5:36 
GeneralRe: Service problem Pin
David Crow20-Jun-07 6:55
David Crow20-Jun-07 6:55 
GeneralRe: Service problem Pin
led mike20-Jun-07 7:09
led mike20-Jun-07 7:09 
GeneralRe: Service problem Pin
David Crow20-Jun-07 7:18
David Crow20-Jun-07 7:18 

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.