Problem using DIalogBar
-
When I'm using a DialogBar, with controls on it (particulartly Frames, and Buttons)..... do standard procdedures using a dialogBar in a Doc/View application, make a dialogresource, set an ID for the dialog bar, ID's for the controls...etc... When I implement the code for the button in a dialogbar it works fine.. but when i implement code for a frame control(the message map in CLASSWIZARD is only BN_CLICKED), when i click on the frame when i run the program, it doesn't get executed... How come when iclick on the button control in the dialogbar something gets executed, but when i click on the frame control, nothing gets executed?? is this a bug in Visual C??
AFAIK, buttons send messages to their parent window, not their owner. (when a dialog bar is not docked, it's parent is no longer the frame window; instead it is a child of a mini-frame created to float it) You'll have derive a class CDialogBar and put the code to handle the button press in that. Then you can forward it on to your frame window if necessary. And if words were wisdom, I'd be talking even more.
The Offspring, I Choose
-
AFAIK, buttons send messages to their parent window, not their owner. (when a dialog bar is not docked, it's parent is no longer the frame window; instead it is a child of a mini-frame created to float it) You'll have derive a class CDialogBar and put the code to handle the button press in that. Then you can forward it on to your frame window if necessary. And if words were wisdom, I'd be talking even more.
The Offspring, I Choose
-
Actually the messges of my buttons in my Dialog Bars works fine...even if the dialog bar is docked or floating but the messges of the Frame Controls in the Dialog Bar doesn't.... How do I forward messages to my FrameWIndow??
Sorry, i'm misunderstanding you. Do you mean the controls on the frame, like the close or maximize buttons, or do you mean a STATIC control drawing an etched frame w/ in the dialog bar? And if words were wisdom, I'd be talking even more.
The Offspring, I Choose
-
AFAIK, buttons send messages to their parent window, not their owner. (when a dialog bar is not docked, it's parent is no longer the frame window; instead it is a child of a mini-frame created to float it) You'll have derive a class CDialogBar and put the code to handle the button press in that. Then you can forward it on to your frame window if necessary. And if words were wisdom, I'd be talking even more.
The Offspring, I Choose
For your information, I made a DialogBar resource template... set the DialogBar's ID, the the button control's ID, and the frame control's ID, after that I go to ClassWizard, and asks me if i want to make a new class or select from an existing class.... I chose cancel and go thruh classwizard anyway.... i don't make a new class... I get my messages thru the ID's.....
-
When I'm using a DialogBar, with controls on it (particulartly Frames, and Buttons)..... do standard procdedures using a dialogBar in a Doc/View application, make a dialogresource, set an ID for the dialog bar, ID's for the controls...etc... When I implement the code for the button in a dialogbar it works fine.. but when i implement code for a frame control(the message map in CLASSWIZARD is only BN_CLICKED), when i click on the frame when i run the program, it doesn't get executed... How come when iclick on the button control in the dialogbar something gets executed, but when i click on the frame control, nothing gets executed?? is this a bug in Visual C??
If you look in CodeGuru (sorry..) you'll find a dicussion of a "CInitDialogBar" class which solves just this sort of problem... Cheers, Dave Carkeet.
-
Sorry, i'm misunderstanding you. Do you mean the controls on the frame, like the close or maximize buttons, or do you mean a STATIC control drawing an etched frame w/ in the dialog bar? And if words were wisdom, I'd be talking even more.
The Offspring, I Choose
-
I mean the Static Control drawing an etched frame within the dialog bar.... when you make a dialog resource, VS has toolbars that lets you draw any kinds of controls in the dialog resource.... The toolbar button that says picture control....
Ok, i understand now. These controls are usually not used for input, so i was confused. Anyway, make sure that
SS_NOTIFY
is set; you'll then get messages when the user clicks or double-clicks on the control. Not too much else you can do with a frame, really._**Sometimes I only remember, The days when i was young
Nowadays no one remembers when they were young and stupid...**_
ADEMA, The Way You Like It
-
Ok, i understand now. These controls are usually not used for input, so i was confused. Anyway, make sure that
SS_NOTIFY
is set; you'll then get messages when the user clicks or double-clicks on the control. Not too much else you can do with a frame, really._**Sometimes I only remember, The days when i was young
Nowadays no one remembers when they were young and stupid...**_
ADEMA, The Way You Like It
-
OK... how do I use SS_NOTIFY??... i just encountered SS_NOTIFY?? sorry, i'm a bit new VC....:) I'm using it for output and Feedback...... so i need to draw to the frame control manually through code....
In the dialog editor, bring up properties for the frame. On one of the pages (i forget which) there is a "notify" option._**
Sometimes I only remember, The days when i was young
Nowadays no one remembers when they were young and stupid...**_
ADEMA, The Way You Like It
-
In the dialog editor, bring up properties for the frame. On one of the pages (i forget which) there is a "notify" option._**
Sometimes I only remember, The days when i was young
Nowadays no one remembers when they were young and stupid...**_
ADEMA, The Way You Like It