Click here to Skip to main content
15,921,062 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionExport String in .txt file Pin
Shah Satish8-Mar-07 2:22
Shah Satish8-Mar-07 2:22 
AnswerRe: Export String in .txt file Pin
toxcct8-Mar-07 2:26
toxcct8-Mar-07 2:26 
AnswerRe: Export String in .txt file Pin
prasad_som8-Mar-07 2:54
prasad_som8-Mar-07 2:54 
Questiongetting Linking Error while compling Simple Device Manager Pin
VC_RYK8-Mar-07 2:19
VC_RYK8-Mar-07 2:19 
AnswerRe: getting Linking Error while compling Simple Device Manager Pin
prasad_som8-Mar-07 4:19
prasad_som8-Mar-07 4:19 
AnswerRe: getting Linking Error while compling Simple Device Manager Pin
Mark Salsbery8-Mar-07 6:25
Mark Salsbery8-Mar-07 6:25 
GeneralRe: getting Linking Error while compling Simple Device Manager Pin
VC_RYK9-Mar-07 0:47
VC_RYK9-Mar-07 0:47 
Questioncopy structures to buffer Pin
Zapacila8-Mar-07 2:03
Zapacila8-Mar-07 2:03 
Hi
I have this BITMAPINFO and BITMAPHEADERFILE structures

BITMAPINFO *Bitmap = NULL; // lets say that they are initialized corectly and with data in it
BITMAPFILEHEADER bfh;
int Lenght; // the imagize size

char * buff=new char[sizeof(Bitmap)+sizeof(bfh)]; create a buffer
memcpy(buff, &bfh, sizeof(bfh)); // copy bitmap header into it
memcpy(buff+sizeof(bfh), Bitmap, Length); // then copy the bitmapinfo into it and //error

what do i do wrong..
i want to but the bits of those structures into a buffer : thats what he does here:

File.Write(&bfh,sizeof(bfh));
File.Write(Bitmap,Length);
File.Close();

and workd greath..

i assume it similar only that he copies them into HDD

anybody? thanks
AnswerRe: copy structures to buffer Pin
krmed8-Mar-07 2:48
krmed8-Mar-07 2:48 
QuestionRe: copy structures to buffer Pin
David Crow8-Mar-07 3:02
David Crow8-Mar-07 3:02 
AnswerRe: copy structures to buffer Pin
Zapacila8-Mar-07 4:05
Zapacila8-Mar-07 4:05 
GeneralRe: copy structures to buffer Pin
David Crow8-Mar-07 4:11
David Crow8-Mar-07 4:11 
QuestionRe: copy structures to buffer Pin
David Crow8-Mar-07 4:16
David Crow8-Mar-07 4:16 
QuestionNeed help to set window style! Pin
bosfan8-Mar-07 1:49
bosfan8-Mar-07 1:49 
AnswerRe: Need help to set window style! Pin
Jun Du8-Mar-07 2:01
Jun Du8-Mar-07 2:01 
GeneralRe: Need help to set window style! Pin
bosfan8-Mar-07 3:08
bosfan8-Mar-07 3:08 
GeneralRe: Need help to set window style! Pin
Jun Du8-Mar-07 5:21
Jun Du8-Mar-07 5:21 
AnswerRe: Need help to set window style! Pin
_AnsHUMAN_ 8-Mar-07 2:10
_AnsHUMAN_ 8-Mar-07 2:10 
GeneralRe: Need help to set window style! Pin
David Crow8-Mar-07 3:05
David Crow8-Mar-07 3:05 
GeneralRe: Need help to set window style! Pin
bosfan8-Mar-07 3:07
bosfan8-Mar-07 3:07 
GeneralRe: Need help to set window style! Pin
David Crow8-Mar-07 3:17
David Crow8-Mar-07 3:17 
GeneralRe: Need help to set window style! Pin
bosfan8-Mar-07 3:06
bosfan8-Mar-07 3:06 
AnswerRe: Need help to set window style! Pin
Paresh Chitte8-Mar-07 17:12
Paresh Chitte8-Mar-07 17:12 
QuestionMixed UCS-2 and 1-byte ASCII characters Pin
jones1668-Mar-07 1:41
jones1668-Mar-07 1:41 
AnswerRe: Mixed UCS-2 and 1-byte ASCII characters Pin
Nemanja Trifunovic8-Mar-07 1:51
Nemanja Trifunovic8-Mar-07 1:51 

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.