Click here to Skip to main content
15,908,112 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Window Message Pin
Richard MacCutchan7-Sep-09 6:08
mveRichard MacCutchan7-Sep-09 6:08 
QuestionpRecordset->Fields->GetItem(); Pin
MsmVc7-Sep-09 2:43
MsmVc7-Sep-09 2:43 
QuestionRegOpenKeyEx() api issue. Pin
birajendu7-Sep-09 2:21
birajendu7-Sep-09 2:21 
QuestionRe: RegOpenKeyEx() api issue. Pin
CPallini7-Sep-09 2:33
mveCPallini7-Sep-09 2:33 
AnswerRe: RegOpenKeyEx() api issue. Pin
birajendu7-Sep-09 2:39
birajendu7-Sep-09 2:39 
QuestionRe: RegOpenKeyEx() api issue. Pin
CPallini7-Sep-09 2:46
mveCPallini7-Sep-09 2:46 
AnswerRe: RegOpenKeyEx() api issue. Pin
birajendu7-Sep-09 2:52
birajendu7-Sep-09 2:52 
GeneralRe: RegOpenKeyEx() api issue. Pin
CPallini7-Sep-09 2:59
mveCPallini7-Sep-09 2:59 
GeneralRe: RegOpenKeyEx() api issue. Pin
birajendu7-Sep-09 3:46
birajendu7-Sep-09 3:46 
AnswerRe: RegOpenKeyEx() api issue. Pin
Richard MacCutchan7-Sep-09 2:43
mveRichard MacCutchan7-Sep-09 2:43 
AnswerRe: RegOpenKeyEx() api issue. Pin
krmed8-Sep-09 0:52
krmed8-Sep-09 0:52 
QuestionBlinking cursor Pin
susanne17-Sep-09 1:58
susanne17-Sep-09 1:58 
AnswerRe: Blinking cursor Pin
Cedric Moonen7-Sep-09 3:18
Cedric Moonen7-Sep-09 3:18 
GeneralRe: Blinking cursor Pin
susanne17-Sep-09 3:34
susanne17-Sep-09 3:34 
GeneralRe: Blinking cursor Pin
Iain Clarke, Warrior Programmer7-Sep-09 4:32
Iain Clarke, Warrior Programmer7-Sep-09 4:32 
GeneralRe: Blinking cursor Pin
susanne18-Sep-09 23:38
susanne18-Sep-09 23:38 
Questionbyte alignment issue? Writing struct to file in binary mode. [modified] Pin
Sauce!7-Sep-09 1:57
Sauce!7-Sep-09 1:57 
AnswerRe: byte alignment issue? Writing struct to file in binary mode. Pin
CPallini7-Sep-09 2:24
mveCPallini7-Sep-09 2:24 
AnswerRe: byte alignment issue? Writing struct to file in binary mode. Pin
Richard MacCutchan7-Sep-09 2:39
mveRichard MacCutchan7-Sep-09 2:39 
GeneralRe: byte alignment issue? Writing struct to file in binary mode. [modified] Pin
Sauce!7-Sep-09 3:50
Sauce!7-Sep-09 3:50 
GeneralRe: byte alignment issue? Writing struct to file in binary mode. Pin
Richard MacCutchan7-Sep-09 4:57
mveRichard MacCutchan7-Sep-09 4:57 
AnswerRe: byte alignment issue? Writing struct to file in binary mode. Pin
Luc Pattyn7-Sep-09 2:39
sitebuilderLuc Pattyn7-Sep-09 2:39 
GeneralRe: byte alignment issue? Writing struct to file in binary mode. [modified] Pin
Sauce!7-Sep-09 6:04
Sauce!7-Sep-09 6:04 
GeneralRe: byte alignment issue? Writing struct to file in binary mode. Pin
Luc Pattyn7-Sep-09 6:16
sitebuilderLuc Pattyn7-Sep-09 6:16 
sure, one of three things:

1. explain to the compiler exactly what it is you need, using switches and/or pragma directives, as others already told you
2. write(or read) your struct with explicit code, one statement for each field, using the method/function that fits the type of the field
3. don't use a struct at all; use a byte array, and write into/read from it using methods that deal with individual bytes and perform the necessary conversion from/to multi-byte data types, such as
int x=(((array[y+3]<<8)|array[y+2])<<8)|array[y+1])<<8)|array[y+0];
BTW: if you don't like/trust such code, you can also use a local union of a small byte array and the type of interest.

Smile | :)

Luc Pattyn
Badger | [badger,badger,badger,badger...] Jig | [Dance] Badger | [badger,badger,badger,badger...] Have a look at my entry for the lean-and-mean competition; please provide comments, feedback, discussion, and don’t forget to vote for it! Thank you.Jig | [Dance] Badger | [badger,badger,badger,badger...] Jig | [Dance]

GeneralRe: byte alignment issue? Writing struct to file in binary mode. Pin
Richard MacCutchan7-Sep-09 10:59
mveRichard MacCutchan7-Sep-09 10:59 

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.