Create Windows app similar to Windows 7 Gadgets - windows

I'm looking for an idea of how to develop a simple Windows application which will show an image (overlayed and always on top). An image should be clickable.
Similar to gadgets in Windows 7.
How to do it? Tnx.

To make the window overlay, use SetLayeredWindowAttributes
and to make it top most set the WS_EX_TOPMOST extended style at creation

Related

Why is my application's window border grey in Windows 8, rather than being based off the desktop like other windows?

I have a large legacy application which is showing up with a perpetually grey border on every Windows 8 machine we run it on, while the other windows for other apps accurately use a color derived from the desktop background. For the life of me I can't find out why.
I've tried my best google-fu to crawl MSDN for APIs to control this but came up empty. The app looks like all others in Windows XP, Vista, and 7...just Windows 8 is grey in color. We definitely haven't added Win8 specific code to treat this otherwise.
It's just an MFC window on the outside, but inside it embeds a .NET/WPF component and a Direct3D 9-enabled visual area.
My best guess is it could somehow be related to having a Direct3D surface in the window, but I couldn't validate that anywhere.
Any help would be greatly appreciated!
Thanks
Edit: The grey matches the effect of not having focus, and we definitely do play games with window focus...so that could be it.
The problem was a developer overloaded OnNcActivate() and returned TRUE at the end. They needed to call up to the baseclass's (CWnd) OnNcActivate instead.
This was visible on Windows 7 as well if you looked close enough.
The Desktop in Windows 8 does not use transparency in window borders like Windows 7 and Vista did with the Aero Themes. If you are move the focus to another top window in your app, this could explain why your seeing the grey border. Try changing the colors for windows without the focus to something discernable from grey to verify that is what you are seeing.

Animate Windows Wallpaper with QT

i want to make an animated wallpaper for windows. So far i have only expreience with Mac OS X programming and i'm new to windows. So i decided to work with QT because it seems that there is more help out there.
Until now i have created the app in a borderless window in qt. It work quiet fine.
But is there a way in QT to change the level of the window so that its appear above the windows wallpaper but behind the icons?
EDIT:
Ok if found a simple solution.
After some testing with the hints form kusg1 I figured out when there is a transparent window mouse events going still to the desktop.
I actualy want have this website has wallpaper: Ticketack. - So i created a frameless window which stays on bottom and has a transparent background and displays the text. Beside this i can change the windows wallpaper directly to get the background of the clock.
So clock text is not behind the icons but i think this will be ok.
Just some ideas: Use the windows flag as Qt::Window | Qt::FramelessWindowHint + Windows Stay at bottom hint, and set the content of the widget with your animated content (the suitable candidate is to use QGraphicsView).
The widget needs two main tasks:
Upon launching, it grabs the desktop background as pixmap and do overlay with the animated content (this needs to have the desktop to be wallpaper-less for simple scenario).
The widget needs to capture mouse and focus event and channel back to actual window command if the user wants to click the icon on the desktop.
Update:
Some pointers for the implementation:
For managing desktop icon, there is a good article here! (also found from SO).
Qt example and demos has an example on the taking desktop snapshot, the snippet is: QPixmap::grabWindow(QApplication::desktop()->winId());
Answer to your question: no, there isn't.
However, you can try something like this using Windows API: How to draw directly on the Windows desktop, C#?

Ribbon UI and Desktop Window Manager API on windows

I am trying to implement my own ribbon UI in native c++. How is this implemented on windows XP ?? Unfortunately I cannot use any of the available frameworks.
I have been able to get my app working on windows 7 following the sample shown at http://msdn.microsoft.com/en-us/library/windows/desktop/bb688195(v=VS.85).aspx
My app has buttons in the titlebar area on the top left corner and tabs integrated with glass/window background.This works for vista and 7 but not on XP. Is it possible to implement this on XP ??
Office 2010 seems to still have the same look sans the glass effect when i turn off the Aero theme on win7. How would i get this to happen in my app??
Thanks,
Abhinay
It is not possible to implement ribbon UI yourself on Windows XP since Windows XP does not contain an API for that purpose. Apart from that the ribbon UI internally uses the undocumented NetUI (the class name of the ribbon window is NetUIHWND).

How to draw button in title bar like in Google Chrome?

I tried several components from 2000-2001, but none of them works for win7. How do I do it?
If you are looking for a way to make use of glass frame in Windows 7 using Delphi, you can follow this tutorial. There is also an update available dedicated to a 64 bit bug. You can also look at some examples by Chris Rolliston available on embarcadero developer network.
Or they probably just draw their own components like a video game would do and they emulated the windows 7 look and feel.
You could use rkSmartTabs:
Or IceTabSet:
Finally, check out the answers to these StackOverflow questions:
Google Chrome Tabs Style UI in Delphi
Resources for Windows Aero Glass and Compositing dwm
Take a look at my TChromeTabs component (http://code.google.com/p/delphi-chrome-tabs/downloads/list). As well as the Chrome Tabs implementation it includes a TForm descendant that will show you how to draw in an Aero title bar.
.NET Framework Windows Vista & 7 Features
This maybe

Screenshot of window

I'm trying to take screenshots of all open windows, also the minimized ones. Currently I'm using this code:
http://www.developerfusion.com/code/4630/capture-a-screen-shot/
But it doesn't work for minimized windows and the areas where there is a Glass effect since Vista like the explorer title bar are black. Can anyone help me out?
My objective is to create something similar to Flip 3D; it would be great if someone also knew something about how to create a live preview.
For the glass effect areas: I think it doesn't work because those areas may be drawn with some strange DirectX method instead of normal GDI.
For the minimized windows problem: if a window is minimized, its DC isn't painted (conceptually, it doesn't even have a reason to exist); you should try to send to such windows a WM_PRINT message, asking them to paint themselves on the DC you'll provide them. The problem with this approach is that not all the windows handle correctly WM_PRINT.
I've found the API that is used for the taskbar previews a.s.o.:
DWM Thumbnail Overview
Pretty awesome, it even allows you to do live previews!

Resources