Click here to Skip to main content
15,891,423 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Problem using RichTextBox Pin
David Crow25-Aug-04 10:21
David Crow25-Aug-04 10:21 
GeneralRe: Problem using RichTextBox Pin
SuperTank25-Aug-04 10:40
SuperTank25-Aug-04 10:40 
GeneralDeriving from a CStatic Pin
act_x25-Aug-04 6:01
act_x25-Aug-04 6:01 
GeneralRe: Deriving from a CStatic Pin
Michael P Butler25-Aug-04 6:28
Michael P Butler25-Aug-04 6:28 
GeneralRe: Deriving from a CStatic Pin
Maximilien25-Aug-04 6:33
Maximilien25-Aug-04 6:33 
GeneralGeneral Pointer to Variables Pin
sweep12325-Aug-04 5:49
sweep12325-Aug-04 5:49 
GeneralRe: General Pointer to Variables Pin
jmkhael25-Aug-04 5:56
jmkhael25-Aug-04 5:56 
GeneralRe: General Pointer to Variables Pin
sweep12326-Aug-04 2:17
sweep12326-Aug-04 2:17 
Thanks for the info, however I have a problem with the bit fields (I know that you cant use the macro with these fields) but its the extra byte thats the problem, as I could just manage the field fileds aa a 2 byte hex item.

#pragma pack(1)<br />
typedef struct<br />
{<br />
     unsigned short  i;  <br />
     float  f;  <br />
     char  c; <br />
	 unsigned short bit41 : 4;<br />
	 unsigned short bit42 : 2;<br />
	 unsigned short bit43 : 1;<br />
	 char s;<br />
	 unsigned short x;<br />
	 double y;<br />
	 double z;<br />
} SFOO;<br />
<br />
union<br />
{<br />
	SFOO				fields;<br />
	unsigned short		buffer[32];<br />
}test_data;<br />
<br />
#pragma pack()<br />
<br />
void main(void)<br />
{<br />
  printf("Offset of 'c' is %u  ", offsetof(SFOO, c));<br />
  printf("Offset of 's' is %u  ", offsetof(SFOO, s));


This gives Offset of 'c' is 6 Offset of 's' is 9; I was expecting 8, see below:-


f f i i
Bits c f f
x x s
y y y y
y y y y
z z z z
z z z z
GeneralRe: General Pointer to Variables Pin
sweep12326-Aug-04 5:35
sweep12326-Aug-04 5:35 
GeneralRe: CRecordset Record Updating(Debug Assertion Failure) problem Pin
David Crow25-Aug-04 5:47
David Crow25-Aug-04 5:47 
GeneralRe: CRecordset Record Updating(Debug Assertion Failure) problem Pin
raed25-Aug-04 5:55
raed25-Aug-04 5:55 
GeneralRe: CRecordset Record Updating(Debug Assertion Failure) problem Pin
jmkhael25-Aug-04 5:59
jmkhael25-Aug-04 5:59 
GeneralRe: CRecordset Record Updating(Debug Assertion Failure) problem Pin
raed25-Aug-04 20:38
raed25-Aug-04 20:38 
Questionhow to move the event handler from main view Pin
hyling25-Aug-04 5:43
hyling25-Aug-04 5:43 
GeneralINI Files Pin
si_6925-Aug-04 5:30
si_6925-Aug-04 5:30 
GeneralRe: INI Files Pin
David Crow25-Aug-04 5:45
David Crow25-Aug-04 5:45 
GeneralRe: INI Files Pin
si_6925-Aug-04 22:40
si_6925-Aug-04 22:40 
GeneralRe: INI Files Pin
David Crow26-Aug-04 3:01
David Crow26-Aug-04 3:01 
GeneralWinSock2 Pin
Micie25-Aug-04 5:20
Micie25-Aug-04 5:20 
GeneralRe: WinSock2 Pin
Tom Wright25-Aug-04 5:33
Tom Wright25-Aug-04 5:33 
GeneralRe: WinSock2 Pin
Micie25-Aug-04 5:36
Micie25-Aug-04 5:36 
GeneralRe: WinSock2 Pin
Tom Wright25-Aug-04 5:46
Tom Wright25-Aug-04 5:46 
GeneralRe: WinSock2 Pin
palbano25-Aug-04 19:32
palbano25-Aug-04 19:32 
GeneralAT command? ===&gt; read sms method Pin
Adrian Soon25-Aug-04 5:11
Adrian Soon25-Aug-04 5:11 
GeneralRe: AT command? ===&gt; read sms method Pin
jmkhael25-Aug-04 5:24
jmkhael25-Aug-04 5:24 

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.