Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

C++/WIN32 A professional looking application - is it really possible?

I've been looking everywhere to find a good solution / tip on how to release an application that has todays 'top-end' look.

As we all know, when coding with windows we normally get windows-style colors/buttons/lists etc. They just look and feel ugly.

When we decide we want to sell an application, people want it to look good - obviously because they have paid for it.

So the question is:

  • How is the good application look achieved today?
  • Owner drawing? ( really?? )
  • custom-controls ?
  • some good non-free libraries that do the 'dirty' work and 'skin' your application?

I don't believe programmers do those 'overdrawn' tips and tricks, it takes so long to have one control completely done.. Besides, i would rather spend that time coding the internal application stuff than playing around with per-control drawing..

I have no clue, but have a deadline and now after going through all those 'ownerdrawed' controls on google - i came up that this is not the thing.. There has to be something else that comes handy when a programmer needs to make his application look top-end!.

Please help, any tools ? any tips ? any-anything.. ?

Few examples, how do they achieve that look:

http://fooh.pl/pokaz/3198197337370da4cdfdebf0ae13933c_openfm.jpg

like image 506
PeeS Avatar asked Jul 16 '11 13:07

PeeS


People also ask

What is Win32 console application?

Win32 console is a text user interface implementation within the system of Windows API, which runs console applications. A Win32 console has a screen buffer and an input buffer, and is available both as a window or in text mode screen, with switching back and forth available via Alt-Enter keys.

How do I create a Win32 application?

To create a Windows desktop project in Visual Studio 2015 In the New Project dialog box, in the left pane, expand Installed > Templates > Visual C++, and then select Win32. In the middle pane, select Win32 Project. In the Name box, type a name for the project, for example, DesktopApp. Choose OK.

Is Win32 API obsolete?

Obsolete? Not likely. There will always be a need for people who understand how Windows works at a lower level.

What can Win32 do?

Alternatively referred to as the Windows API and WinAPI, Win32 is the main set of Microsoft Windows APIs used for developing 32-bit applications. These APIs are responsible for functions in the following categories: Administration and Management - Install, configure, and service applications or systems.


5 Answers

You could have a look at Qt for example. In addition to its basic functionality, you can also style all Widgets to your liking (in a manner very similar to CSS) and as such create "themes" to your heart's content.

For the non-rectangular look of the window in the image you link to, you can use Qt's setMask() functionality.

like image 166
Bart Avatar answered Oct 19 '22 03:10

Bart


It sounds like you want a fully skinnable app, but for no more effort than typical Win32 controls. This is impossible. But skinning is not difficult in general, just more time consuming than you're willing to spend.

Your next problem is: Once you have a skinned app, you need a professional graphic designer to develop a good skin. Too many small-project developers think they can make their own skin but it almost always looks terrible. This sexy professional look you want is impossible without a design expert.

And finally, whatever fancy custom skin you end up with, the functionality will likely need to be custom. That is, if you want non-rectangular controls, or animations, these are things you must spend the time to develop.

Using a toolkit like Qt can be a nice investment. But this is the kind of detail that takes a lot of effort no matter how you slice it.

Somewhat beside the point: Designed correctly by a UI expert, the default windows controls tend to look very professional. There are so many benefits to using native windows controls, you should really think carefully before trying to re-invent the wheel:

  1. Accessibility features like keyboard navigation, screen readers, high contrast. Are you really going to try and re-invent all the accessibility features that Windows provides with the controls? Or is it worth excluding disabled people from using your app just so you can use a skin (not to mention the non-disabled people that use accessibility features)?
  2. Resizing. Does your skin mean disabling any resizing of your window? Again, is that worth it?
  3. Some things cannot be skinned very well. For example scroll bars and menus. Some developers re-invent them (scrollbars being especially difficult to reinvent), others just leave them unskinned.
  4. Windows theme. Windows theming is not just the color of your start menu; it's supposed to dictate the look of your whole OS. Using standard windows controls allows users to use a built-in mechanism for selecting the look and feel.
like image 30
tenfour Avatar answered Oct 19 '22 04:10

tenfour


There probably is not a single control in that application.

Instead, the whole thing is rendered as an image. There's a background image, along with some overlay images (mostly transparent) to provide mouseover-highlight, disabled controls, etc. The only thing that's not prerendered is the current track and playlist information, which is pure text with a particular font.

Hit-testing can be performed with yet another image.

The programmer does virtually no work to implement the fancy design, it's all done by an artist (and programs like Photoshop support layers in the editor, making it quite easy to construct all the overlays).

The downside, of course, is that buttons don't act exactly like normal Win32 buttons do. They don't support keyboard focus (although there probably are hotkeys) and simply activate on mouseup. And accessibility is horrendous, there's no information for a screenreader, and the application doesn't respect system font-size settings. In order to make the UI readable by people with poor eyesight, an entirely different skin is required.

like image 44
Ben Voigt Avatar answered Oct 19 '22 03:10

Ben Voigt


The C++ team put together a sample called Hilo (like the place in Hawaii) that uses no frameworks (no ATL, no MFC) and is all native code. It uses a number of Windows 7 capabilities and some delightful graphics and animations. All the code and design is available and documented. Take a look.

like image 45
Kate Gregory Avatar answered Oct 19 '22 03:10

Kate Gregory


If you want to dig under the covers of any specific app, you can fire up a Spy Utility and see how many controls an interface has been broken down into:

I want Spy++ but I don't have Visual Studio

Is there a Spy++ like utility for WPF?

For instance...spying into Windows Media Player in skinned mode finds that there is a window class called WMP Skin Host, and you can see that it has zero child windows. (The regular non-skinned mode is broken into some list boxes and buttons such.)

In my experience, "modern" skinning is generally a disaster when people re-implement too much to try and "look cool". It hampers both automation (through things like AutoIt) not to mention the accessibility features for the disabled. Also, what looks cool today will not stay current if you're not using an OS-based theming API.

(Note: Because I'm a fan of Qt in general, I would suggest looking into the QStyle and QStylePainter. But this is more "theming" than "skinning".)

I would be very wary of using skinning in an app, unless I found out that I was developing for a market that absolutely demanded it (like music players).

like image 40
HostileFork says dont trust SE Avatar answered Oct 19 '22 04:10

HostileFork says dont trust SE