Force iconic representation except when Flip3D is used

In an application of mine, I want to have the Peek preview set to a bitmap that I am generating.

As a result, I call DwmSetWindowAttribute to set DWMWA_HAS_ICONIC_BITMAP and DWMWA_FORCE_ICONIC_REPRESENTATION to TRUE.

This works, I'm receiving the WM_DWMSENDICONICTHUMBNAIL and WM_DWMSENDICONICLIVEPREVIEWBITMAP messages just fine.

However, there is one issue when using the Flip3D (Win-Tab) feature in that it's the thumbnail that gets requested, not the live preview.

Not setting DWMWA_FORCE_ICONIC_REPRESENTATION to TRUE means that I don't get the WM_DWMSENDICONIC messages, so I can't remove it permanently.

However, if the application is notified when Flip3D is starting/stopping, then I can set DWMWA_FORCE_ICONIC_REPRESENTATION to FALSE and TRUE accordingly.

Do you know if and how the application is notified when Flip3D is starting/stopping?

Answers


There is no notification of Flip3D activity. The DWM messages are your only indication. When dealing with live previews, make sure you are calling DwmInvalidateIconicBitmaps() whenever your window contents change so that Windows knows it needs to request an updated bitmap from you.


Need Your Help

Get filename and path from uri for a text file

android uri text-files absolute-path

I have an application that is supposed to be able to open and read a text file from an e-mail.

android floating action button show() not working

android floating-action-button

I have a floating action button (FAB) and an Async Task that calls FAB.hide() before loading some data in background, and FAB.show() after it's done. For some reason, Even though my console log cle...