|
forums.silverfrost.com Welcome to the Silverfrost forums
|
View previous topic :: View next topic |
Author |
Message |
LitusSaxonicum
Joined: 23 Aug 2005 Posts: 2388 Location: Yateley, Hants, UK
|
Posted: Wed Apr 22, 2009 1:34 pm Post subject: New button %bb & other miscellaneous requests |
|
|
1. Is the new button format (%bb) (see Knowledgebase) significantly different from the old (%bi), i.e. is:
Code: | I=WINIO@('%bb[ICON1/Press]&') |
different to:
Code: | I=WINIO@('%bi[ICON1]%bt[Press]&') |
and hence where would each be used? Those "buttons with icons" used to tell everyone that the application was programmed with Delphi!
2. Is it the case that one can now have the incantation:
Code: | 1 24 default.manifest |
in a RESOURCES section? I always thought that it only worked in a separately compiled .RC file (but I don't know where I got that idea).
3. Having the "1 24 etc" seems to fix the %bg background colour for the main window. Is that correct, or is there a workaround?
4. I have made the chance discovery that having a minimise icon (%mi) also gives you a system menu - obvious really, but I've not found it in the documentation.I had forgotten about the system menu as although it was a big part of early Windows, I hadn't used it for some years. It allows the window to be maximised (so that its original contents appear in a sea of background colour), so it looks to me as though %mi should always be accompanied by %ww[fixed_size]. For anyone further bothered by the system menu, the %sm format code allows it to be added to or changed. During this oddysey of discovery, I also discovered that [volatile] appears to set [no_frame]. Is there no end to the hidden depths of Clearwin?
5. I have recently been getting in a muddle with an application that uses %ap, where the user has a large widescreen display, and has set the font option to "Large fonts". Which character is a guaranteed "average width" (so that I can use GET_TEXT_SIZE@) - or is the right result returned from GET_SYSTEM_FONT@? It would be mighty handy if there was a pixel equivalent to %ap. Part of the trouble is finding a monitor & graphics card of the same type to run tests on - and I have the choice of several hundreds of machines.
Eddie |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7924 Location: Salford, UK
|
Posted: Wed Apr 22, 2009 2:09 pm Post subject: |
|
|
1. The difference is in the icon size and, in the sample, also the text size. The result is a more pleasing appearance.
2. Yes you can now use "1 24 default.manifest". I have removed the old limitation.
3. The XP style may have a different default background. I would need more details about what you get and what you would like to get.
4. Probably not.
5. OK |
|
Back to top |
|
|
LitusSaxonicum
Joined: 23 Aug 2005 Posts: 2388 Location: Yateley, Hants, UK
|
Posted: Wed Apr 22, 2009 4:16 pm Post subject: |
|
|
Hi Paul,
Thanks for the very fast response. Is it worth noting your answers to 1. and 2. in the Knowledgebase?
In answer (and further and better particulars) to 3., the best way of illustrating this is to look at (say) the toolbars in Office 2003 - they have a shaded 3D look that I have been able to match by screen-grabbing and cut'n'pasting small sections so that I end up with bitmaps suitable for a button bar made up of %tb format codes (it doesn't work with %ib). These button bars sit on a background that is simply not blueish enough to match Office 2003 perfectly (although with XP style and the Silver colour scheme it isn't that far off). I'd simply like to change the background so it did match - and so it did not matter what colour scheme a user chose. Using XP's standard style and the default (blue) or green colour schemes, the colour of the background is subtly different to the silver colour scheme, and fits even less well with my elaborate toolbars.
Office 2007 has gone further down the blue tones route. They have retained the silvery 3D effect for vertical scroll bars, but the toolbars are very blue. You see this best in Outlook 2007, as the main applications have that completely novel tabbed menu system that makes them so hard to convert to.
The best way of visualising my "problem" is to compare the background of Word 2003 to any FTN95 application using "1 24 default.manifest".
I had been using a monitor with poor colour rendition, and didn't see the problem until I got one with better colours!
Regards
Eddie |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7924 Location: Salford, UK
|
Posted: Thu Apr 23, 2009 11:23 am Post subject: |
|
|
Sorry but I am still not clear what you are looking to emulate.
Anyway, the effect of using the manifest is to change from the old common dialog dll to the new one (called something like cmndlg32.dll I think). Basically you get whatever it provides.
Paul |
|
Back to top |
|
|
LitusSaxonicum
Joined: 23 Aug 2005 Posts: 2388 Location: Yateley, Hants, UK
|
Posted: Sat Apr 25, 2009 2:02 pm Post subject: |
|
|
Hi Paul,
Things are difficult to explain without a picture, aren't they?
Take the following program:
Code: | OPTIONS (INTL)
WINAPP
PROGRAM X
INCLUDE <WINDOWS.INS>
IStat = 1
I=WINIO@('%ca[X]%ww&')
I=WINIO@('%sy[3d_thin,thin_border]&')
I=WINIO@('%mn[Exit]&','EXIT')
I=WINIO@('%tb&','ICON','ICON','ICON',IStat)
I=WINIO@('%bg[white]&')
I=WINIO@('%bx&', 0.0D0)
I=WINIO@('%gr', 400, 200)
END |
It creates a window that looks like this:
Code: | __________________________________________________________
|Caption bar |
__________________________________________________________
|Menu bar |
__________________________________________________________
|Toolbar(s) |
| toolbar background |
__________________________________________________________
| |
| border |
| ________________________________________________ |
| | | |
| | | |
| | %gr area | |
| | | |
| | | |
| | | |
| ________________________________________________ |
| |
| border |
__________________________________________________________ |
The %bg instruction affects the %gr region, not the areas I have indicated as "toolbar background" and "border". For what it is worth, XP's Blue and Green variations on the standard XP theme give RGB=(236,233,216) for both - which is the same as the background to their menu bars, but the Silver version gives (224,223,227) for "toolbar background" and "border", which is different to the menu bar (224,226,235).
When running Office 2003, the applications can and do reset the colours to (238,238,243). This doesn't matter much to the menu bar and "border", but it does matter for the toolbar background as it affects the display of (in particular) the colour choices for %tb buttons. Yes, I know it doesn't matter much for %ib toolbar buttons, but they do not permit certain designs of toolbar, and although %ib is simpler in many respects, icons that commonly stay greyed out can look crude and clumsy.
What I should like to be able to do is to set the colour of the region between the menu bar and the line drawn in response to the %bx format code. I note what you say about the new common dialog dll, but must point out that what is taken to be a "windows standard" is not actually what Windows gives you, but what Microsoft Office looks like! The Office team clearly don't have to live with whatever the common dialog provides ...
Regards
Eddie |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7924 Location: Salford, UK
|
Posted: Sat Apr 25, 2009 3:59 pm Post subject: |
|
|
Eddie
I think that the relevant colour is GetSysColor(COLOR_BTNFACE) and that this does not change when you use the manifest.
I cannot see a way to change this except by adding a new feature to ClearWin+.
The Microsoft Office team sometimes write their own graphics and sometimes they use Microsoft API stuff before general release. It is difficult to keep up even when using the API directly rather than via ClearWin+.
Regards
Paul |
|
Back to top |
|
|
LitusSaxonicum
Joined: 23 Aug 2005 Posts: 2388 Location: Yateley, Hants, UK
|
Posted: Sat Apr 25, 2009 9:31 pm Post subject: |
|
|
Hi Paul,
Thanks for the advice. I spent much of this afternoon experimenting, and discovered that if I add '%ap%bm[TOOLBARBACKGROUND]&', 0, 0 then the bitmap "slides under" the %tb buttons. It has to be the right depth, and if it is too long for the initial width of the window there are some issues. Furthermore, I had to set my window to no_border to work out dimensions consistently (most notably the left hand start position for the bitmap).
I also discovered that with a toolbar background bitmap of the appropriate design slid under the buttons I could effectively remove the gaps between them on my Acer Ferrari laptop - the only machine I know to be afflicted with the problem - so killing two birds wih one stone. There's bound to be a downside, but I haven't found it yet.
Regards
Eddie |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|