Click here to Skip to main content
15,914,109 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: How to read and write CPU cache? Pin
hameduser1-Jul-07 21:22
hameduser1-Jul-07 21:22 
GeneralRe: How to read and write CPU cache? Pin
Surendra Vishwkarma5-Jul-07 16:07
Surendra Vishwkarma5-Jul-07 16:07 
QuestionHow to add outlookbar to multipe document? Pin
chinakknd1-Jul-07 15:35
chinakknd1-Jul-07 15:35 
QuestionVirtual keyboard losing window focus. Help! Pin
remarkpk111-Jul-07 13:45
remarkpk111-Jul-07 13:45 
AnswerRe: Virtual keyboard losing window focus. Help! Pin
Steve Echols1-Jul-07 17:55
Steve Echols1-Jul-07 17:55 
GeneralRe: Virtual keyboard losing window focus. Help! Pin
remarkpk112-Jul-07 5:00
remarkpk112-Jul-07 5:00 
Questionmemory allocation syntax Pin
prithaa1-Jul-07 9:52
prithaa1-Jul-07 9:52 
AnswerRe: memory allocation syntax Pin
Mark Salsbery1-Jul-07 10:01
Mark Salsbery1-Jul-07 10:01 
prithaa wrote:
Can you please explain me the syntax of the above code or give me the link
What does *(WORD*)pdest = 0xFFFF; mean ?


(WORD*) casts the BYTE pointer to a WORD pointer.
The '*' before the cast dereferences the WORD pointer so the "= 0xFFFF" can place a WORD value
at the location pointed to by pdest.

It ends up being the same as:

BYTE pdest;
pdest += sizeof(DLGITEMTEMPLATE);
WORD *pdestWORD = (WORD *)pdest;
*pdestWORD = 0xFFFF; // or pdestWORD[0] = 0xFFFF; // indicating atom value
pdest += sizeof(WORD);
pdestWORD = (WORD *)pdest;
*pdestWORD = 0xFFFF; // or pdestWORD[0] = 0xFFFF; // atom value for the control
pdest += sizeof(WORD);

Mark

Mark Salsbery
Microsoft MVP - Visual C++

GeneralRe: memory allocation syntax Pin
prithaa1-Jul-07 17:11
prithaa1-Jul-07 17:11 
GeneralRe: memory allocation syntax Pin
Mark Salsbery1-Jul-07 19:42
Mark Salsbery1-Jul-07 19:42 
GeneralRe: memory allocation syntax Pin
prithaa1-Jul-07 19:59
prithaa1-Jul-07 19:59 
GeneralRe: memory allocation syntax Pin
Mark Salsbery1-Jul-07 20:09
Mark Salsbery1-Jul-07 20:09 
GeneralRe: memory allocation syntax Pin
prithaa1-Jul-07 20:21
prithaa1-Jul-07 20:21 
QuestionAdding Members to a Base Class Pin
ForNow1-Jul-07 8:05
ForNow1-Jul-07 8:05 
AnswerRe: Adding Members to a Base Class Pin
Mark Salsbery1-Jul-07 8:49
Mark Salsbery1-Jul-07 8:49 
GeneralRe: Adding Members to a Base Class Pin
ForNow1-Jul-07 8:57
ForNow1-Jul-07 8:57 
GeneralRe: Adding Members to a Base Class Pin
Mark Salsbery1-Jul-07 12:11
Mark Salsbery1-Jul-07 12:11 
GeneralRe: Adding Members to a Base Class Pin
ForNow1-Jul-07 14:19
ForNow1-Jul-07 14:19 
GeneralRe: Adding Members to a Base Class Pin
Steve Echols1-Jul-07 17:32
Steve Echols1-Jul-07 17:32 
GeneralRe: Adding Members to a Base Class Pin
Mark Salsbery2-Jul-07 6:59
Mark Salsbery2-Jul-07 6:59 
GeneralRe: Adding Members to a Base Class Pin
Mark Salsbery2-Jul-07 7:01
Mark Salsbery2-Jul-07 7:01 
GeneralRe: Adding Members to a Base Class Pin
ForNow2-Jul-07 12:13
ForNow2-Jul-07 12:13 
QuestionURLDownloadToFile dont work in worker thread [modified] Pin
awah1-Jul-07 5:19
awah1-Jul-07 5:19 
AnswerRe: URLDownloadToFile dont work in worker thread Pin
Mark Salsbery1-Jul-07 9:00
Mark Salsbery1-Jul-07 9:00 
Questionproblem in USB Pen Drive detection Pin
cyberanee1-Jul-07 3:42
cyberanee1-Jul-07 3:42 

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.