Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!cs.utexas.edu!uunet!brunix!porter!demillo From: demillo@porter.geo.brown.edu (Rob DeMillo) Newsgroups: comp.windows.ms.programmer Subject: Re: toolbar Message-ID: <74757@brunix.UUCP> Date: 7 May 91 14:52:25 GMT References: <1991May6.202626.10316@infonode.ingr.com> Sender: news@brunix.UUCP Distribution: comp Organization: Brown University - Planetary Geology Group Lines: 27 In article <1991May6.202626.10316@infonode.ingr.com> pottera@infonode.ingr.com (Andrew Potter) writes: > >I am interested in what approach should be taken to implementing a tool >bar, such as the one used in Excel. I haven't seen anything in the way of >direct support for it in the SDK. Is there anything? Or does anyone have >any suggestions as to how it should be approached? The MS Toolbar concept is a big hack, and its pretty easy to implement. The 'bar' itself is a modeless dialog box without borders, etc. The 'tools' are simple push buttons. (The dialog box is scaled to exactly fit the width of the push buttons, and the buttons are shoved next to each other.) Simple icons are then placed on the buttons. (Button positions can be obtained in screen coordinates (rather than the device independent dialog coordinate system, which is the default coordinate system for all dialog boxes) by a quicky little mapping function. I came up with a mapping function that does the trick, which I'll post if anyone is interested.... Anyway, that's all there is to it...then just treat the 'tools' like you would any other dialog box button.... - Rob DeMillo | Internet: demillo@juliet.ll.mit.edu Mass Inst of Tech/Lincoln Lab | Also: demillo@porter.geo.brown.edu Weather Sensing Project-Group 43 | Reality: 401-273-0804 (home) "I say you *are* the Messiah, Lord! And I ought to know, I've followed a few!"