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

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.

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.

What sort of GUI controls are used in Windows Resource Monitor?

I am new to GUI programming in Windows.
The Windows Resource Monitor (perfmon.exe /res) has four bars (CPU/Disk/Network/Memory) that have gradient backgrounds, as well as charts on the right for displaying recent CPU/Disk/Network/Memory usage.
I am wondering what kind of controls were used in this application. Are they readily available in C++ or in C#?
They are custom controls that are not available for external use, sorry.
You can use the Spy++ window finder tool (Spy++ is included with DevStudio) to find the window class names (and window boundaries).
http://msdn.microsoft.com/en-us/library/aa266028(v=vs.60).aspx
It shows that the overall window is a DirectUIHWND, the graphs are windows but the bars labelled CPU/Disk/Network, etc are not windows at all, the appear to be drawn directly in the resource monitors client area.
The implementation is not public for these controls, but I'm pretty sure they are incorporated using Windowless Controls.
Those bars remind me of Outlook bars. One old implementation is described in Code Project, and that one also has no windows on its own. Everything is painted inside.
Edit: That Code Project article was C# port. For C++ original go to Code Guru.

Creating a Custom Silverlight Designer in WPF

I need to create a designer for Silverlight in WPF and I’m thinking of a few options
Use a WebBrowser control,
display the content there and
communicate Silverlight using the
JavaScript Bridge. Not sure if this
will be enough for the scenarios I
need to support (see below). This is what KaXaml is doing. SilverlightSpy uses a a more sophisticated WebBrowser control, but I'm not sure how they communicate with Silverlight.
Communicate using Sockets
between the Host and Silverlight.
Host the Silverlight runtime (not in
a browser), but directly using
AgCore.dll. Similar to what sllauncher does for OOB. I imagine
this is what Blend/VS are doing.
Do whatever Blend or VS are doing
which.
I obviously don’t want to go as far as VS and Blend, but I need to support drag and drop of some controls as well as grouping, changing the layout, moving controls in the design surface and obviously updating the Xaml as a result of this actions.
Any ideas, recommendations or pointers on the best way to create a Silverlight Designer in WPF?
SharpDevelop 4 has a WPF based editor for WPF and Silverlight -> http://www.icsharpcode.net/opensource/sd/

Moving graphical components with the mouse in Visual Studio

I have just installed Visual Studio.NET. In the Design area I have added some graphical components (button, textbox) but I can't move these within the specified area, as their position remains unchanged. I would like to move these graphical components with the mouse cursor, I know it's possible, does anyone know how?
It sounds like you have created a WPF project. WPF works a lot differently than WinForms which you are probably used to. So try creating a WinForms project, or get yourself acquainted with WPF.
I came here looking for the answer to the same question. OP is probably no longer interested and it was quite easy to Google it up, but in case somebody comes here as I did, here is the solution:
In WPF, place a Grid component on your form (or in your container, like Tab), and reset it (set both Height and Width to auto). Then you can place other controls and position them with your mouse normally.

Is Visual Studio a Multiple or Single Document Interface?

In other words, if I want to write a winforms db application with an appearince like VS that has docked panels and also the ability to show/hide forms within some of those panels, how would I structure the interface? How would I have the ability to open several disparate forms at different times (with big data grids on them) while avoiding floating forms and also using memory efficiently? I want to avoid floating windows.
Check out this article to build a VS like interface:
Visual Studio IDE like Dock Container
I haven't tried the component myself but it looks interesting.
Visual Studio is definetly MDI
In the technical sense, Visual Studio is an MDI application whose document windows are anchored by tab navigation.
MDI refers to "multiple document interface," and refers to the fact that there are multiple documents open and visible inside a larger parent window.
In the modern application development realm, typically MDI has been frowned upon -- but that was the "old school" MDI, with the free-floating windows. Those are widely considered to be a usability nightmare.
On the other hand, MDI implemented as tabs inside a parent window is so successful from a UI consideration that even environment which didn't traditionally have MDI (EG, Mac OS) are implementing them.
In order to implement something like this, you can "roll your own," or you can use any of a variety of custom control/API packages which will allow you to easily develop tabbed-interface MDI apps. One of the last things I did with Infragistics NetAdvantage (before moving away from it) was a Visual Studio-inspired app, with docking sidebars, search results as a pane at the bottom, and all the primary data forms as tabbed MDI documents. (Indeed, WinForms is one of the few places Infragistics really shines.)
In terms of memory management, that will be on you. :)
I think technically Visual Studio would be classed as an MDI.
The main form holds disparate controls. Each of these controls can then be docked as required etc. Visual Studio for example has a single control (with multiple tabs) to display the documents you edit. A single control with multiple tabs that holds (eg) Solution Explorer, Properties etc etc.
As a starting point to creating your own IDE style interface I would create a form with 5 panels, one docked to top, one to left, one to right, one bottom and one 'fill'
Thats your starting point. Add splitter bars to allow the panels to be resized. Each panel can then hold a Tab control, and each tab holds a 'MdiBaseControl'
An MdiBaseControl can be whatever you want. So in VS terms you have things like SolutionExplorer, Properties, Breakpoints, FindResults etc etc.
Each MdiBaseControl can be dragged from its current tab and dropped into any of the docked panels (which then adds it to the Tab control as a new tab)
I just noticed that Developer Express have some controls for building IDE-style interfaces.
In both interfaces, multiple forms can be seen at the same time but in MDI, things float freely. In this sense, Visual Studio is a SDI.

Resources