Click here to Skip to main content
15,898,581 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: setting Timeout ..Please help me out Pin
Marc Soleda26-Jul-05 1:21
Marc Soleda26-Jul-05 1:21 
GeneralRe: setting Timeout ..Please help me out Pin
Smith#26-Jul-05 1:24
Smith#26-Jul-05 1:24 
GeneralRe: setting Timeout ..Please help me out Pin
Marc Soleda26-Jul-05 1:34
Marc Soleda26-Jul-05 1:34 
GeneralRe: setting Timeout ..Please help me out Pin
David Crow26-Jul-05 3:06
David Crow26-Jul-05 3:06 
GeneralXML parsing using C++ Pin
72arpita25-Jul-05 22:47
72arpita25-Jul-05 22:47 
GeneralRe: XML parsing using C++ Pin
Marc Soleda25-Jul-05 23:27
Marc Soleda25-Jul-05 23:27 
GeneralRe: XML parsing using C++ Pin
Marc Soleda26-Jul-05 1:02
Marc Soleda26-Jul-05 1:02 
QuestionHow to SubClass a checkbox on a DialogBar Pin
Ray Guan25-Jul-05 22:34
Ray Guan25-Jul-05 22:34 
hi, all
a problem trouble me for a long time. Dead | X|
and i have been looking for the answer for a long time.
but i still can't solve it,i hope somebody can give me a
little suggestion. thanks in advance.

my dev platform: MFC 7 & Windows Server 2003
my question:

i want to subclass my checkbox on a dialogbar, and load my bitmap
to the checkbox's face.

all of my checkbox were set to push like style here
owner-draw mode was set to true .

in headfile MyDialogBar.h
====================================================
CBitmapButton m_btnCheck;<br />
BOOL InitButtons();

====================================================

in cppfile MyDialogBar.cpp
====================================================
BOOL CMyDialogBar::InitButtons()<br />
{<br />
   <pre>     m_btnCheck.SubclassDlgItem(IDC_TOOLBTN_SELECT, this);<br />
	m_btnCheck.LoadBitmaps(IDB_BITMAP_ICON_SELECT);</pre><br />
}

====================================================

in headfile MainFrm.h
====================================================
CMyDialogBar m_myDlgbar;
====================================================

in cppfile MainFrm.cpp
====================================================
int CMainFrm::OnCreate(...)<br />
{<br />
<pre>	if(!m_myDlgbar.Create(...))<br />
        {<br />
           TRACE0("sorry >_< ");<br />
           return -1;<br />
        };	<br />
	m_myDlgbar.InitButtons();</pre><br />
}

====================================================

Notes:
IDB_BITMAP_ICON_SELECT is a ID of bitmap resource file created by resource editor , i want this bitmap loaded on the checkbox button.

IDC_TOOLBTN_SELECT is the ID of the CheckBox

the checkbox can works fine, but i just cannot put my bitmap on it. why??
Confused | :confused: Confused | :confused:
i used to subclass my checkbox and load a bitmap on its face for many times
in common dialog application , there is no problems. why i use it in dialogbar, it doesn't work, and no error occured , the checkbox button works
fine.Confused | :confused:

i found something seems to be useful on MS KB, i rewrite my code , and it still does not work, D'Oh! | :doh:
http://support.microsoft.com/kb/185672

anybody here met this problems before?
can you get me out of this swampCry | :(( ? can anybody post some related sample code or links here ? thank you very much Wink | ;)

any suggestion should be appreciated!Smile | :) Rose | [Rose]


sincerely,
nickong

Today is a gift, that's why we call it present
AnswerRe: How to SubClass a checkbox on a DialogBar Pin
Ray Guan26-Jul-05 15:37
Ray Guan26-Jul-05 15:37 
GeneralKerberos SSPI fails to mutually authenticate Pin
marshman25-Jul-05 22:14
marshman25-Jul-05 22:14 
GeneralBackground Color List View Pin
zilnus_free25-Jul-05 21:38
zilnus_free25-Jul-05 21:38 
Generalproblems while showing text on Bitmap(modified Pin
a_david12325-Jul-05 19:34
a_david12325-Jul-05 19:34 
GeneralRe: problems while showing text on Bitmap Pin
Jose Lamas Rios25-Jul-05 20:00
Jose Lamas Rios25-Jul-05 20:00 
Generalidentifying windows subsystem Pin
Chintoo72325-Jul-05 19:17
Chintoo72325-Jul-05 19:17 
GeneralRe: identifying windows subsystem Pin
Jose Lamas Rios25-Jul-05 19:54
Jose Lamas Rios25-Jul-05 19:54 
GeneralRe: identifying windows subsystem Pin
Chintoo72325-Jul-05 20:25
Chintoo72325-Jul-05 20:25 
GeneralRe: identifying windows subsystem Pin
Jose Lamas Rios25-Jul-05 20:33
Jose Lamas Rios25-Jul-05 20:33 
GeneralRe: identifying windows subsystem Pin
Jose Lamas Rios25-Jul-05 20:45
Jose Lamas Rios25-Jul-05 20:45 
GeneralRe: identifying windows subsystem Pin
David Crow26-Jul-05 3:18
David Crow26-Jul-05 3:18 
GeneralHelp on handling of ActiveX event Pin
Anonymous25-Jul-05 14:22
Anonymous25-Jul-05 14:22 
GeneralRe: Help on handling of ActiveX event (more info) Pin
Anonymous25-Jul-05 14:27
Anonymous25-Jul-05 14:27 
GeneralRe: Help on handling of ActiveX event Pin
Jose Lamas Rios25-Jul-05 20:15
Jose Lamas Rios25-Jul-05 20:15 
GeneralRe: Help on handling of ActiveX event Pin
Tom Archer26-Jul-05 7:48
Tom Archer26-Jul-05 7:48 
GeneralOpening a document (MDI) Pin
vasanth100425-Jul-05 13:06
vasanth100425-Jul-05 13:06 
GeneralRe: Opening a document (MDI) Pin
Jose Lamas Rios25-Jul-05 20:27
Jose Lamas Rios25-Jul-05 20:27 

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.