More fixes.

This commit is contained in:
Pietro Gagliardi 2015-05-30 03:28:50 -04:00
parent d00bd04031
commit da8613d833
2 changed files with 28 additions and 1 deletions

View File

@ -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);
}

View File

@ -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