diff --git a/redo/windows/control.c b/redo/windows/control.c index 6308d6bf..d6113cf6 100644 --- a/redo/windows/control.c +++ b/redo/windows/control.c @@ -167,3 +167,30 @@ uiControl *uiWindowsNewSingleHWNDControl(uintmax_t type) setSingleHWNDFuncs(c); return c; } + +// TODO migrate these to the system set up above + +char *uiWindowsControlText(uiControl *c) +{ + HWND hwnd; + WCHAR *wtext; + char *text; + + hwnd = (HWND) uiControlHandle(c); + wtext = windowText(hwnd); + text = toUTF8(wtext); + uiFree(wtext); + return text; +} + +void uiWindowsControlSetText(uiControl *c, const char *text) +{ + HWND hwnd; + WCHAR *wtext; + + hwnd = (HWND) uiControlHandle(c); + wtext = toUTF16(text); + if (SetWindowTextW(hwnd, wtext) == 0) + logLastError("error setting control text in uiWindowsControlSetText()"); + uiFree(wtext); +} diff --git a/redo/windows/tab.c b/redo/windows/tab.c index 1cf5743e..168d6d9f 100644 --- a/redo/windows/tab.c +++ b/redo/windows/tab.c @@ -34,7 +34,7 @@ static void showHidePage(struct tab *t, LRESULT which, int hide) return; page = ptrArrayIndex(t->pages, struct tabPage *, which); if (hide) -//TODO uiControlContainerHide(page->control); +;//TODO uiControlContainerHide(page->control); else { //TODO uiControlContainerShow(page->control); // we only resize the current page, so we have to do this here