Click here to Skip to main content
16,005,120 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Listview using WIN32 API Pin
priyank_ldce2-Nov-06 5:50
priyank_ldce2-Nov-06 5:50 
GeneralRe: Listview using WIN32 API Pin
David Crow2-Nov-06 6:04
David Crow2-Nov-06 6:04 
GeneralRe: Listview using WIN32 API Pin
led mike2-Nov-06 6:50
led mike2-Nov-06 6:50 
GeneralRe: Listview using WIN32 API Pin
David Crow2-Nov-06 8:12
David Crow2-Nov-06 8:12 
AnswerRe: Listview using WIN32 API Pin
Michael Dunn2-Nov-06 8:55
sitebuilderMichael Dunn2-Nov-06 8:55 
QuestionBit alignment Problem with VS 2005 Maybe Pin
Andy2022-Nov-06 4:44
Andy2022-Nov-06 4:44 
AnswerRe: Bit alignment Problem with VS 2005 Maybe Pin
Waldermort2-Nov-06 4:56
Waldermort2-Nov-06 4:56 
GeneralRe: Bit alignment Problem with VS 2005 Maybe Pin
Andy2022-Nov-06 5:20
Andy2022-Nov-06 5:20 
I am trying to define a structure such that its not padded out to the nearest byte.

I did think that the directive #pragma pack(1) meant that across a 32 bit (4 byte) boundry all the bits are used.

e.g.

#pragma pack(1)

typedef struct{
	unsigned long	a1_t12_word_0_block_label	:	12;
	unsigned long	a1_t12_word_0_spare_825_12	:	2;
	unsigned long	a1_t12_word_0_hset_ld_succ	:	2;
	unsigned long	a1_t12_word_1_hqi_a_net	:	8;
	unsigned long	a1_t12_word_1_hqi_b_net	:	8;
	unsigned long	a1_t12_word_2_hqii_no	:	8;
	unsigned long	a1_t12_word_2_hqii_non_no	:	8;
	unsigned long	a1_t12_word_3_hqii_fmt1	:	8;
	unsigned long	a1_t12_word_3_hqii_fmt2	:	8;
	unsigned long	a1_t12_word_4_hqii_fmt3	:	8;
	unsigned long	a1_t12_word_4_hqii_fmt4	:	8;
	unsigned long	a1_t12_word_5_hqii_fmt5	:	8;
	unsigned long	a1_t12_word_5_hqii_fmt6	:	8;
	unsigned long	a1_t12_word_6_urn_no	:	8;
	unsigned long	a1_t12_word_6_urn_non_no	:	8;
	unsigned long	a1_t12_word_7_urn_t40_no	:	8;
	unsigned long	a1_t12_word_7_urn_t40_non_no	:	8;
	unsigned long	a1_t12_word_8_hqii_fmt7	:	8;
	unsigned long	a1_t12_word_8_hqii_fmt8	:	8;
}a1_VUHF1_T12;

The size of this structure turns out to be 20 bytes. It should be 18 bytes, how can I get it to be 18 bytes?
GeneralRe: Bit alignment Problem with VS 2005 Maybe Pin
Mark Salsbery2-Nov-06 8:04
Mark Salsbery2-Nov-06 8:04 
GeneralRe: Bit alignment Problem with VS 2005 Maybe Pin
Andy2022-Nov-06 22:29
Andy2022-Nov-06 22:29 
QuestionReally need your help(someting aobut the directions which shoule I choose!!) Pin
wanlim08172-Nov-06 4:42
wanlim08172-Nov-06 4:42 
AnswerRe: Really need your help(someting aobut the directions which shoule I choose!!) Pin
David Crow2-Nov-06 4:49
David Crow2-Nov-06 4:49 
GeneralRe: Really need your help(someting aobut the directions which shoule I choose!!) Pin
wanlim08172-Nov-06 5:16
wanlim08172-Nov-06 5:16 
GeneralRe: Really need your help(someting aobut the directions which shoule I choose!!) Pin
David Crow2-Nov-06 5:32
David Crow2-Nov-06 5:32 
GeneralRe: Really need your help(someting aobut the directions which shoule I choose!!) Pin
wanlim08172-Nov-06 5:43
wanlim08172-Nov-06 5:43 
GeneralRe: Really need your help(someting aobut the directions which shoule I choose!!) Pin
David Crow2-Nov-06 5:54
David Crow2-Nov-06 5:54 
QuestionEnumerating files in folder Pin
Imtiaz Murtaza2-Nov-06 4:37
Imtiaz Murtaza2-Nov-06 4:37 
AnswerRe: Enumerating files in folder Pin
David Crow2-Nov-06 4:46
David Crow2-Nov-06 4:46 
Questionhelp Pin
Kiethnt2-Nov-06 4:13
Kiethnt2-Nov-06 4:13 
AnswerRe: help Pin
Cedric Moonen2-Nov-06 4:56
Cedric Moonen2-Nov-06 4:56 
AnswerRe: help Pin
normanS2-Nov-06 6:37
normanS2-Nov-06 6:37 
Questionhelp Pin
Kiethnt2-Nov-06 4:11
Kiethnt2-Nov-06 4:11 
QuestionConvert Time to CString? Pin
bosfan2-Nov-06 4:05
bosfan2-Nov-06 4:05 
AnswerRe: Convert Time to CString? Pin
bosfan2-Nov-06 4:16
bosfan2-Nov-06 4:16 
GeneralRe: Convert Time to CString? Pin
Niklas L2-Nov-06 21:42
Niklas L2-Nov-06 21: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.