Page 1 of 1

flat style

PostPosted: Sat Apr 09, 2022 7:13 pm
by Detlef
Hi all,
I' still not able to get a dialog with flat controls when using Pelles rc editor for creation.
All get and browse controls have a frame with a small inside shadow.

Image

Could anyone give me some guidance how to get rid of that shadow?
Thanks
-Detlef

Re: flat style

PostPosted: Sat Apr 09, 2022 11:01 pm
by James Bott
Detlef,

This will get you a flat panel on a window. Maybe you need to set the windows API values in your resource editor?

Code: Select all  Expand view
#include "fivewin.ch"
#include "winapi.ch"


Function Main()
   Local oWnd, oPanel1

   Define window oWnd
   
      DEFINE WINDOW oPanel1 ;
         STYLE  nOr(WS_CLIPCHILDREN, WS_CAPTION, WS_THICKFRAME, WS_MINIMIZEBOX ) of oWnd
     
    Activate window oWnd on init (oPanel1:activate())

Return nil
 


I would be cautious about going too far down this rabbit hole. Windows 11 design is a lot different from Windows 10. Under Win 11 panels and other controls also have shadows. Oh, and most Win 11 controls have rounded corners too. Preparing for the inevitable, I would try to emulate Win 11 design now. People do judge a book by it's cover (and software by it's interface).

Note that when you display windows and dialogs on Win 10 both now have built in shadows. This is new with a Windows 10 update. Under Win 11 panels do have shadows, but FW Win 10 apps don't show shadows around panels.

For more on this search the forum for my thread on Windows 11 fluent design. It was last October I think.

James

Re: flat style

PostPosted: Sun Apr 10, 2022 9:41 am
by Detlef
James,
many thanks again for your reply.

You are absolutely right, people judge a software by it's interface.
I don't intend to fake windows 11 ui design for my program.
But those sunken gets e.g. have a bit of smell like Windows 3.11 :?

I just want to create a neat clean appearance for my work.
There's someone with the same issue in this forum.
http://forums.fivetechsupport.com/viewtopic.php?f=3&t=41632&sid=11bae6f1c3f921b010e06a660e0653bf
he explained my concern better than i did.

-Detlef

Re: flat style

PostPosted: Sun Apr 10, 2022 7:05 pm
by Enrico Maria Giordano
You have to include the manifest in your resource in order to get the flat style, or use the manifest file.

EMG

Re: flat style

PostPosted: Sun Apr 10, 2022 7:37 pm
by Detlef
Enrico,
I have this line in my rc file:

1 MANIFEST "WindowsXP.Manifest"

But i get no flat controls.

Re: flat style

PostPosted: Sun Apr 10, 2022 7:44 pm
by mtajkov
I copy file from c:\fwh2111\samples\winxp\ to my source folder

Best regards

Re: flat style

PostPosted: Sun Apr 10, 2022 8:49 pm
by Detlef
mtajkov,
thanks for jumping in.

I did this already. And tried also with "Windows10.Manifest".
But when I say "BORDER: YES" in Pelles rc-editor there is no flat appearance, just the sunken look.

-Detlef