Click here to Skip to main content
16,011,508 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionRotating TextOut() ? Pin
dazinith2-Jan-03 6:05
dazinith2-Jan-03 6:05 
AnswerRe: Rotating TextOut() ? Pin
Navin2-Jan-03 6:23
Navin2-Jan-03 6:23 
AnswerRe: Rotating TextOut() ? Pin
Chris Meech2-Jan-03 6:22
Chris Meech2-Jan-03 6:22 
AnswerRe: Rotating TextOut() ? Pin
Roger Allen2-Jan-03 6:42
Roger Allen2-Jan-03 6:42 
GeneralRe: Rotating TextOut() ? Pin
dazinith2-Jan-03 7:54
dazinith2-Jan-03 7:54 
GeneralRe: Rotating TextOut() ? Pin
Shog92-Jan-03 8:00
sitebuilderShog92-Jan-03 8:00 
GeneralReading a Binary Data File Pin
Frankie Lee2-Jan-03 4:50
Frankie Lee2-Jan-03 4:50 
GeneralRe: Reading a Binary Data File Pin
Joaquín M López Muñoz2-Jan-03 5:16
Joaquín M López Muñoz2-Jan-03 5:16 
Hi Frank,

Serialization is of little interest here. What matters is the information about the exact layout of the data. Assuming the classes you provide are accurate with respect to layout, reading could be done like this (pseudocode follows):
#pragma pack(push,8)
// The definitions of the classes go here. Use struct instead of class
// to make all members public by default. The #pragma directive ensures
// that no padding bytes are inserted by the compiler into the layout of the
// classes defined.
#pragma pack(pop)
 
...
 
FILE *fp=fopen("inputfile","rb");
...
// assume we're now in the location where a weather record
// is expected.
WeatherRecord wr;
fread(&wr,sizeof(wr),1,fp);
...
Play with this until you're sure you've gotten it right (for instance, after reading a header block the idCode should have been put into place, etc.) Another subject you might have to take into account is endian-ness (whether numbers are stored from least significant to most significant byte or the other way around). Check if the numbers are consistent --if they are too large some endian-ness change might be needed.




Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
GeneralRe: Reading a Binary Data File Pin
Frankie Lee2-Jan-03 12:52
Frankie Lee2-Jan-03 12:52 
QuestionHow to show system menu in client area? Pin
Subrahmanyam2-Jan-03 3:19
Subrahmanyam2-Jan-03 3:19 
AnswerRe: How to show system menu in client area? Pin
Joaquín M López Muñoz2-Jan-03 4:06
Joaquín M López Muñoz2-Jan-03 4:06 
GeneralRe: How to show system menu in client area? Pin
Subrahmanyam2-Jan-03 4:38
Subrahmanyam2-Jan-03 4:38 
AnswerRe: How to show system menu in client area? Pin
56789012342-Jan-03 4:15
56789012342-Jan-03 4:15 
GeneralRe: How to show system menu in client area? Pin
Subrahmanyam2-Jan-03 4:43
Subrahmanyam2-Jan-03 4:43 
Generaluniq new filename Pin
JGranborg2-Jan-03 2:33
JGranborg2-Jan-03 2:33 
GeneralRe: uniq new filename Pin
Joaquín M López Muñoz2-Jan-03 2:56
Joaquín M López Muñoz2-Jan-03 2:56 
GeneralRe: uniq new filename Pin
JGranborg2-Jan-03 20:58
JGranborg2-Jan-03 20:58 
GeneralUTF-8 to UCS-2 conversion tool (both ways ) Pin
gracias_carol2-Jan-03 2:01
gracias_carol2-Jan-03 2:01 
QuestionFormatted input? Pin
Jamie Hale2-Jan-03 1:56
Jamie Hale2-Jan-03 1:56 
AnswerRe: Formatted input? Pin
Joaquín M López Muñoz2-Jan-03 2:18
Joaquín M López Muñoz2-Jan-03 2:18 
GeneralRe: Formatted input? Pin
Jamie Hale2-Jan-03 2:30
Jamie Hale2-Jan-03 2:30 
GeneralRe: Formatted input? Pin
Joaquín M López Muñoz2-Jan-03 2:52
Joaquín M López Muñoz2-Jan-03 2:52 
GeneralUpdating statusbar (in ChildFrm) in MDI-project Pin
2-Jan-03 1:33
suss2-Jan-03 1:33 
GeneralRe: Updating statusbar (in ChildFrm) in MDI-project Pin
RobJones2-Jan-03 2:15
RobJones2-Jan-03 2:15 
General' Multicolumn ' CMonthCalControl Pin
lbc2-Jan-03 1:05
lbc2-Jan-03 1:05 

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.