Click here to Skip to main content
15,891,431 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
AnswerRe: Designer or No Designer? What say you? Pin
Member 129243128-Nov-19 1:09
Member 129243128-Nov-19 1:09 
AnswerRe: Designer or No Designer? What say you? Pin
Chris Boss8-Nov-19 3:37
professionalChris Boss8-Nov-19 3:37 
GeneralRe: Designer or No Designer? What say you? Pin
MSBassSinger9-Nov-19 10:21
professionalMSBassSinger9-Nov-19 10:21 
AnswerRe: Designer or No Designer? What say you? Pin
darktrick5448-Nov-19 4:34
darktrick5448-Nov-19 4:34 
AnswerRe: Designer or No Designer? What say you? Pin
Steve Naidamast8-Nov-19 7:55
professionalSteve Naidamast8-Nov-19 7:55 
AnswerRe: Designer or No Designer? What say you? Pin
Patrick Fox8-Nov-19 10:57
Patrick Fox8-Nov-19 10:57 
GeneralRe: Designer or No Designer? What say you? Pin
MSBassSinger9-Nov-19 10:22
professionalMSBassSinger9-Nov-19 10:22 
GeneralRe: Designer or No Designer? What say you? Pin
Chris Boss9-Nov-19 16:33
professionalChris Boss9-Nov-19 16:33 
A little history about WIN32 and scalable coordinates. in the Windows 3.1 days, the WIN API used dialog units which were scalable. Dialogs units with old Windows worked well, since they scaled to the system font and a dialog unit came out exactly 2 pixels in most instances on most displays. When WIN32 came along, so did many larger displays and dialog units didn't always scale properly and didn't come out exactly to pixels, but a percentage of a pixels. This would cause forms designed using the Windows Dialog Designer (aka. very old school designer dating back to Windows 3.1 and coding in pure C) to shift a pixel or two and things often didn't line up properly on some systems.

As a long time WIN32 programmer I saw the pros and cons to dialog units. So when I started writing my own GUI framework based on the WIN32, I choose a different route. Dialog units are actually based on a character unit. Dialog Base Units as they are called are the average width and height of the system font. The system font in Windows 3.1 days was a fixed width and came out to 8 x 16 pixels. A dialog unit was defined as (dialog base unit width / 4) and (dialog base unit height / 8). So 8 / 4 = 2 pixels width and 16 / 8 = 2 pixels height.

So dialog units came out exactly as 2 x 2 pixels.

But later on with WIN32 windows could scale the system fonts and on different displays the dialog base unit did not come out exactly 8 x 16 pixels. Now you had a problem when scaling.

I liked how Dialog units worked, but they were flawed when scaled. So I decided a different route. Why not define a dialog base unit in a similar way by getting the average the current system font (even variable width) to define an internal character unit size. But instead of defining coordinates using whole numbers like dialog units do, why not defined character units using floating point. This would provide pin-point accuracy. You could define a coordinate using decimals, like 1.75 horizontal character unit and 2.5 vertical character units.

No matter how the end users system defined the font scaling, you would pixel accurate positioning. I actually did this in a GUI framework and surprise, it works amazingly well.

By building a Visual Designer using character based units which are floating point, you can get very accurate scaling for any system. Just have the GUI framework convert internally the character units to what ever units you desire and at any scaling.

Now add to this your own auto-resize engine (for when forms are resized at run time by the user) for forms and controls and then you have a much easier system for scaling and it works well even with the WIN32, which was not designed well for handling such things like later GUI frameworks in Windows did.

I know it works well, since I have already done this in my own GUI framework and it is WIN32 based. For those who build Visual Designers, why not trying using this approach so the Designer uses its own character unit with floating point and you likely could have it scale to almost any other GUI framework you desire to support.
GeneralRe: Designer or No Designer? What say you? Pin
Patrick Fox11-Nov-19 5:31
Patrick Fox11-Nov-19 5:31 
GeneralRe: Designer or No Designer? What say you? Pin
MSBassSinger11-Nov-19 6:46
professionalMSBassSinger11-Nov-19 6:46 
AnswerRe: Designer or No Designer? What say you? Pin
Member 1409260515-Nov-19 1:58
Member 1409260515-Nov-19 1:58 
GeneralThought of the Day Pin
OriginalGriff7-Nov-19 4:46
mveOriginalGriff7-Nov-19 4:46 
GeneralRe: Thought of the Day Pin
lopatir7-Nov-19 4:58
lopatir7-Nov-19 4:58 
GeneralRe: Thought of the Day Pin
Eddy Vluggen7-Nov-19 5:51
professionalEddy Vluggen7-Nov-19 5:51 
GeneralRe: Thought of the Day Pin
PIEBALDconsult7-Nov-19 5:15
mvePIEBALDconsult7-Nov-19 5:15 
GeneralRe: Thought of the Day Pin
Jacquers7-Nov-19 5:23
Jacquers7-Nov-19 5:23 
GeneralRe: Thought of the Day Pin
OriginalGriff7-Nov-19 5:26
mveOriginalGriff7-Nov-19 5:26 
GeneralRe: Thought of the Day Pin
Jacquers7-Nov-19 7:29
Jacquers7-Nov-19 7:29 
GeneralRe: Thought of the Day Pin
Roland M Smith7-Nov-19 8:24
Roland M Smith7-Nov-19 8:24 
GeneralRe: Thought of the Day Pin
PIEBALDconsult7-Nov-19 5:52
mvePIEBALDconsult7-Nov-19 5:52 
GeneralRe: Thought of the Day Pin
Daniel Pfeffer7-Nov-19 5:47
professionalDaniel Pfeffer7-Nov-19 5:47 
GeneralRe: Thought of the Day Pin
Jacquers7-Nov-19 7:34
Jacquers7-Nov-19 7:34 
GeneralRe: Thought of the Day Pin
Eddy Vluggen7-Nov-19 5:52
professionalEddy Vluggen7-Nov-19 5:52 
GeneralRe: Thought of the Day Pin
rnbergren7-Nov-19 6:18
rnbergren7-Nov-19 6:18 
GeneralRe: Thought of the Day Pin
OriginalGriff7-Nov-19 6:24
mveOriginalGriff7-Nov-19 6:24 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.