http://screwofhead.blog.fc2.com/blog-entry-2.html
などのサイトを見てこんなソースを組んでみましたが動きません…
どこを直せばいいでしょうか?
#uselib "dwmapi.dll" #func DwmRegisterThumbnail "DwmRegisterThumbnail" int, int, var #func DwmUpdateThumbnailProperties "DwmUpdateThumbnailProperties" int, var #func DwmUnregisterThumbnail "DwmUnregisterThumbnail" int #define DWM_TNP_RECTDESTINATION 0x00000001 #define DWM_TNP_RECTSOURCE 0x00000002 #define DWM_TNP_OPACITY 0x00000004 #define DWM_TNP_VISIBLE 0x00000008 #define DWM_TNP_SOURCECLIENTAREAONLY 0x00000010 #uselib "user32.dll" #cfunc GetForegroundWindow "GetForegroundWindow" screen 0, 200, 200 objsize 200, 200 : button "アクティブウィンドウ捕獲", *start stop *start screen 0, 640, 480, screen_hide wait 100 hwndThumbnail = 0 ;アクティブウィンドウのハンドル取得 hwndTarget = GetForegroundWindow() ;表示する側・される側のウィンドウハンドルを渡す DwmRegisterThumbnail hwnd, hwndTarget, hwndThumbnail if stat != 0 : dialog "DwmRegisterThumbnail失敗" : end ;終了時にはサムネイルのハンドルを開放 onexit *exit ;プロパティ設定 dim ThumbnailProperties, 6 ;DWM_THUMBNAIL_PROPERTIES構造体 dim dest, 4 dest = 0, 0, 100, 150 ThumbnailProperties = DWM_TNP_RECTDESTINATION | DWM_TNP_VISIBLE | DWM_TNP_SOURCECLIENTAREAONLY, dest, NULL, 1, TRUE, FALSE DwmUpdateThumbnailProperties hwndThumbnail, ThumbnailProperties if stat != 0 : dialog "DwmUpdateThumbnailProperties失敗" : goto *exit gsel 0, 1 stop *exit DwmUnregisterThumbnail hwndThumbnail end