| |
|
|
| Manchmal muss uno una Control en una eigenen Hilo abstellen. KompilierenMarcaSeparación {$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")nt color=#0000FF>}
|
|
|
| |
|
|
|
| Natürlich muss antes el 1. waitInput todavía una waitCriticalSection() -
habs korrigiert. |
|
|
| |
|
|