- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
Link Copied
5 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This is a third attempt to get an attachment added....
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
...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
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
0_2 makes it an INTEGER(2) - if the argument is defined as that, specifying the kind avoids a compiler warning for a mismatch.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks, Steve.

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page