Re: CBitmapButton::LoadBitmap()
From: Joseph M. Newcomer (newcomer_at_flounder.com)
Date: 06/10/04
- Next message: Joseph M. Newcomer: "Re: HashTable in Dll Shared Memory"
- Previous message: Brendan Grant: "Communications Breakdown with CSocket"
- In reply to: May Young: "CBitmapButton::LoadBitmap()"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 10 Jun 2004 17:04:15 -0400
No, the button has already been created. All you are doing is loading its bitmaps. MFC
does not under and circumstances call CButton::Create; the button was created because it
appeared in the dialog template. In DoDataExchange, the existing button is associated with
a control variable.
joe
On Thu, 10 Jun 2004 11:59:25 -0700, May Young <tony@srac.com> wrote:
>Hi,
>
>I have a doubt about using CBitmapButton::LoadBitmap() in a dialog. In
>the dialog's OnInitDialog(), I have no problem using
>CBitmapButton::AutoLoad(). Since I pass "this" to AutoLoad(), I guess
>MFC will automatically call CButton::Create() for me.
>
>My question is how to use CBitmapButton::LoadBitmap(). MFC doesn't
>clearly document its usage. In my OnInitDialog(), I call LoadBitmap(),
>which doesn't require "this" as a parameter. Then when does MFC call
>CButton::Create()? Is it in the dialog's DoDataExchange(), where I
>associate the CBitmapButton member with its resource id? I worry that
>my CBitmapButton member doesn't correctly get created.
>
>Tony
Joseph M. Newcomer [MVP]
email: newcomer@flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
- Next message: Joseph M. Newcomer: "Re: HashTable in Dll Shared Memory"
- Previous message: Brendan Grant: "Communications Breakdown with CSocket"
- In reply to: May Young: "CBitmapButton::LoadBitmap()"
- Messages sorted by: [ date ] [ thread ]