I have a couple of question about using CreateWindowEx to create a modal dialog. I’m trying to emulate what DialogBox does. According to MS after creating a dialog, DialogBox disables the owner window, and starts its own message loop. Does anyone know exactly how MS does that? How do they disable the main message loop? Also, how do you capture the return value from EndDialog? I’ve shown my main window message loop below (not that there is anything very unique about it).
Code:
' Message loop DO WHILE GetMessage(tMsg, BYVAL %NULL, 0, 0) IF ISFALSE TranslateAccelerator(hWnd, hAccelerator, tMsg) THEN TranslateMessage (tMsg) DispatchMessage (tMsg) END IF LOOP
Comment