Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
VISTA APP PREVIEW [Mini Window]
#1
Hello, I have noticed that on Vista, when you move your mouse over a minimised app window tab [AT THE BOTTOM OF YOUR SCREEN ON THE WINDOWS TASKBAR] It will show a mini preview of the window, without resizing the actual window or anything like that. I would like to know if this is possible to do with QM, but a constant Mini Preview of any Window

Say This Window: " -Instant Message" therefore i could see if someone has messaged me in a tiny window /preview whilst the actual instant message window be minimised.

Is this possible?

Thanks - Scott
#2
Function dlg_window_thumbnail
Code:
Copy      Help
\Dialog_Editor
function# hDlg message wParam lParam
if(hDlg) goto messages

if(!ShowDialog("dlg_window_thumbnail" &dlg_window_thumbnail 0)) ret

;BEGIN DIALOG
;0 "" 0x90C80A44 0x100 0 0 186 138 "Dialog"
;END DIALOG
;DIALOG EDITOR: "" 0x2030009 "*" "" ""

ret
;messages
sel message
,case WM_INITDIALOG
,int h=win("Calc")
,int-- thumbnail
,thumbnail=DwmShowThumbnail(hDlg h)
,
,case WM_DESTROY
,if(thumbnail) DwmUnregisterThumbnail thumbnail
,case WM_COMMAND goto messages2
ret
;messages2
sel wParam
,case IDOK
,case IDCANCEL
ret 1

Function DwmShowThumbnail
Code:
Copy      Help
;/
function# hwnd hwnd2

;Shows thumbnail of hwnd2 in hwnd.
;Works on Vista only.


if(_winnt<6) ret

type DWM_THUMBNAIL_PROPERTIES dwFlags RECT'rcDestination RECT'rcSource !opacity fVisible fSourceClientAreaOnly
def DWM_TNP_RECTDESTINATION 0x00000001
def DWM_TNP_RECTSOURCE 0x00000002
def DWM_TNP_OPACITY 0x00000004
def DWM_TNP_VISIBLE 0x00000008
def DWM_TNP_SOURCECLIENTAREAONLY 0x00000010
dll- dwmapi
,#DwmRegisterThumbnail hwndDestination hwndSource *phThumbnailId
,#DwmUnregisterThumbnail hThumbnailId
,#DwmUpdateThumbnailProperties hThumbnailId DWM_THUMBNAIL_PROPERTIES*ptnProperties

int thumbnail
int hr = DwmRegisterThumbnail(hwnd hwnd2 &thumbnail)
if(hr) ret

RECT r; GetClientRect hwnd &r

DWM_THUMBNAIL_PROPERTIES tp
tp.dwFlags = DWM_TNP_RECTDESTINATION|DWM_TNP_VISIBLE|DWM_TNP_SOURCECLIENTAREAONLY ;;note: if DWM_TNP_SOURCECLIENTAREAONLY flag set, always gets only client regardless of fSourceClientAreaOnly.
tp.fSourceClientAreaOnly = 1
tp.fVisible = 1
tp.opacity = 255
tp.rcDestination = r

hr = DwmUpdateThumbnailProperties(thumbnail &tp)

ret thumbnail
#3
Hmm, I am not sure if I have to have Windows Vista's theme set to ("Windows Vista Basic") or ("Windows Vista Aero") or ("Windows Classic") I have it currently set to ("Windows Classic") because it sometimes takes up extra memory using windows vista theme. So should it still work if i have Windows Classic theme set... or ?

All I did was run the Dialog, I didn't try to get the hwnd of the window, because I don't know what you mean... could you show me an example code PLEASE Big Grin

Thanks, I am sure this will work, you are the best!!!

P.S. Great addition by making macros for Vista only... it's another ( + ) for having Vista!
#4
the code shows Calculator window in the dialog. did not test with classic theme.
#5
any way you can show a deno on how this works?

and i know if you have a mac running on a window and then you mouse on it in the teskbar and the preview come up it will error out the mac with cant found errors anyways around this?
#6
Quote:any way you can show a deno on how this works?
Run calculator, then run function dlg_window_thumbnail. It shows calculator in the dialog.

Quote:and i know if you have a mac running on a window and then you mouse on it in the teskbar and the preview come up it will error out the mac with cant found errors anyways around this?
What the mac is? Please post code.
#7
i think i found why it does it sorry about that.. if i remove this from the code IEFrame

before
Htm el=htm("INPUT" "Google Search" "" win("Google - Windows Internet Explorer" "IEFrame") 0 3 0x421)
after
Htm el=htm("INPUT" "Google Search" "" win("Google - Windows Internet Explorer" "") 0 3 0x421)


Anyway around this as the window i use looks like this but it does change
stays this most the time
Htm el=htm("INPUT" "login_form_email" "" win("MYB Window" "WindowsForms10.Window.8.app.0.378734a") 0 0 0x121)

Changes the end letters or # WindowsForms10.Window.8.app.0.378734b so i have to remove it like below
Htm el=htm("INPUT" "login_form_email" "" win("MYB Window" "") 0 0 0x121)
#8
i tried to run the dlg_window_thumbnail and nothing but this Error in Macro8: expected 4 arguments, not 0. now what do i need to add to the
dlg_window_thumbnail to make it show the calculator.. Got to remember some of us aint pro and great at all this like you are Big Grin
#9
run dlg_window_thumbnail, not macro8.
#10
that is what i am running dlg_window_thumbnail its in side the macro8 i made a fun. with the name dlg_window_thumbnail and call it from macro8 not sure of any other way to run it.


Forum Jump:


Users browsing this thread: 1 Guest(s)