transparent listctrl in mfc - visual-studio-2010

I have an MFC GUI application having a listview control( Report view), which was developed in VC6.0.
I ported the project to VS2010. Now I need to make the listview ctrl transparent. So I tried the LVS_EX_TRANSPARENTBKGND extended style. It showed a compilation error. So I set _WIN32_WINNT to 0x0601 in project settings to resolve the compilation error. However the list control is not becoming transparent.
I tried the LVS_EX_TRANSPARENTBKGND extended style in a newly created sample VS2010 MFC project and it works fine. However it is not working in the ported MFC project.
Looking forward for a solution!

Related

Widgets change places when running from design tab

I am building a visual studio application and have designed it using visual studio windows form. I am using the siticone library for the GUI but when i lay widgets out on the designer and then run the application all the widgets move. The buttons do not but the labs on them do. Also i have added a user control page that moves aswell. Please Help.
Cheers.enter image description here
Make sure that your Winform Font style and size match with all child controls including all Siticone controls.
Verify that you have anchored your controls accordingly on your form or panel control.

Can such a UI be created with unmanaged Visual C++ and MFC?

I need to create a shoebox-style native Windows app in C++. A good example of such a UI would be CleanMyPC:
I've tried the various options of the MFC App wizard in Visual Studio 2019 to see what that would give, but it's either document-based (SDI), or too limited (dialog-style). The closest was an empty Win32 app, which just displays a menu bar and a blank window beneath it. At least it matches the Windows style. But that would mean using bare Win32 API, which doesn't seem like a good idea.
Can a UI like in the screenshot be created with MFC? If so, would that be a reasonable approach? Can MFC be effectively used in a non-document-style, non-dialog-style UI like this?
I understand that there's heavy customization of the controls going on in the screenshot; the question is can it be done with MFC?
It looks like the left sidebar and the right details areas could be made of customized list controls. I'll be looking into how a dialog-based sample app arranges the window, so that no document stuff is involved, but without immediate termination on a button click.

64-bit version of CTL3D32.DLL?

I've been tasked with producing a 64-bit version of an old-style Win32 Windows application, written in C/C++ and packaged as a DLL. The 64-bit app now runs but the controls in the dialog boxes don't look the same on Win64 as Win32. The reason is that the program performs a LoadLibrary("ctl3d32.dll") and if successful, GetProcAddress() is used to collect library entry points like Ctl3dSubclassCtl(), and those entry points are then used to subclass each class of control.
However, the LoadLibrary() fails in _WIN64 because there is no 64-bit version of this DLL. This causes the controls to be rendered using the default (this is on Windows 10 -- top is Win32, bottom is Win64):
Button controls look similar enough to pass, but static controls that are used like group boxes (they look like raised pads) are drawn as plain white rectangles and edit windows don't have that inset look.
I know the right way to do this is to move the app to visual styles but for right now, it needs to look the same in Win64 and Win32. I searched in vain for a style or flag that might turn on this behavior without referencing CTL3D32.DLL.
Has anyone else encountered this problem and come up with a solution other than replicating this functionality in 64-bit GDI code or moving to Visual Styles?

What GUI framework or libs are used in Unreal Engine 4 Feature Demo?

Unreal Engine 4 GUI like this:
https://pcper.com/2012/06/e3-12-unreal-engine-4-what-you-and-we-missed-at-gdc/
Unreal Engine 3 use wxwidgets,but in UE4 it looks like .NET Framework WPF. The GUI in UE4 is fantastic.
P.S. Microsoft Expression Studio 4 has the same style.
it is not wxwidgets and wpf.
it is a new gui framework which is developed by unreal engine 4 team and it named "Slate UI Framework".
this framework used for editor and game twice, so it is a cross platform framework and use hardware accerlation, like unity3D editor.
if you use some software for example Fraps, it will tell you the full screen is one frame buffer.
The Unreal Engine 3, at least later builds of it are slowly replacing wxWidgets with WPF which you can tell by looking at some of the .NET .dll files and also by the look of the Content Browser, color picker etcetera.
It would make sense for the Unreal Engine 4 to continue that trend.
The UE4 Editor utilizes the Slate UI Framework for its widgets.
They can be inspected via the Widget Reflector tool, which allows selecting a widget currently present on the editor screen and then finding and inspecting, among other aspects, its source code, like so:
In UE4, go to Window > Developer Tools > Widget Reflector
In the Widget Reflector window, click Pick Hit-Testable Widgets or Pick Painted Widget
Move the mouse over any widget on the editor window and press ESC to stop
Notice that the widget and its corresponding CPP file will be highlighted in the Widget Reflector
On a default installation of UE4, the base folder containing Slate UI widgets should be:
C:\Program Files\Epic Games\UE_4.26\Engine\Source\Runtime\Slate\
For instance, the implementation of the SBox widget can be found at:
C:\Program Files\Epic Games\UE_4.26\Engine\Source\Runtime\Slate\Private\Widgets\Layout\SBox.cpp
Aside from being utilized to build the UE4 Editor itself, the Slate UI Framework can also be utilized in games/content created with it.
This document provides an overview of the framework by its creator.

Making a vb.net application blend in with the Windows theme

Previously I used to piddle around with VB6 to develop a couple of personal projects. Following my upgrade to Windows 7, I've decided to piddle about with vb.net Express Edition 2010.
If I wanted my VB6 application to blend in with the visual style of Windows, I would use the code and techniques described here. In short, I would use a Manifest file and a couple of calls within the application and most of the elements would look similar to the XP theme applied. If it was run on 2000, 95 or 98 then it would look like a standard Windows app. All was good.
Now I've moved onto vb.net, I've written a simple "Hello, world" application but I have absolutely no idea on how to make it look like the Windows 7 theme (eg. the font matches the system font and the widgets are styled correctly).
Just changing the font is a hack and will look out of place on machines that are set-up differently or run a different version of Windows where the default font is different.
How do I ensure my application matches the applied Windows theme irrespective of the version of Windows?
A lot of this is automatic if you create a Windows Forms app. They will (mostly) use the standard native Windows controls which draw themselves with the theme colors. But there are exceptions:
the Form item template uses a default Font named Microsoft Sans Serif. You'll have to change it to Segoe UI to match the Vista/Win7 default. This is only necessary for the Form class, all controls you put on it will automatically inherit that font. On an XP machine, the Windows font mapper will notice that the font is missing and automatically fall back to MSS.
the MenuStrip class uses custom rendering to draw the menu items. It tries to match the Windows style when you change the RenderMode property to System but the way it draws doesn't match the Win7 style. Right-click the toolbox, Choose Items and select MainMenu. That's a legacy version that does use Windows to draw menus so it produces the proper theme appearance.
A very similar problem for ToolStrip. It's legacy version is ToolBar. This is a hard one to swallow, it doesn't use a rebar which make the tool bar look flat and ugly.
There are similar problems in WPF but with the added problem that WPF doesn't use any of the standard Windows controls. And gets it wrong in subtle places.

Resources