1. WIN16 3D Controls

The Win3.x Style 3D controls call a special DLL CTL3D.DLL or something.
Alternatively you could create them as custom controls. But good interface
design dictates you should be consistent and that includes with the OS.
Programs that look like another OS always seem out of place. Although Win3.x
users are used to partially 3D progams.

Drawing 3D is easy. To draw a 3D raised rectangle : Draw the rectangle; then
draw the highlight (usually Bright White, 15) from the Lower Left to Top
Left to Top Right; then draw the shadow (usually Dark Grey, 8) from the Top
Right to the Lower Right to the Lower Left. Drawing a sunken object simply
means drawing the shadow in place of the highlight and the highlight in
place of the shadow, ie swap the colours.

eg
polygon( WHITE, 1, {{L,T},{R,T},{R,B},{L,B}} )
-- Raised :
draw_line( BRIGHT_WHITE, {{L,B},{L,T},{R,T}} )
draw_line( DARK_GRAY, {{R,T},{R,B},{L,B}} )
-- Sunken :
draw_line( DARK_GRAY, {{L,B},{L,T},{R,T}} )
draw_line( BRIGHT_WHITE, {{R,T},{R,B},{L,B}} )

Here's another speed thread... Optimise a raise( L, T, R, B ) and a sink( L,
T, R, B ) routine.
--------------------
Sincerely,
Mathew Hounsell

Mat.Hounsell at Excite.Com


_______________________________________________________
Get your free, private e-mail at http://mail.excite.com/

new topic     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu