Implemented tab stopping.

This commit is contained in:
Pietro Gagliardi 2014-08-12 17:18:45 -04:00
parent 2146ac2af3
commit 5523cdb22a
2 changed files with 6 additions and 1 deletions

View File

@ -23,6 +23,8 @@ type tab struct {
func newTab() Tab {
hwnd := C.newControl(C.xWC_TABCONTROL,
C.TCS_TOOLTIPS | C.WS_TABSTOP,
// this is needed to have the tab contents be tab stop
// TODO this seems to override WS_TABSTOP
C.WS_EX_CONTROLPARENT)
t := &tab{
_hwnd: hwnd,

View File

@ -7,6 +7,7 @@ void uimsgloop(void)
{
MSG msg;
int res;
HWND active;
for (;;) {
SetLastError(0);
@ -15,7 +16,9 @@ void uimsgloop(void)
xpanic("error calling GetMessage()", GetLastError());
if (res == 0) /* WM_QUIT */
break;
/* TODO IsDialogMessage() */
active = GetActiveWindow();
if (active != NULL && IsDialogMessageW(active, &msg) != 0)
continue;
TranslateMessage(&msg);
DispatchMessageW(&msg);
}