| |
|
|
E.T. | even needed: Messagebox only with the "Abbrechen" - Button (so as manner Info-Box) yet possible:
0 - OK (~MB_OK) 1 - OK Cancel (~MB_OKCANCEL) 2 - Cancel repeat ignore (~MB_ABORTRETRYIGNORE) 3 - Yes No Cancel (~MB_YESNOCANCEL) 4 - Yes No (~MB_YESNO) 5 - repeat Cancel (~MB_RETRYCANCEL)
Hm, ~MB_CANCEL Gibts Yes well (lt. Konstantin Opel) not, but vlt. has Yes someone for 'ne Solution ?? in this zusammenhang might nat. the Prog not The M-Box Waiting separate should moreover walk. For this should one then but again the lever the M-Box know, circa these abzufragen...
background: Program reads data one, Mainwindow becomes "deaktiviert". very in this drop ought to a M-Box with the Info "Programm reads data ein" (or something like) attend, which the User The Possibility gives, the whole to interrupt.
or remaining there only, the Info-Window complete self to create ?? |
|
|
| XProfan X2Grüße aus Sachsen... Mario WinXP, Win7 (64 Bit),Win8(.1),Win10, Win 11, Profan 6 - X4, XPSE, und 'nen schwarzes, blinkendes Dingens, wo ich das alles reinschütte... | 06/29/12 ▲ |
|
|
|
|
RGH | what speaks against it, with "Ok" To confirm, whom Info red to have? the are at least The Windows provided Messageboxtypen.
If the program weiterlaufen should, must You, the Hinwweisfenster eh' self create (or a own Process use).
Greeting Roland |
|
|
| XProfan X2Intel Duo E8400 3,0 GHz / 4 GB RAM / 1000 GB HDD - ATI Radeon HD 4770 512 MB - Windows 7 Home Premium 32Bit - XProfan X4 | 06/29/12 ▲ |
|
|
|
|
| ... or a own Thread use or _ohne own Thread with the
SetTimer-API a APC into Hauptthread injizieren.
Look you too times the Include asyncMsgBox.inc on: [...]
from the Okrea-code have I strain: rausgefitzelt -
so determined to the lever the OK-Buttons if to the MessageBox-Fensterhandle knows.
If you lest weiterkommst then simply again report. |
|
|
| |
|
|
|
| Hihi,
schauma: Download external Download
{$cleq}
const asyncMessageBox.Message=1025
declare asyncMessageBox.C&
decimals 0
proc asyncMessageBox
parameters wnd&,s$,tit$,mode&
add asyncMessageBox.C&,1
var h&=globalAlloc(gPTR,24)
long h&,0=addr(s$),addr(tit$),mode&,wnd&,create("text",hWnd,"",0,0,0,0),asyncMessageBox.C&
setWindowLong(long(h&,16),gwl_userdata,setWindowLong(long(h&,16),gwl_wndProc,procaddr(asyncMessageBox.wndProc,4)))
asyncMessageBox.createThread(h&)
while long(h&,0)
sleep 10
wend
whileloop 100
wend
var msg&=long(h&,16)
userMessages asyncMessageBox.Message
globalFree(h&)
var msgboxWnd&=findWindow("."+st$(hWnd)+"."+st$(asyncMessageBox.C&))
settext msgboxWnd&,tit$
return msgboxWnd&
endproc
nProc asyncMessageBox.createThread
parameters h&
createThread(0,0,procAddr(asyncMessageBox.thread,1),h&,0,0)
endproc
nProc asyncMessageBox.wndProc
Parameters wnd&,msg&,wp&,lp&
if msg&=asyncMessageBox.Message
sendMessage(hWnd,asyncMessageBox.Message,wnd&,lp&)
destroyWindow(wnd&)
return 0
endif
return callWindowProc(getWindowLong(wnd&,gwl_userData),wnd&,msg&,wp&,lp&)
endproc
nproc asyncMessageBox.thread
parameters h&
var s$=string $(long(h&,0),0)
var tit$=string $(long(h&,4),0)
var mode&=long(h&,8)
var wnd&=long(h&,12)
var trd&=long(h&,16)
long h&,0=0
sendMessage(trd&,asyncMessageBox.Message,0,messageBox(wnd&,s$,"."+st$(hWnd)+"."+st$(long(h&,20)),mode&))
return 0
endproc
cls
var myMsgBoxWnd&=asyncMessageBox(desktop,"Huhu","Titel",mb_ok)
settext findWindowEx(myMsgBoxWnd&,0,"BUTTON","OK"),"&Abbrechen"
while 1
waitinput
wend
end
or herewith zählts pretty down and closes itself self-employed:
cls
var myMsgBoxWnd&=asyncMessageBox(desktop,"Huhu","Titel",mb_ok)
var btn&=findWindowEx(myMsgBoxWnd&,0,"BUTTON","OK")
var c&=10
while (c&+2) and isWindow(myMsgBoxWnd&)
waitinput 1000
settext btn&,"&Abbrechen ["+st$(c&)+"]"
sub c&,1
wend
case isWindow(myMsgBoxWnd&) : sendMessage(myMsgBoxWnd&,wm_close,0,0)
print "fertsch"
while 1
waitinput
wend
end
|
|
|
| |
|
|
|
| and here time mere by External:
'{$cleq}
decimals 0
cls
var myTimer&=external("user32","SetTimer",0,0,100,procAddr(myMessageBoxAPCProc,4))
print messageBox("Text","."+st$(%hWnd)+".Hello World!",0)
waitinput
end
proc myMessageBoxAPCProc
parameters wnd&,msg&,id&,tme&
var s$="."+st$(%hWnd)+"."
var msgboxWnd&=findWindow(s$)
casenot msgboxWnd& : return
external("user32","KillTimer",0,myTimer&)
settext msgboxWnd&,del$(getText$(msgboxWnd&),1,len(s$))
var btn&=external("user32","FindWindowExA",msgboxWnd&,0,"BUTTON","OK")
casenot btn& : return
setText btn&,"&Abbrechen"
endProc
so the so written but against 100%ig (instead of 99%ig) "absturzsicher" is, should something like Roland nativ install because one APC on a interpretierte XProfan- Proc can always crash particularly so komplexer and larger the program is. |
|
|
| |
|
|