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

C / C++ / MFC

 
QuestionHow to make a winodow always remaining on top Pin
reza matinnejad9-Jan-07 20:18
reza matinnejad9-Jan-07 20:18 
AnswerRe: How to make a winodow always remaining on top Pin
Hamid_RT9-Jan-07 20:23
Hamid_RT9-Jan-07 20:23 
AnswerRe: How to make a winodow always remaining on top Pin
prasad_som9-Jan-07 20:28
prasad_som9-Jan-07 20:28 
QuestionAlign dynamic memory to 32-bit boundary Pin
uusheikh9-Jan-07 20:16
uusheikh9-Jan-07 20:16 
AnswerRe: Align dynamic memory to 32-bit boundary Pin
Cristian Amarie9-Jan-07 21:06
Cristian Amarie9-Jan-07 21:06 
GeneralRe: Align dynamic memory to 32-bit boundary Pin
uusheikh9-Jan-07 21:24
uusheikh9-Jan-07 21:24 
GeneralRe: Align dynamic memory to 32-bit boundary Pin
Jonathan [Darka]9-Jan-07 21:25
professionalJonathan [Darka]9-Jan-07 21:25 
GeneralRe: Align dynamic memory to 32-bit boundary Pin
Cristian Amarie9-Jan-07 22:12
Cristian Amarie9-Jan-07 22:12 
Yes, you'll probably right. What am I saying, for sure you're right.

Then the only way I can think of is to align the allocation size to DWORD.
There was a ALIGN_DWORD (or DWORD_ALIGN) macro or something - anyway was something like (memory quote)
((p + 3) & ~3)

This one
// Macro for aligning CLUSPROP buffers on a DWORD boundary.
#define ALIGN_CLUSPROP( count ) ((count + 3) & ~3)

is from ClusApi.h, but the idea is the same.

In this way the buffer will not allocate, say, 102 bytes, but (102 + 3) & ~3 = 105 & ~3 = 104.



Nuclear launch detected

GeneralRe: Align dynamic memory to 32-bit boundary Pin
Jonathan [Darka]9-Jan-07 22:31
professionalJonathan [Darka]9-Jan-07 22:31 
GeneralRe: Align dynamic memory to 32-bit boundary Pin
uusheikh9-Jan-07 21:37
uusheikh9-Jan-07 21:37 
GeneralRe: Align dynamic memory to 32-bit boundary [modified] Pin
Jonathan [Darka]9-Jan-07 22:02
professionalJonathan [Darka]9-Jan-07 22:02 
GeneralRe: Align dynamic memory to 32-bit boundary Pin
uusheikh9-Jan-07 22:52
uusheikh9-Jan-07 22:52 
GeneralRe: Align dynamic memory to 32-bit boundary Pin
Sceptic Mole9-Jan-07 23:17
Sceptic Mole9-Jan-07 23:17 
GeneralRe: Align dynamic memory to 32-bit boundary Pin
Jonathan [Darka]9-Jan-07 23:33
professionalJonathan [Darka]9-Jan-07 23:33 
GeneralRe: Align dynamic memory to 32-bit boundary Pin
uusheikh10-Jan-07 20:18
uusheikh10-Jan-07 20:18 
AnswerRe: Align dynamic memory to 32-bit boundary Pin
Chris Losinger10-Jan-07 2:37
professionalChris Losinger10-Jan-07 2:37 
GeneralRe: Align dynamic memory to 32-bit boundary Pin
uusheikh10-Jan-07 20:20
uusheikh10-Jan-07 20:20 
QuestionHow to serialize an ICON Pin
neilsolent9-Jan-07 19:06
neilsolent9-Jan-07 19:06 
AnswerRe: How to serialize an ICON Pin
Waldermort9-Jan-07 21:03
Waldermort9-Jan-07 21:03 
GeneralRe: How to serialize an ICON Pin
neilsolent9-Jan-07 23:44
neilsolent9-Jan-07 23:44 
AnswerRe: How to serialize an ICON Pin
Cristian Amarie9-Jan-07 21:14
Cristian Amarie9-Jan-07 21:14 
GeneralRe: How to serialize an ICON Pin
neilsolent9-Jan-07 23:46
neilsolent9-Jan-07 23:46 
GeneralRe: How to serialize an ICON Pin
Cristian Amarie10-Jan-07 0:15
Cristian Amarie10-Jan-07 0:15 
GeneralRe: How to serialize an ICON Pin
neilsolent10-Jan-07 2:58
neilsolent10-Jan-07 2:58 
GeneralRe: How to serialize an ICON Pin
Cristian Amarie10-Jan-07 3:28
Cristian Amarie10-Jan-07 3:28 

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.