| |
|
|
| Manchmal muss man ein Control in einen eigenen Thread abstellen. KompilierenMarkierenSeparieren {$cle}
#include criticalSection.inc
cls
initCriticalSectionsManagement()
beginCriticalSection()
long data=globalAlloc(gPTR,4)
createThread(,,procAddr(thread),data,,)
waitCriticalSection()
waitInput
postmessage(long(data,),wm_quit,,)
waitInput
globalFree(data)
destroyCriticalSectionsManagement()
end
nProc thread(long data){
long msg=dim(28)
long data&,0=control("LISTBOX","",ws_popup | lbs_ownerdrawFixed,,,,,,,hInstance,)
endCriticalSection()
settext(hWnd,"läuft")
while getMessage(msg,,,) {
translateMessage(msg)
dispatchMessage(msg)
}
settext(hWnd,"zuende")
}
|
|
|
| |
|
|
|
| Natürlich muss vor das 1. waitInput noch ein waitCriticalSection() -
habs korrigiert. |
|
|
| |
|
|