Yes, I have a question. You see I have a Flat Style Toolbar inside a Rebar Control. I would like to "imitate" the Windows explorer style Menu (The top band of your Explorer Rebar), but I can only have ONE button width and ONE text string on the Toolbar. I have a TBBUTTON structure loaded without the string, and when the Toolbar is created (Using CreateToolbarEx) I point it to that Structure and i use TB_ADDSTRING message to add the string to the button. It all works fine, up and until i have more then ONE string that i would like in the Toolbar control. For example I would like a button with the &File string and a set width for that button, and then another button in the control with the F&avorites string on it and it should have its own width(diffrent from the &File button). I have tried TBBUTTONONFO but looks like my Windows.inc does not have the Structure set out with its appropiate commands. I have Iczelion's latest edition of the include file. So is there ***ANYBODY*** that can help me!!!!!!

reply here or E-M@il me Prozen@yahoo.com

THANX
Posted on 2001-07-26 05:51:00 by Black iCE
Afternoon, Black Ice.

Have you set 'TBSTYLE_AUTOSIZE' as a style for the TBButtons?

Source: Current Platform SDK:
Specifies that the toolbar control should not assign the standard width to the button. Instead, the button's width will be calculated based on the width of the text plus the image of the button.
:)

Cheers,
Scronty
Posted on 2001-07-26 08:39:29 by Scronty
Thanx, i will try that!!
Posted on 2001-07-27 04:15:46 by Black iCE
How do you make a flat toolbar ?

(s)
Posted on 2001-07-27 05:08:45 by (scalp)
Afternoon, (Scalp).

Try the 'TBSTYLE_FLAT' style.
I haven't tried this myself, however the info was easy to find in the Help file under 'Toolbar Control and Button Styles'.:)

Source: Current Platform SDK:
Creates a flat toolbar. In a flat toolbar, both the toolbar and the buttons are transparent and hot-tracking is enabled. Button text appears under button bitmaps. To prevent repainting problems, this style should be set before the toolbar control becomes visible.


Cheers,
Scronty
Posted on 2001-07-27 05:58:37 by Scronty
Hi, last time i posted i asked to how could i set a varied width for a toolbar. But now i would like to Know: Where would i find the "back","forward" & "up" icons. Are there STD_XXXX constants. i would like to make my program compatable with windows9x,NT,ME,XP(Whistler). So my program will have the same icons from the system on any WOS(windows operating system) that has IE4 on it. :alright:

Black iCE
Posted on 2001-07-30 03:03:39 by Black iCE
Afternoon, Black Ice.

Use this to obtain explorer system-defined piccys:


.DATA

HIST_BACK EQU 0
HIST_FORWARD EQU 1
HIST_FAVORITES EQU 2
HIST_ADDTOFAVORITES EQU 3
HIST_VIEWTREE EQU 4

IDB_HIST_SMALL_COLOR EQU 8
IDB_HIST_LARGE_COLOR EQU 9

.CODE
LOCAL Tba :TBADDBITMAP
mov Tba.hInst, HINST_COMMCTRL
mov Tba.nID, IDB_HIST_SMALL_COLOR
invoke SendMessage,hToolBar,TB_ADDBITMAP,1,ADDR Tba



Then you can use these for choosing the bitmaps:

HIST_ADDTOFAVORITES Add to favorites.
HIST_BACK Move back.
HIST_FAVORITES Open favorites folder.
HIST_FORWARD Move forward.
HIST_VIEWTREE View tree

e.g.:


mov tbb.iBitmap, HIST_BACK
mov tbb.idCommand, 51
mov tbb.fsStyle, TBSTYLE_BUTTON
invoke SendMessage,hToolBar,TB_ADDBUTTONS,1,ADDR tbb


These piccys are not very nice.
You may have to extract the nice ones from their '*.exe' or '*.dll' file. However, if this is done 'on the fly', your proggy won't work correctly on a PC which doesn't have the appropriate '*.exe' or '*.dll'.:mad:

Or, you could take a screen shot with IE4 open, paste the piccy into a paint proggy, and cut out your own bitmaps.:alright:

Cheers,
Scronty
Posted on 2001-07-30 05:20:23 by Scronty
A must have tool to acquire dialogs, icons, bmps and the like
from other programs on your machine is a freeware program
called Resource Hacker.

Heres the link I used: Resource Hacker download site.
Posted on 2001-07-30 06:08:06 by bcraven
BTW, I saw that Windows insert a separator in the first place of toolbar I've created. Does this happend to everybody ?
It's not a problem since there is a BUTTONDELETE fonction, but.... it's wierd !

(s)
Posted on 2001-07-30 09:15:46 by (scalp)
:grin:
Scronty, Thanx.

:confused:
I always have a question, u see i have made that menu toolbar but know i would like to know how does one go about to use the command identifyer of the button and display a menu(not dropdown) with a handle of HMENU.

:rolleyes:
PS. Have anyone seen Windows XP's IU!!! Now that is a UI that i
like.
Posted on 2001-07-31 02:31:07 by Black iCE
Hi there everyone.

I have used Resource Hacker (Thanx bcraven) to find the dll that seems to have all of those resources that i would like to include into my progg.(DLL: BROWSEUI.dll in your windows system directory, NT & 9x). Now there are multipal toolbar buttons but i would like to use one in say one toolbar bitmap and another in a other toolbar bitmap. I have loaded the dll sucessfully into my progg by using the API LoadLibaryEx.

So how would one go about and extract certain button bitmaps from the dll in runtime?

PS. To Scronty: Thanx for the help and right those icons do suc but those same icons are also stored inside the DLL i am speaking about, so why would Microsoft allow Developers get the stupid icons and store the cool ones inside the same dll? (Stupid according to me if we, the Developers, are premoting their os by desighning software for their Windows.):stupid:

Black iCE :confused:

Oh, i am still working on that HMENU question of mine....
Posted on 2001-08-13 09:52:47 by Black iCE
PS. Have anyone seen Windows XP's IU!!! Now that is a UI that i
like.


What do u find so good abt OfficeXP's interface? I dont find too much difference rather than the menus have become white instead of gray and it runs much slower:grin:
Posted on 2001-08-13 14:52:05 by MovingFulcrum
Afternoon, Black Ice.

I'm unsure of your question.:grin:
how does one go about to use the command identifyer of the button and display a menu(not dropdown) with a handle of HMENU.

Are you asking 'How to create a Pop-up Menu when a Tool-bar Button is pressed?' ?

Cheers,
Scronty
Posted on 2001-08-13 17:56:46 by Scronty
Scronty : Sorry for unclear question, and yes i would like to create a pop-up menu when a toolbar button is pressed.

MovingFulcrum: no NOT OfficeXP but WindowsXP here is the link so check it out...

http://www.microsoft.com/windowsxp/home/guide/smarter.asp

Anyway, does anyone know how to put text on the rebar!! like the text "A&ddress".
Posted on 2001-08-14 02:44:53 by Black iCE
These are the things i have quried about:

1. Autosizing Toolbar (Check: Thanx 2 Scronty)
2. Icons from Dll on System (Check: Just figured it out last night)
3. Menus from Toolbar button
4. Placing text onto a rebar band.

If you can, just be kind and help me with 3 and 4. Check out my previous posts for more details...

Black iCE:alright
Posted on 2001-08-17 03:25:00 by Black iCE
STILL, no one out there that can help me?! Ok, mabe if you could see my source code up to now then you guys can help me. (Pleez do not mind the commenting in source code, not ment to be posted here and no harm intended...only you know when that stupid Invoke returns ZERO in eax and GetLastError tells you there is no error while MSDN Library says if Invoke returns ZERO in eax an error occured.):confused:

Now, if you look at my source code i would appreciate some help with the following.

The Toolbar's buttons don't cover the whole width of Rebar Band as in Windows Interner Explorer or Windows Explorer.

The LoadLibrary call and the creation of an image list...and the association of that list with the Toolbar(hShortcutToolbar) has gone funny. I can only create one imagelist but i need 3, one for default display -,one for HotItem display- and one for Disabled display of toolbar buttons. So any help is appreciated here... do with the code as you like as long as it will work in the end.

The last band of the rebar should show "A&ddress" but natrully is does not.

Construction of Menus when "&File" etc button is pressed. It should look like Windows Internet Explorer or Windows Explorer. If Microsoft could do it then it should be possible in ASSEMBLY!!!

Thanx.
:alright:
Posted on 2001-08-20 03:30:24 by Black iCE
Hi there... thanx to those of you who have downloded the previous source code. The source code here is updated, it now uses a popup-menu (does anyone know who to make a dropdown-menu here instead of a popup-menu).

Refer to my previous post for details on coding problembs.

Thanx:alright:
Posted on 2001-08-24 03:26:27 by Black iCE
Afternoon, Black Ice.

Here's what I've got so far. It doesn't create a dropdown menu yet. I've zipped it with the "rsrc.rc" and "Toolbar.bmp".

Cheers,
Scronty
Posted on 2001-08-24 05:32:44 by Scronty
Hi there Scronty.

I took a look at your code and i like the way it was structured and now i am reformatting my source. Anyway what .lib do you have that has BTN_BUTTON and so on, mine does not have those constants. I am also writing Matric MOCKS so my programming may take a while but it will be done. Still working on that drop-down menu
Posted on 2001-08-28 04:49:51 by Black iCE
Afternoon, Black Ice.

The constants in the 'windows.inc' file do not contain all of the constants available. They're a general set of the most commonly used constants/structures created by Icz and Hutch.

The constants you're looking for are in the 'CommCtrl.h' file, in Micro$ofts' current Platform SDK. Just do a search for them, convert them, and then place them in your 'windows.inc' file. Make sure you're using the '*.lib's from the P/SDK. Remember; some of these constants can only be used if your version of 'Internet Explorer' is above v3, v4, v5, etc.

Most of those constants had the old 'TBSYLE_' in front of them.

Cheers,
Scronty
Posted on 2001-08-28 17:59:04 by Scronty