Click here to Skip to main content
15,912,507 members
Home / Discussions / Article Writing
   

Article Writing

 
GeneralSome problem when hosting WebBrowser control in an application Pin
25-Mar-01 21:12
suss25-Mar-01 21:12 
GeneralBitmaps and Static Controls Pin
24-Mar-01 4:33
suss24-Mar-01 4:33 
GeneralRe: Bitmaps and Static Controls Pin
Christian Graus24-Mar-01 10:22
protectorChristian Graus24-Mar-01 10:22 
GeneralCRC-32 LIBRARY Pin
Marek Švantner23-Mar-01 7:55
Marek Švantner23-Mar-01 7:55 
GeneralRe: CRC-32 LIBRARY Pin
Rui Lopes23-Mar-01 8:24
Rui Lopes23-Mar-01 8:24 
GeneralRe: CRC-32 LIBRARY Pin
Leo Moll23-Mar-01 8:24
Leo Moll23-Mar-01 8:24 
GeneralReading the file which is given for printing Pin
22-Mar-01 0:24
suss22-Mar-01 0:24 
GeneralON_COMMAND_UI for Dialog Tutorial/Example Pin
Matt Philmon21-Mar-01 9:51
Matt Philmon21-Mar-01 9:51 
I have an MFC Dialog based application. Using other code samples I added a toolbar to my dialog and added support for the tooltips, etc. It works great. I have a couple instances where I need to disable some of the buttons on the toolbar. I figured out a way to do this with using CToolBar::GetToolBarCtrl function and using the SetState function with the indeterminate flag. However, all my reading suggests that the proper way to do this is to use ON_COMMAND_UI for the button I want to disable.

Well, ON_COMMAND_UI needs a CFrame to work correctly. For a dialog, the ON_COMMAND_UI handlers you set up for each button on the toolbar is never even called so I can't call the pCmdUI->Enable(false) to disable the item. If you are writing a dialog based app (as I am) your best bet currently appears to be to use WM_KICKIDLE instead. However, that doesn't give me the ON_COMMAND_UI handler I need (the CCmdUI pointer). I could use OnKickIdle and call the OnCommandIUI handlers myself creating and passing a pointer to a CCmdUI object I populate myself but I can't seem to get this to work.

Could someone tell me the proper way and demonstrate fully? I've tried so many different things without success and while my hack(?) appears to work, I'd like to do it the proper way.

Thanks.
Matt Philmon
GeneralRe: ON_COMMAND_UI for Dialog Tutorial/Example Pin
Michael Dunn22-Mar-01 6:21
sitebuilderMichael Dunn22-Mar-01 6:21 
GeneralRe: ON_COMMAND_UI for Dialog Tutorial/Example Pin
Matt Philmon22-Mar-01 14:02
Matt Philmon22-Mar-01 14:02 
GeneralShared files info Pin
20-Mar-01 14:54
suss20-Mar-01 14:54 
QuestionDatasource - how to make? Pin
11-Mar-01 4:37
suss11-Mar-01 4:37 
AnswerRe: Datasource - how to make? Pin
Attila Hajdrik11-Mar-01 9:01
Attila Hajdrik11-Mar-01 9:01 
GeneralChanging windows hostname and updating DNS immediately. Pin
Paul Freebourne7-Mar-01 4:59
Paul Freebourne7-Mar-01 4:59 
GeneralIs there an alternative to CMC mail Pin
Steve Thresher6-Mar-01 4:45
Steve Thresher6-Mar-01 4:45 
GeneralATL, subclassed ListBox Pin
4-Mar-01 6:47
suss4-Mar-01 6:47 
GeneralRe: ATL, subclassed ListBox Pin
Beaker5-Mar-01 21:18
Beaker5-Mar-01 21:18 
GeneralRe: ATL, subclassed ListBox Pin
6-Mar-01 1:25
suss6-Mar-01 1:25 
GeneralA tutorial for an ATL COM object using connection points with an MFC app Pin
Matt Philmon2-Mar-01 16:43
Matt Philmon2-Mar-01 16:43 
GeneralRe: A tutorial for an ATL COM object using connection points with an MFC app Pin
Matt Philmon23-Mar-01 18:22
Matt Philmon23-Mar-01 18:22 
GeneralNeed information about Calendar & Tasks databases in Windows CE Pin
28-Feb-01 9:11
suss28-Feb-01 9:11 
GeneralHelp:The location of a car's nember tag in a image Pin
28-Feb-01 2:50
suss28-Feb-01 2:50 
GeneralATL Script Engine Pin
26-Feb-01 23:45
suss26-Feb-01 23:45 
GeneralSerial Port Access in VB Pin
Alok Pradhan26-Feb-01 17:05
Alok Pradhan26-Feb-01 17:05 
GeneralRe: Serial Port Access in VB Pin
15-Mar-01 9:26
suss15-Mar-01 9: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.