Click here to Skip to main content
15,879,535 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Moving from VC++ 6.0 to VC++2005 Pin
CPallini7-Dec-07 1:54
mveCPallini7-Dec-07 1:54 
GeneralRe: Moving from VC++ 6.0 to VC++2005 Pin
josip cagalj7-Dec-07 3:27
josip cagalj7-Dec-07 3:27 
GeneralRe: Moving from VC++ 6.0 to VC++2005 Pin
CPallini7-Dec-07 3:36
mveCPallini7-Dec-07 3:36 
GeneralRe: Moving from VC++ 6.0 to VC++2005 Pin
josip cagalj7-Dec-07 3:55
josip cagalj7-Dec-07 3:55 
GeneralMFC Modal OpenGL dialog wont show up unless I pressed "Alt" key (on intel hardware) Pin
xanagan6666-Dec-07 22:37
xanagan6666-Dec-07 22:37 
Questionstruct member alignment? Pin
Laurence6-Dec-07 20:36
Laurence6-Dec-07 20:36 
AnswerRe: struct member alignment? Pin
Matthew Faithfull7-Dec-07 2:23
Matthew Faithfull7-Dec-07 2:23 
AnswerRe: struct member alignment? Pin
Bram van Kampen7-Dec-07 13:12
Bram van Kampen7-Dec-07 13:12 
Use #pragma pack and set it to whatever suites you best.
All my Header files start with #pragma pack(1).
I allign my data for Data Files Manually on an 1,2, 4 or 8 byte boundary (as suites me) and hey presto, where's the problem. Take care though, NOT to use ints and longs, use BYTE,WORD,DWORD and QWORD for structures saved on file. This combined with a byte packing boundary, will future proof your data against any compiler allignment changes.

For structures not saved on file, and not exchanged between processes, allignment issues are immaterial, as long as they are agreed between the processes. The Microsoft Default of 8 bytes probably gives the fastest raw acces. The question is: Is it worth the bother. The important reflection is that: At least it is something we can quite easily choose ourselves to suit our purposes.

Regards, Smile | :)

Bram van Kampen

GeneralData corruption during File Write Pin
SelvaKr6-Dec-07 20:35
SelvaKr6-Dec-07 20:35 
GeneralRe: Data corruption during File Write Pin
Nelek6-Dec-07 21:32
protectorNelek6-Dec-07 21:32 
GeneralRe: Data corruption during File Write Pin
JudyL_MD7-Dec-07 2:02
JudyL_MD7-Dec-07 2:02 
GeneralRe: Data corruption during File Write Pin
Bram van Kampen7-Dec-07 12:46
Bram van Kampen7-Dec-07 12:46 
Generalerrors in converting code from multibyte to unicode Pin
neha.agarwal276-Dec-07 20:13
neha.agarwal276-Dec-07 20:13 
GeneralRe: errors in converting code from multibyte to unicode Pin
kcynic6-Dec-07 20:42
kcynic6-Dec-07 20:42 
GeneralRe: errors in converting code from multibyte to unicode Pin
CPallini6-Dec-07 23:47
mveCPallini6-Dec-07 23:47 
GeneralRe: errors in converting code from multibyte to unicode Pin
krmed7-Dec-07 1:59
krmed7-Dec-07 1:59 
GeneralHelp about characterset [modified] Pin
kcynic6-Dec-07 20:11
kcynic6-Dec-07 20:11 
GeneralRe: Help about characterset Pin
Hamed Musavi7-Dec-07 3:25
Hamed Musavi7-Dec-07 3:25 
GeneralRe: Help about characterset Pin
kcynic7-Dec-07 14:14
kcynic7-Dec-07 14:14 
GeneralRe: Help about characterset Pin
Hamed Musavi7-Dec-07 19:24
Hamed Musavi7-Dec-07 19:24 
QuestionHelp! How to change the color of the current row in datagrid [modified] Pin
shakaqrj6-Dec-07 19:49
shakaqrj6-Dec-07 19:49 
GeneralHelp in visual C++ Pin
cinzhan6-Dec-07 19:39
cinzhan6-Dec-07 19:39 
GeneralRe: Help in visual C++ Pin
ThatsAlok6-Dec-07 20:11
ThatsAlok6-Dec-07 20:11 
Generaldata map declartion. Pin
CodingLover6-Dec-07 18:53
CodingLover6-Dec-07 18:53 
GeneralRe: data map declartion. Pin
Karismatic6-Dec-07 19:34
Karismatic6-Dec-07 19:34 

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.