HSPポータル
サイトマップ お問い合わせ


HSPTV!掲示板


未解決 解決 停止 削除要請

2008
1120
拡大鏡Yahooコミックみたいな1未解決


拡大鏡

リンク

2008/11/20(Thu) 14:50:43|NO.20903

HSPのウインドウを表示したまま
ウインドウの後ろの画面を取得する方法を教えてもらいませんか

いろいろ試行錯誤したんですが無理でした。

よろしくお願いします。



この記事に返信する


New Monkey

リンク

2008/11/20(Thu) 23:38:55|NO.20913

Windowsの仕様上、隠れている部分を取得するのは無理だったような。
あらかじめスクリーン全体の画像を保存しておいたものをHSPのウィンドウに部分的にコピーすれば、そのように見せかけることはできます。
ただしこの方法では画面に変更があっても自動では反映されません。


#uselib "user32.dll" #func GetDC "GetDC" sptr #func ReleaseDC "ReleaseDC" sptr #uselib "gdi32.dll" #func BitBlt "BitBlt" sptr, sptr, sptr, sptr, sptr, sptr, sptr, sptr, sptr #const WSX 150 #const WSY 150 #const BW 5 scale = 2 bgscr 0, WSX+BW*2, WSY+BW*2, 0, ginfo_dispx color 255, 0, 0 : boxf wait 5 gosub *Capture gsel 0, 2 : width , , 0, 0 onclick gosub *OnClk onkey gosub *OnKy oncmd gosub *OnMove, $00000003 gosub *Draw stop *OnClk sendmsg hwnd, $000000A1, $00000002, 0 //ウィンドウをマウスで移動できるようにする return *OnMove gosub *Draw return *OnKy if iparam = $0000001B { end } //ESCキーで終了 if (iparam >= $00000031) & (iparam <= $00000039) { scale = iparam-$00000030 : gosub *Draw } //数字キーで倍率 if iparam = 'C' { gosub *Capture } //Cキーで再キャプチャ return *Draw pos BW, BW gzoom WSX, WSY, 2, ginfo_wx1+BW, ginfo_wy1+BW, int(WSX/scale), int(WSY/scale) //バッファに保存しておいた画像をコピー return *Capture gsel 0, -1 buffer 2, ginfo_dispx, ginfo_dispy GetDC 0 : hDCDsp = stat BitBlt hdc, 0, 0, ginfo_dispx, ginfo_dispy, hDCDsp, 0, 0, 0x00CC0020 //バッファにスクリーン全体をコピー ReleaseDC hDCDsp gsel 0, 2 return



ONION software Copyright 1997-2023(c) All rights reserved.