Click here to Skip to main content
15,889,281 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionRe: Indata validation char* input Pin
CPallini24-Apr-12 0:58
mveCPallini24-Apr-12 0:58 
QuestionIncorrect output of sum Pin
Ron120223-Apr-12 21:28
Ron120223-Apr-12 21:28 
Question[SOLVED] Loading Bitmap Into Picture Control Pin
AmbiguousName23-Apr-12 18:57
AmbiguousName23-Apr-12 18:57 
AnswerRe: Loading Bitmap Into Picture Control Pin
enhzflep23-Apr-12 22:49
enhzflep23-Apr-12 22:49 
AnswerRe: Loading Bitmap Into Picture Control Pin
AmbiguousName23-Apr-12 23:28
AmbiguousName23-Apr-12 23:28 
AnswerRe: Loading Bitmap Into Picture Control Pin
SandipG 23-Apr-12 22:51
SandipG 23-Apr-12 22:51 
AnswerRe: Loading Bitmap Into Picture Control Pin
AmbiguousName23-Apr-12 23:31
AmbiguousName23-Apr-12 23:31 
GeneralRe: Loading Bitmap Into Picture Control Pin
enhzflep24-Apr-12 0:54
enhzflep24-Apr-12 0:54 
Yeah, but what SandipG was getting at is you have a memory leak - you load both images each time the button gets pressed.

You're better off making HBITMAP bitmap[2]; a member variable of the dialog instead of local variables in the button press-code. Then you load both images in OnInitDialog.
In the button-press handler you work out which image to display then display it.

That way, you only call LoadImage once per image. Smile | :)
GeneralRe: Loading Bitmap Into Picture Control Pin
AmbiguousName24-Apr-12 1:02
AmbiguousName24-Apr-12 1:02 
QuestionThe entry point GetFileVersionInfoSizeEx Pin
jkirkerx23-Apr-12 13:23
professionaljkirkerx23-Apr-12 13:23 
AnswerRe: The entry point GetFileVersionInfoSizeEx Pin
Richard Andrew x6423-Apr-12 14:02
professionalRichard Andrew x6423-Apr-12 14:02 
GeneralRe: The entry point GetFileVersionInfoSizeEx Pin
jkirkerx23-Apr-12 15:10
professionaljkirkerx23-Apr-12 15:10 
GeneralRe: The entry point GetFileVersionInfoSizeEx Pin
JohnCz24-Apr-12 9:29
JohnCz24-Apr-12 9:29 
GeneralRe: The entry point GetFileVersionInfoSizeEx Pin
jkirkerx24-Apr-12 10:11
professionaljkirkerx24-Apr-12 10:11 
AnswerRe: The entry point GetFileVersionInfoSizeEx Pin
JohnCz25-Apr-12 1:15
JohnCz25-Apr-12 1:15 
GeneralRe: The entry point GetFileVersionInfoSizeEx Pin
jkirkerx25-Apr-12 6:11
professionaljkirkerx25-Apr-12 6:11 
GeneralRe: The entry point GetFileVersionInfoSizeEx Pin
JohnCz25-Apr-12 8:04
JohnCz25-Apr-12 8:04 
GeneralRe: The entry point GetFileVersionInfoSizeEx Pin
jkirkerx25-Apr-12 9:10
professionaljkirkerx25-Apr-12 9:10 
QuestionTabControl In MFC Pin
002comp22-Apr-12 23:59
002comp22-Apr-12 23:59 
AnswerRe: TabControl In MFC Pin
Chandrasekharan P23-Apr-12 0:04
Chandrasekharan P23-Apr-12 0:04 
GeneralRe: TabControl In MFC Pin
002comp23-Apr-12 0:57
002comp23-Apr-12 0:57 
GeneralRe: TabControl In MFC Pin
Richard MacCutchan23-Apr-12 1:54
mveRichard MacCutchan23-Apr-12 1:54 
GeneralRe: TabControl In MFC Pin
JohnCz24-Apr-12 2:13
JohnCz24-Apr-12 2:13 
QuestionWhat does #pragma pack(0) do Pin
yu-jian22-Apr-12 6:28
yu-jian22-Apr-12 6:28 
AnswerRe: What does #pragma pack(0) do Pin
Chris Losinger22-Apr-12 6:39
professionalChris Losinger22-Apr-12 6:39 

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.