Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
29281 Discussions

How to get buttons to stack vertically in a Toolbar?

anthonyrichards
New Contributor III
773 Views
I use CVF6.6c on both W2K and WXPpro. I get the attached code excerpt to display a 3-button toolbar. ThePDF pics show a toolbar along the top (default, CCS_TOP style), a toolbar along the left hand edge (CCS_LEFT style)and a toolbar with CCS_NOPARENTALIGN style. I cannot get the buttons to stack up as expected on the vertical toolbar. Any suggestions.
P.S. The toolbar is created using CreateToolbarEx. I find that when trying to create it with more than one button, it fails to properly display the second and third buttons(see comments in the code), so I am reduced to creating the toolbar with one button, then adding the other two using SendMessage with TB_ADDBUTTONS message.)

Message Edited by anthonyrichards on 06-17-2005 03:38 AM

I am trying to add attachment....

Message Edited by anthonyrichards on 06-17-2005 03:39 AM

0 Kudos
5 Replies
anthonyrichards
New Contributor III
773 Views
This is a third attempt to get an attachment added....
0 Kudos
Jugoslav_Dujic
Valued Contributor II
773 Views
...but, alas, your attachment is not compilable as-is: *.bmp and generic.h are missing.

Try specifying TBSTYLE_WRAPABLE together with CCS_LEFT -- I didn't try it myself though; maybe it helps.

If it doesn't work, you should probably revert to the trick I used in XFTToolbar and in attached QWToolbar sample: use TBSTYLE_WRAPABLE and introduce an intermediary "host" window whose sole purpose is to force the toolbar to wrap vertically as desired. In QWToolbar, it's a simple child dialog which is resized on parent's WM_SIZE and all it does is to forward WM_NOTIFY/WM_COMMAND from the toolbar up to the parent.

HTH,
Jugoslav
0 Kudos
anthonyrichards
New Contributor III
773 Views
Sorry about the omissions. I have found the response of the toolbar size and location to the values entered for window origin and size in CreateWindowEx to be unpredictable. I just cannot seem to control it. The same goes for using CreateToolbarEx.
In passing, I am curious about the following code you have in XFTTOOLBAR, where a component labelled 'bReserved' of the DFWINTY-defined type T_TBBUTTON that follows the '.fsstyle' component in the definition:
Code:
DO i=1,SIZE(xButtons)
      tButton = T_TBBUTTON(xButtons(i)%iBitmap-1,  &
                           xButtons(i)%ID,         &
                           xButtons(i)%iState,     &
                           xButtons(i)%iStyle,     &
                           0_2,  &
                           0,                      &
                           0)
What is the '0_2' all about?
0 Kudos
Steven_L_Intel1
Employee
773 Views
0_2 makes it an INTEGER(2) - if the argument is defined as that, specifying the kind avoids a compiler warning for a mismatch.
0 Kudos
anthonyrichards
New Contributor III
773 Views
Thanks, Steve.
0 Kudos
Reply