Click here to Skip to main content
15,888,802 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Changing bitmaps using UpdateResource Pin
$motty24-Aug-06 8:18
$motty24-Aug-06 8:18 
GeneralRe: Changing bitmaps using UpdateResource Pin
Kharfax24-Aug-06 8:27
Kharfax24-Aug-06 8:27 
GeneralRe: Changing bitmaps using UpdateResource Pin
jk chan24-Aug-06 14:42
jk chan24-Aug-06 14:42 
GeneralRe: Changing bitmaps using UpdateResource Pin
Kharfax25-Aug-06 2:21
Kharfax25-Aug-06 2:21 
AnswerProblem solved Pin
Kharfax25-Aug-06 4:40
Kharfax25-Aug-06 4:40 
Questionmemcpy and memset on a structure which has a class as it's member Pin
Diagon Alley24-Aug-06 5:09
Diagon Alley24-Aug-06 5:09 
AnswerRe: memcpy and memset on a structure which has a class as it's member Pin
toxcct24-Aug-06 6:14
toxcct24-Aug-06 6:14 
AnswerRe: memcpy and memset on a structure which has a class as it's member Pin
cmk24-Aug-06 7:08
cmk24-Aug-06 7:08 
In your example both memcpy and memset would be fine.
You have no virtual methods (so no vtable), nor have you specified A/S as having any other complex data types.

If A/S has even 1 virtual method then, as mentioned, memset will hose the vtable.
Likewise if A/S contains any pointers to other A/S objects then memcpy will likely screw them up.

You can likely get around the memset problem by following it with a placement new call.
e.g.
memset(&struc1, 0, sizeof(S));
new(&struc1) S;


...cmk

Save the whales - collect the whole set

AnswerRe: memcpy and memset on a structure which has a class as it's member Pin
Zac Howland25-Aug-06 9:19
Zac Howland25-Aug-06 9:19 
AnswerThanks Guys! Pin
Diagon Alley29-Aug-06 18:58
Diagon Alley29-Aug-06 18:58 
QuestionChanging tray icon tooltip message Pin
samaruf24-Aug-06 5:01
samaruf24-Aug-06 5:01 
AnswerRe: Changing tray icon tooltip message Pin
Waldermort24-Aug-06 7:55
Waldermort24-Aug-06 7:55 
GeneralRe: Changing tray icon tooltip message Pin
ThatsAlok24-Aug-06 18:10
ThatsAlok24-Aug-06 18:10 
GeneralRe: Changing tray icon tooltip message Pin
Waldermort24-Aug-06 22:54
Waldermort24-Aug-06 22:54 
QuestionConfussion with Assigning an applications's process priority [modified] Pin
kitty524-Aug-06 5:01
kitty524-Aug-06 5:01 
AnswerRe: Confussion with Assigning an applications's process priority Pin
Waldermort24-Aug-06 7:47
Waldermort24-Aug-06 7:47 
Questionwave file bandpass filter (with FFT?) Pin
ilFrate24-Aug-06 3:39
ilFrate24-Aug-06 3:39 
AnswerRe: wave file bandpass filter (with FFT?) Pin
Jun Du24-Aug-06 7:11
Jun Du24-Aug-06 7:11 
GeneralRe: wave file bandpass filter (with FFT?) Pin
ilFrate24-Aug-06 21:43
ilFrate24-Aug-06 21:43 
QuestionTemplate specialization with static data member Pin
tuxyboy24-Aug-06 3:09
tuxyboy24-Aug-06 3:09 
QuestionBitmap transparency at picture_control [modified] Pin
Jarley D.G.24-Aug-06 2:52
Jarley D.G.24-Aug-06 2:52 
AnswerRe: Bitmap transparency at picture_control Pin
KarstenK24-Aug-06 3:36
mveKarstenK24-Aug-06 3:36 
AnswerRe: Bitmap transparency at picture_control Pin
Waldermort24-Aug-06 4:11
Waldermort24-Aug-06 4:11 
AnswerRe: Bitmap transparency at picture_control Pin
Justin Tay24-Aug-06 4:25
Justin Tay24-Aug-06 4:25 
GeneralRe: Bitmap transparency at picture_control Pin
Jarley D.G.24-Aug-06 5:26
Jarley D.G.24-Aug-06 5:26 

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.