Disabling the 'Aero Blur' from the Windows 7 taskbar (using C++?) - c++

I found a small program a while back that let me disable the Aero Blur while keeping the transparency that came with the theme. The program worked on literally everything, except for the taskbar which still appears to blur everything that happens to be underneath it.
This curious behavior led me to experimenting with the DWM api, in C++. Sadly, this didn't really help me at all, since no matter what functions I'd use - like DwmEnableBlurBehindWindow() -, none of them would actually affect the taskbar in a way that I wanted them to. I even tried turning the alpha levels of the taskbar's owner "window" down, but sadly that didn't work either - It made the taskbar icons transparent too which is a no-no for me, and it didn't actually remove the blur it just made the effect weaker.
As it seems that my skills are not enough to accomplish this task, I'm asking you - how can I remove the Aero blur from the Windows 7 taskbar? (Possibly using C++)

Remove Transparency that will do, else go to
Personalize by right clicking on desktop.
There go to theme, personalize the theme,
and find transparency/opacity. if you want with no blur and enabled transparency make it 100%
else disable transparency.
this you can do using c++ by doing twiks with Registry.
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\Microsoft\Windows\DWM]
"Composition"=dword:00000000
"CompositionPolicy"=dword:00000000
"ColorizationColor"=dword:6b74b8fc
"ColorizationColorBalance"=dword:00000008
"ColorizationAfterglow"=dword:6b74b8fc
"ColorizationAfterglowBalance"=dword:0000002b
"ColorizationBlurBalance"=dword:00000031
"ColorizationGlassReflectionIntensity"=dword:00000032
"ColorizationOpaqueBlend"=dword:00000000
"EnableAeroPeek"=dword:00000001
"AlwaysHibernateThumbnails"=dword:00000000
this are the values for Windows 7,
if you will change here, you will get the result. it contains all things you need to change.
you may change values for this three
ColorizationBlurBalance, ColorizationGlassReflectionIntensity, ColorizationOpaqueBlend
I think that will do :)

I found a small program that will remove the blur.
Link to DeviantArt

Related

SFML - Support Windows window-behaviour for borderless window

So I'm creating an application using SFML, which I want to be borderless, so no border style. I added the ability to move it around on the screen and am planning on adding the ability to scale the window, however, that made me realise there's just a bit more to this. When dragging any window (not mine) say to the top of the screen, windows kicks in and suggests the ability to scale it to full, or when you drag a window to the side of the screen windows, again, kicks in and suggests making it cover half your screen. And it does this on borderless applications like Google chrome, or Spotify as well. I could probably try and add this in myself, but it's obvious other applications dont implement it themselves as you can see windows actually doing it the way it visually shows it. So, how would I go ahead imlementing this? I'm using SFML 2.5.1 with C++.
I have tried looking through google and stackoverflow to see if anyone has had any similar issues, of which I couldn't find any, which could honestly have been me not knowing how exactly to phrase it.

C++ && QT Is there a way to create "warm screen" color using c++ and qt on Mac && Windows

Is there some way to change screen "saturation" ? Make screen in warm colors \ or make it in sepia using c++ && qt on win\mac ?
As a reference modern monitors have such a menu option on changing the screen color or you can also check the app for linux f.lux as a reference ...
The first thing that comes on my mind is to create some transparent " window on top " make a screenshot and play around with rgb ... but it will be not the best solution
There's no Qt API that will help you with that. On either platform you'll have to use native APIs to change the screen color reproduction curves and shift the color temperature to warmer tones. The situation on OS X would be more uniform in that the API to do that either exists on all hardware or on none. On Windows, things might be more complicated. Some undocumented vendor APIs probably exist, used by respective vendor control panels to alter the color temperature. There are also all ways you could hook yourself into the screen compositing pipeline, but this may require writing a driver. Unfortunately, I'm not too familiar with how easy it might be. It'll be probably either very simple or very complicated. There are some simple workarounds, like adding a translucent tinted window on top of everything, but those don't look good.
Neither C++ nor Qt facilitate such functionality. It seems for windows it is possible to modify brightness and contrast for the display, but that's about it, no saturation, no colorization.
The "make a screenshot and play around with rgb" will have abysmal performance and a number of other possible complications, such as event handling.
Now, if you want to apply a color filter to your Qt application, Qt has the QGraphicsEffect class, which automatically hooks up with the rendering system, caches the target to an image and applies to desired effect. I am not sure how well will that work for the "transparent window on top" idea.
It only has a few stock effects, but you can easily roll out your own. Then you can use QWidget::setGraphicsEffect(QGraphicsEffect * effect) to apply it to the desired widget or derived.

Are VCL ListViews ListBox DBGrids full touch aware?

Since we have tablets with Windows 10 I have decided to use again Delphi XE7 and VCL to develop for this multitouch devices.
I have found ListView, ListBox and DBGrid seem not have a standard behavior with pan and scroll (just PanUp & PanDown, ScrollUp ScrollDown). DBGrid does not support touching panning. ListBox, seem doesn't control inertial panning like TListview... and ListView react erratically, sometimes "loose" pannings moving scrollbar but not items list.
Have someone tested this controls on Windows 8.1 or Windows 10 using a multitouch tablet ?. Just load components with, let me say 100 items and try to have a simple vertical smooth scroll / pan using fingers.
All together is kind frustrating, and I cannot focus in develop application which is my task.
Question is: Which is the right component or way to use panning (at least vertical panning / Scrolling) with touch screens and working smooth and without problems ? I thought this components should react to standard actions (like PanUp or PanDown) without need to implement the Gesture Manager and control one by one each touch on screen. I would like to receive your kind feedback. Thank You
Conclusion: Many thanks to all who have helped with their comments. My own conclusion is Delphi is not ready to be used as a RAD for touching screens. The touching implementation is poor and need too much work for very standard using. Should not be necessary invent the wheel again for a very common and standard controls. Actually there are more mobile device users, than desktop users. Perhaps Embarcadero should decide to pay attention to this matter, and give well finished tools wich meet the OS touch and feel controls.
Let me add the same in FM using TGrid works fine.

Windows C++ dialog resizer class

I'm looking for a really good dialog resizer class that will stretch and shrink individual items as needed as the screen is resized. Stephan Keil has a good one (DlgResizeHelper) which basically resizes everything by a set ratio, but I'm looking for something smarter.
For example:
Icons should not resize
Single-line text boxes should not be stretched vertically
Buttons should probably stay the same size
Basically I'm looking for something to look at all of the controls, figure out that a static text field is related to a control next/below it and anchor the two together, and resize large controls in a 'smart' way so it looks good.
Are there such frameworks out there? I've been working on one but something ready-made would probably be better.
FOLLOW UP: I'm looking at the suggested solutions. Many of them require you to go in an anchor each control on the dialog. I'm looking for something smart that will figure out what the anchors ought to be, with the ability to manually anchor if the guesses are wrong. Seems like it should be possible -- most humans would agree a static text field next to an edit field should be anchored together. Guess I'm almost looking for a little AI here :)
You can use wxWidgets. It completely replaces MFC, is multi-platform, and gives you a layout-based dialog mechanism.
I use ResizableLib (also does PropertySheets and Pages) off codeproject, IIRC. You set anchor points that determine how the dialog and controls resize or move as the dialog moves.
You can set up to 2 anchors per control, (left, right) so you can move them as the dialog moves, or resize them as it moves. Its very easy to understand, if difficult to get perfectly right :)
I've tried many and finally settled on http://www.codeproject.com/KB/dialog/layoutmgr.aspx. It doesn't do the 'intelligent' layouting that you suggest though. I've never seen that in any library, on any platform - I don't see how it would work without having lots of under the hood magic that'd have to be overridden half of the time anyway.
The Ultimate Toolbox MFC library (here on CodeProject) includes a layout manager. I haven't used it myself, but it looks like it does what you want.
You can look at Professional GUI we use their class library for resizing our dialog controls. I think that is part of their free version.
We use CResize class from CodeGuru to resize all controls automatically. You tell how you want each control to be resized and it does the job for you.
The resize paradigm is to specify how much each side of a control will move when the dialog is resized.
SetResize(IDC_EDIT1, 0, 0, 0.5, 1);
SetResize(IDC_EDIT2, 0.5, 0, 1, 1);
Very handy when you have a large number of dialog controls.
Source code
This is a free solution also from CodeProject
http://www.codeproject.com/KB/dialog/dlgresizearticle.aspx
It's just a set of simple macros that position controls as the dialog resizes.
Edit - following the OPs comments. I don't know of any general sizer support like QT/WX for MFC, it doesn't seem to be present in new frameworks like Winforms either.
It is in QT/WX because it is necessary for multiplatform where widgets may be a different size, which explains MS lack of it. But it is also vital for multi-language ports, eg. where the German for cancel is 30 characters long.

How to fix an MFC Painting Glitch?

I'm trying to implement some drag and drop functionality for a material system being developed at my work. Part of this system includes a 'Material Library' which acts as a repository, divided into groups, of saved materials on the user's hard drive.
As part of some UI polish, I was hoping to implement a 'highlight' type feature. When dragging and dropping, windows that you can legally drop a material onto will very subtly change color to improve feedback to the user that this is a valid action.
I am changing the bar with 'Basic Materials' (Just a CWnd with a CStatic) from having a medium gray background when unhighlighed to a blue background when hovered over. It all works well, the OnDragEnter and OnDragExit messages seem robust and set a flag indicating the highlight status. Then in OnCtrlColor I do this:
if (!m_bHighlighted) {
pDC->FillSolidRect(0, 0, m_SizeX, kGroupHeaderHeight, kBackgroundColour);
}
else {
pDC->FillSolidRect(0, 0, m_SizeX, kGroupHeaderHeight, kHighlightedBackgroundColour);
}
However, as you can see in the screenshot, the painting 'glitches' below the dragged object, leaving the original gray in place. It looks really ugly and basically spoils the whole effect.
Is there any way I can get around this?
Remote debugging is a godsend for debugging visual issues. It's a pain to set up, but having a VM ready for remote debugging will pay off for sure.
What I like to do is set a ton of breakpoints in my paint handling, as well as in the framework paint code itself. This allows you to effectively "freeze frame" the painting without borking it up by flipping into devenv. This way you can get the true picture of who's painting in what order, and where you've got the chance to break in a fill that rect the way you need to.
It almost looks like the CStatic doesn't know that it needs to repaint itself, so the background color of the draggable object is left behind. Maybe try to invalidate the CStatic, and see if that helps at all?
Thanks for the answers guys, ajryan, you seem to always come up with help for my questions so extra thanks.
Thankfully this time the answer was fairly straightforward....
ImageList_DragShowNolock(FALSE);
m_pDragDropTargetWnd->SendMessage(WM_USER_DRAG_DROP_OBJECT_DRAG_ENTER, (WPARAM)pDragDropObject, (LPARAM)(&dragDropPoint));
ImageList_DragShowNolock(TRUE);
This turns off the drawing of the dragged image, then sends a message to the window being entered to repaint in a highlighted state, then finally redraws the drag image over the top. Seems to have done the trick.