そしたら、最小化した後にウィンドウが表示されなくなり、タスクバークリックで最小化ができません。
どのようにしたら使えるようになりますか?
WindowsAPIとか全然知らないので、ご教授お願いします。
title "Wexblorer - 起動中" verinfo="0.01" wsize=800,600,8,25 tsize=wsize(3)+25 wcolor=0,0,0 name="" #include "llmod3/llmod3.hsp" #include "llmod3/obj.hsp" #uselib "user32.dll" #func SetWindowLong "SetWindowLongA" int,int,int #func SetWindowPos "SetWindowPos" int, nullptr, nullptr, nullptr, nullptr, nullptr, int #define global LoadCursor LoadCursorA #func global LoadCursorA "LoadCursorA" sptr,sptr #define global SetClassLong SetClassLongA #func global SetClassLongA "SetClassLongA" sptr,sptr,sptr #func global GetSystemMenu "GetSystemMenu" sptr,sptr #define global InsertMenu InsertMenuA #func global InsertMenuA "InsertMenuA" sptr,sptr,sptr,sptr,sptr #define global GetWindowLong GetWindowLongA #func global GetWindowLongA "GetWindowLongA" sptr,sptr #func global EnableMenuItem "EnableMenuItem" sptr,sptr,sptr #undef mousex #undef mousey #define mousex (mx2-wpos(0)) #define mousey (my2-wpos(1)) /* #undef mousex #undef mousey #define mousex (ginfo(0)-(ginfo(4)+(ginfo(10)-ginfo(12))/2)) #define mousey (ginfo(1)-(ginfo(5)+(ginfo(11)-ginfo(13))-((ginfo(10)-ginfo(12))/2))) */ #module #deffunc defcls array wsize,array wcolor,str name,int loadingfrag color 127,127,127 boxf color wcolor(0),wcolor(1),wcolor(2) boxf 1,1,wsize(0)-2,wsize(1)-2 if loadingfrag=1{ if wcolor(0)+wcolor(1)+wcolor(2)<=381:color wcolor(0),(wcolor(1)+255)/2,wcolor(2):else:color 0.8*wcolor(0),wcolor(1),0.8*wcolor(2) boxf 1,1,wsize(0)-110,wsize(3) } if wcolor(0)+wcolor(1)+wcolor(2)<=381:color wcolor(0)+0.5*(255-wcolor(0)),wcolor(1)+0.5*(255-wcolor(1)),wcolor(2)+0.5*(255-wcolor(2)):else:color 0.5*wcolor(0),0.5*wcolor(1),0.5*wcolor(2) pos 5,(wsize(3)-14)/2 font MSGothic,14,16 mes name+" - Wexblorer" repeat 100 gmode 3,1,wsize(3),255*cnt/100 pos wsize(0)-210+cnt,1 gcopy 3,0,0 loop color wcolor(0),wcolor(1),wcolor(2) boxf wsize(0)-109,1,wsize(0)-2,wsize(3)+1 color wcolor(0)+0.5*(255-wcolor(0)),wcolor(1)+0.5*(255-wcolor(1)),wcolor(2)+0.5*(255-wcolor(2)) boxf wsize(2),wsize(3)+1,wsize(0)-wsize(2)-1,wsize(3)+25 color 255,0,0 line wsize(0)-50,wsize(3)+1,wsize(0)-50,1 if wcolor(0)+wcolor(1)+wcolor(2)<=381:color wcolor(0)+0.5*(255-wcolor(0)),wcolor(1)+0.5*(255-wcolor(1)),wcolor(2)+0.5*(255-wcolor(2)):else:color 0.5*wcolor(0),0.5*wcolor(1),0.5*wcolor(2) line wsize(0)-80,wsize(3)+1,wsize(0)-80,1 line wsize(0)-110,wsize(3)+1,wsize(0)-110,1 line wsize(0)-21,(wsize(3)-10)/2,wsize(0)-31,(wsize(3)-10)/2+10 line wsize(0)-22,(wsize(3)-10)/2,wsize(0)-32,(wsize(3)-10)/2+10 line wsize(0)-32,(wsize(3)-10)/2,wsize(0)-22,(wsize(3)-10)/2+10 line wsize(0)-33,(wsize(3)-10)/2,wsize(0)-23,(wsize(3)-10)/2+10 color 192,192,192 line wsize(0)-wsize(2),wsize(3)+24,wsize(2),wsize(3)+24 color wcolor(0)/2,wcolor(1)/2,wcolor(2)/2 circle wsize(2)+2,wsize(3)+2,wsize(2)+22,wsize(3)+22 circle wsize(2)+22,wsize(3)+2,wsize(2)+42,wsize(3)+22 color wcolor(0)+0.5*(255-wcolor(0)),wcolor(1)+0.5*(255-wcolor(1)),wcolor(2)+0.5*(255-wcolor(2)) boxf wsize(2)+17,wsize(3)+2,wsize(2)+26,wsize(3)+22 boxf wsize(2)+10,wsize(3)+10,wsize(2)+33,wsize(3)+12 return #deffunc clchk stick clfr,256,256 if clfr&256:clickcnt++:else:clickcnt=0 return clickcnt #global #define defcls2 gmode 0,wsize(0),wsize(1),255:pos 0,0:gcopy 1,0,0 #define DIID_DWebBrowserEvents2 "{34A715A0-6587-11D0-924A-0020AFC7AC4D}" #define DISPID_COMMANDSTATECHANGE 105 #define DISPID_BEFORENAVIGATE2 250 #define DISPID_NAVIGATECOMPLETE2 252 #define DISPID_ONQUIT 253 #define DISPID_ONMENUBAR 256 #define DISPID_ONSTATUSBAR 257 #define DISPID_ONFULLSCREEN 258 #define DISPID_WINDOWSETLEFT 264 #define DISPID_WINDOWSETTOP 265 #define DISPID_WINDOWSETWIDTH 266 #define DISPID_WINDOWSETHEIGHT 267 #define DISPID_ONTHEATERMODE 260 dim wmenu,3 buffer 1,ginfo(20),ginfo(21) buffer 2,ginfo(20),ginfo(21) buffer 3,1,wsize(3) color wcolor(0),wcolor(1),wcolor(2) boxf buffer 4,ginfo(20),ginfo(21) buffer 5,ginfo(20),ginfo(21) bgscr 0,ginfo(20),ginfo(21) GetWindowLong hwnd, -16 SetWindowLong hwnd, -16, stat | $80000 | $10000 GetSystemMenu hwnd, 0 hSystemMenu = stat EnableMenuItem hSystemMenu,$F020,0 wpos=ginfo(4),ginfo(5) width wsize(0),wsize(1) sdim url,512 url="http://www.yahoo.co.jp" objsize wsize(0)-130-wsize(2),22 pos 130,wsize(3)+2 input url urlbox_id=stat urlbox_hn = objinfo(urlbox_id, 2) SetWindowLong urlbox_hn, -20, $0 ; スタイルを変えて SetWindowPos urlbox_hn, $27 ; 再描画 pos wsize(2),tsize axobj ie, "Shell.Explorer.2",wsize(0)-wsize(2)*2,wsize(1)-tsize-wsize(2) num=stat comevent ie_event, ie, DIID_DWebBrowserEvents2,*event ie->"Navigate" url oncmd gosub *event_WM_SIZE, 0x0005 *t_set gsel 1 defcls wsize,wcolor,name,loadingfrag gsel 2 defcls2 color 255,0,0 line wsize(0)-21,(wsize(3)-10)/2,wsize(0)-31,(wsize(3)-10)/2+10 line wsize(0)-22,(wsize(3)-10)/2,wsize(0)-32,(wsize(3)-10)/2+10 line wsize(0)-32,(wsize(3)-10)/2,wsize(0)-22,(wsize(3)-10)/2+10 line wsize(0)-33,(wsize(3)-10)/2,wsize(0)-23,(wsize(3)-10)/2+10 gsel 4 defcls2 color wcolor(0)/2,wcolor(1)/2,wcolor(2) circle wsize(2)+2,wsize(3)+2,wsize(2)+22,wsize(3)+22 color wcolor(0)+0.5*(255-wcolor(0)),wcolor(1)+0.5*(255-wcolor(1)),wcolor(2)+0.5*(255-wcolor(2)) boxf wsize(2)+17,wsize(3)+2,wsize(2)+26,wsize(3)+22 boxf wsize(2)+10,wsize(3)+10,wsize(2)+33,wsize(3)+12 gsel 5 defcls2 color wcolor(0)/2,wcolor(1)/2,wcolor(2) circle wsize(2)+22,wsize(3)+2,wsize(2)+42,wsize(3)+22 color wcolor(0)+0.5*(255-wcolor(0)),wcolor(1)+0.5*(255-wcolor(1)),wcolor(2)+0.5*(255-wcolor(2)) boxf wsize(2)+17,wsize(3)+2,wsize(2)+26,wsize(3)+22 boxf wsize(2)+10,wsize(3)+10,wsize(2)+33,wsize(3)+12 onffrag=1 gsel 0 *main if minimamfrag=1:gosub *minimam if exitfrag=1:goto *exit if oncfrag=1:oncfrag=0:goto *t_set wpos=ginfo(4),ginfo(5) mx2=ginfo(0) my2=ginfo(1) mx=mousex my=mousey pos 0,0 redfr=1 if (mx>=wsize(0)-50 and mx<=wsize(0) and my>=10 and my<=wsize(3)) or (mx>=wsize(0)-50 and mx<=wsize(0)-10 and my>=0 and my<=10):redfr=2 if mx>=wsize(2)+2 and mx<wsize(2)+22 and my>=wsize(3)+2 and my<wsize(3)+22:redfr=4 if mx>=wsize(2)+22 and mx<wsize(2)+42 and my>=wsize(3)+2 and my<wsize(3)+22:redfr=5 if redfrst!redfr or onffrag=1{ pos 0,0 gcopy redfr,0,0,wsize(0),wsize(1) redfrst=redfr onffrag=0 } clchk clcnt=stat if clcnt=0{ drfr=0 resizefrag=0 } if clcnt=1{ if mx>=wsize(0)-110 and mx<wsize(0)-80 and my>=0 and my<=wsize(3):minimamfrag=1 if (mx>=wsize(0)-50 and mx<=wsize(0) and my>=10 and my<=wsize(3)) or (mx>=wsize(0)-50 and mx<=wsize(0)-10 and my>=0 and my<=10):exitfrag=1 if my<=wsize(3) and my>=0.2*wsize(3) and mx<wsize(0)-110:drfr=1 if mx>=wsize(2)+2 and mx<wsize(2)+22 and my>=wsize(3)+2 and my<wsize(3)+22:goto *go_b if mx>=wsize(2)+22 and mx<wsize(2)+42 and my>=wsize(3)+2 and my<wsize(3)+22:goto *go_f //サイズ変更 if mx>=wsize(0)-wsize(2) and mx<=wsize(0) and my>=wsize(1)-wsize(2) and my<=wsize(1):resizefrag=1 if mx>=wsize(0)-wsize(2) and mx<=wsize(0) and my>wsize(3) and my<wsize(1)-wsize(2):resizefrag=2 if mx>wsize(0)-10 and mx<=wsize(0) and my>=0 and my<10:resizefrag=3 if mx>=wsize(2) and mx<wsize(0)-110 and my>=0 and my<0.2*wsize(3):resizefrag=4 if mx>=0 and mx<=wsize(2) and my>=0 and my<0.2*wsize(3):resizefrag=5 if mx>=0 and mx<=wsize(2) and my>0.2*wsize(3) and my<wsize(1)-wsize(2):resizefrag=6 if mx>=0 and mx<=wsize(2) and my>=wsize(1)-wsize(2) and my<=wsize(1):resizefrag=7 if mx>wsize(2) and mx<wsize(0)-wsize(2) and my>=wsize(1)-wsize(2) and my<=wsize(1):resizefrag=8 } if drfr=1{ sendmsg hwnd,$00A1,2,0 } if resizefrag=1 and (mx2!mx2stock or my2!my2stock){ width wsize(0)+mx2-mx2stock,wsize(1)+my2-my2stock gosub *event_WM_SIZE } if resizefrag=2 and mx2!mx2stock{ width wsize(0)+mx2-mx2stock gosub *event_WM_SIZE } if resizefrag=3 and (mx2!mx2stock or my2!my2stock){ width wsize(0)+mx2-mx2stock,wsize(1)-my2+my2stock,-1,limit(wpos(1)+my2-my2stock,0,ginfo(21)) gosub *event_WM_SIZE } if resizefrag=4 and my2!my2stock{ width wsize(0),wsize(1)-my2+my2stock,-1,limit(wpos(1)+my2-my2stock,0,ginfo(21)) gosub *event_WM_SIZE } if resizefrag=5 and (mx2!mx2stock or my2!my2stock){ width wsize(0)-mx2+mx2stock,wsize(1)-my2+my2stock,limit(wpos(0)+mx2-mx2stock,0,ginfo(20)),limit(wpos(1)+my2-my2stock,0,ginfo(21)) gosub *event_WM_SIZE } if resizefrag=6 and mx2!mx2stock{ width wsize(0)-mx2+mx2stock,wsize(1),limit(wpos(0)+mx2-mx2stock,0,ginfo(20)),-1 gosub *event_WM_SIZE } if resizefrag=7 and (mx2!mx2stock or my2!my2stock){ width wsize(0)-mx2+mx2stock,wsize(1)+my2-my2stock,limit(wpos(0)+mx2-mx2stock,0,ginfo(20)),-1 gosub *event_WM_SIZE } if resizefrag=8 and my2!my2stock{ width wsize(0),wsize(1)+my2-my2stock gosub *event_WM_SIZE } curid=0x7F00 if resizefrag=1 or (mx>=wsize(0)-wsize(2) and mx<=wsize(0) and my>=wsize(1)-wsize(2) and my<=wsize(1)):curid=0x7F82 if resizefrag=2 or (mx>=wsize(0)-wsize(2) and mx<=wsize(0) and my>wsize(3) and my<wsize(1)-wsize(2)):curid=0x7F84 if resizefrag=3 or (mx>wsize(0)-10 and mx<=wsize(0) and my>=0 and my<10):curid=0x7F83 if resizefrag=4 or (mx>10 and mx<=wsize(0)-110 and my>=0 and my<0.2*wsize(3)):curid=0x7F85 if resizefrag=5 or (mx>=0 and mx<=10 and my>=0 and my<0.2*wsize(3)):curid=0x7F82 if resizefrag=6 or (mx>=0 and mx<=10 and my>0.2*wsize(3) and my<wsize(1)-wsize(2)):curid=0x7F84 if resizefrag=7 or (mx>=0 and mx<=10 and my>=wsize(1)-wsize(2) and my<=wsize(1)):curid=0x7F83 if resizefrag=8 or (mx>=10 and mx<wsize(0)-110 and my>=wsize(1)-wsize(2) and my<=wsize(1)):curid=0x7F85 /*カーソルID一覧 通常 0x7F00 小砂時計 0x7F8A 砂時計 0x7F02 上向き矢印 0x7F04 左上右下矢印 0x7F82 右上左下矢印 0x7F83 左右矢印 0x7F84 上下矢印 0x7F85 全方向カーソル 0x7F86 禁止 0x7F88 指(リンク) 0x7F89 入力カーソル 0x7F01 十字カーソル 0x7F03 */ if curst!curid{ LoadCursor 0, curid SetClassLong hwnd, -12, stat curst=curid } mxstock=mx mystock=my mx2stock=mx2 my2stock=my2 await 10 goto *main *event ; COMイベント処理 dispid = comevdisp(ie_event) if dispid = DISPID_BEFORENAVIGATE2 : gosub *OnBeforeNavigate if dispid = DISPID_NAVIGATECOMPLETE2 : gosub *OnNavigateComplete2 if dispid = 250 : gosub *OnNavigateBefore2 return *OnBeforeNavigate comevarg name,ie_event,1 objprm 0,name return *OnNavigateComplete2 pDoc = ie("Document") name = pDoc("Title") title name delcom pDoc loadingfrag=0 oncfrag=1 return *OnNavigateBefore2 if silent="0":IE("Silent") = 1 loadingfrag=1 oncfrag=1 return *wow ie->"Navigate" url goto *main *go_f ie->"GoForward" goto *main *go_b ie->"GoBack" goto *main *refresh ie->"Refresh2" 3 goto *main *stop1 ie->"stop" goto *main *exit end *event_WM_SIZE wsize(0)=ginfo(12) wsize(1)=ginfo(13) dim fea,6 getobjsize fea,num fea(0)=wsize(0)-wsize(2)*2 fea(1)=wsize(1)-tsize-wsize(2) resizeobj num,fea getobjsize fea,urlbox_id fea(0)=wsize(0)-130-wsize(2) resizeobj urlbox_id,fea oncfrag=1 return *minimam sendmsg hwnd, $112, $F020 return