Click here to Skip to main content
15,900,511 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: How to check folder last access time? Pin
David Crow7-Jul-05 7:48
David Crow7-Jul-05 7:48 
Generalcheckbox check problem Pin
c. s.7-Jul-05 7:11
c. s.7-Jul-05 7:11 
GeneralRe: checkbox check problem Pin
David Crow7-Jul-05 7:32
David Crow7-Jul-05 7:32 
GeneralRe: checkbox check problem Pin
c. s.7-Jul-05 7:49
c. s.7-Jul-05 7:49 
GeneralRe: checkbox check problem Pin
David Crow7-Jul-05 8:02
David Crow7-Jul-05 8:02 
GeneralRe: checkbox check problem Pin
c. s.7-Jul-05 8:09
c. s.7-Jul-05 8:09 
GeneralRe: checkbox check problem Pin
David Crow7-Jul-05 8:14
David Crow7-Jul-05 8:14 
GeneralRe: checkbox check problem Pin
Jose Lamas Rios7-Jul-05 8:08
Jose Lamas Rios7-Jul-05 8:08 
c. s. wrote:
hTempWnd = CreateWindowEx (
0, // no extended style
"Button",
"Compression", // toggles chunk compression
WS_VISIBLE | WS_CHILD | BS_OWNERDRAW, // make a visible child window, that we draw ourself (see void DrawCheckbox)
clientRect.right - MM_DBUTTON_WIDTH - MMPADDING_RIGHT, // create it near the top right corner
clientRect.top + MMPADDING_TOP + MM_GROUPPADDING_BOTTOM,
MM_DBUTTON_WIDTH, MM_DBUTTON_HEIGHT, // use our standard checkbox button height and width
hWnd, // our parent window is this popup menu
(HMENU) MMENU_BUTTON_COMPRESSION,
GetModuleHandle ( NULL ),
NULL // pass no extra parms on creation
) ;


According to this[^], an owner-drawn button "has no predefined appearance or usage. Its purpose is to provide a button whose appearance and behavior are defined by the application alone."

Furthermore, your call to Create isn't even specifying one of the possible check box styles (BS_CHECKBOX, BS_AUTOCHECKBOX, BS_3STATE, BS_AUTO3STATE), so it's no wonder the control doesn't react to BM_SETCHECK messages. Try adding BS_CHECKBOX, and if that doesn't work (which may be due because of the owner draw style), I suggest subclassing the control so that you can handle the BM_GETCHECK and BM_SETCHECK messages yourself.

Hope that helps,

--
jlr
http://jlamas.blogspot.com/[^]
GeneralRe: checkbox check problem Pin
David Crow7-Jul-05 8:15
David Crow7-Jul-05 8:15 
GeneralRe: checkbox check problem Pin
Jose Lamas Rios7-Jul-05 8:20
Jose Lamas Rios7-Jul-05 8:20 
GeneralRe: checkbox check problem Pin
c. s.7-Jul-05 8:18
c. s.7-Jul-05 8:18 
GeneralRe: checkbox check problem Pin
Jose Lamas Rios7-Jul-05 8:40
Jose Lamas Rios7-Jul-05 8:40 
GeneralScroll Messages from ListCtrl Pin
Jethro637-Jul-05 7:08
Jethro637-Jul-05 7:08 
GeneralRe: Scroll Messages from ListCtrl Pin
Jose Lamas Rios7-Jul-05 8:13
Jose Lamas Rios7-Jul-05 8:13 
GeneralRe: Scroll Messages from ListCtrl Pin
Jethro637-Jul-05 9:52
Jethro637-Jul-05 9:52 
GeneralRe: Scroll Messages from ListCtrl Pin
Jose Lamas Rios7-Jul-05 10:05
Jose Lamas Rios7-Jul-05 10:05 
GeneralRe: Scroll Messages from ListCtrl Pin
Jethro637-Jul-05 15:39
Jethro637-Jul-05 15:39 
GeneralRe: Scroll Messages from ListCtrl Pin
Jose Lamas Rios7-Jul-05 15:57
Jose Lamas Rios7-Jul-05 15:57 
GeneralRe: Scroll Messages from ListCtrl Pin
Jethro637-Jul-05 16:04
Jethro637-Jul-05 16:04 
Generalmenu check problem Pin
Tom Wright7-Jul-05 6:56
Tom Wright7-Jul-05 6:56 
GeneralRe: menu check problem Pin
Jose Lamas Rios7-Jul-05 8:31
Jose Lamas Rios7-Jul-05 8:31 
GeneralRe: menu check problem Pin
Tom Wright7-Jul-05 11:00
Tom Wright7-Jul-05 11:00 
GeneralFTP Download Pin
Ash817-Jul-05 6:35
Ash817-Jul-05 6:35 
GeneralCommunication between class Pin
antoine_david7-Jul-05 5:34
antoine_david7-Jul-05 5:34 
GeneralRe: Communication between class Pin
David Crow7-Jul-05 5:43
David Crow7-Jul-05 5:43 

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.