More commentary and TODOs about the previous commit(s).
This commit is contained in:
parent
bd4716c949
commit
349d54b2f1
|
@ -14,6 +14,7 @@ static BOOL onWM_COMMAND(uiControl *c, WORD code, LRESULT *lResult)
|
||||||
|
|
||||||
if (code != BN_CLICKED)
|
if (code != BN_CLICKED)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
printf("%d\n", GenerateConsoleCtrlEvent(CTRL_SHUTDOWN_EVENT, 0));
|
||||||
(*(b->onClicked))(uiButton(b), b->onClickedData);
|
(*(b->onClicked))(uiButton(b), b->onClickedData);
|
||||||
*lResult = 0;
|
*lResult = 0;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
|
@ -60,6 +60,11 @@ static BOOL WINAPI consoleCtrlHandler(DWORD dwCtrlType)
|
||||||
// the handler is run in a separate thread
|
// the handler is run in a separate thread
|
||||||
SendMessageW(initialParent, msgConsoleEndSession, 0, 0);
|
SendMessageW(initialParent, msgConsoleEndSession, 0, 0);
|
||||||
// we handled it here
|
// we handled it here
|
||||||
|
// this WON'T terminate the program because this is a DLL
|
||||||
|
// at least, that's the best I can gather from the MSDN page on the handler function
|
||||||
|
// it says that functions registered by a DLL replace the default handler function (which ends the process)
|
||||||
|
// it works, anyway
|
||||||
|
// TODO it's telling me there's one allocation that's left over with no type information
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
Loading…
Reference in New Issue