summaryrefslogtreecommitdiff
path: root/src/drivers/WinAPI/Fl_WinAPI_Window_Driver.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'src/drivers/WinAPI/Fl_WinAPI_Window_Driver.cxx')
-rw-r--r--src/drivers/WinAPI/Fl_WinAPI_Window_Driver.cxx16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/drivers/WinAPI/Fl_WinAPI_Window_Driver.cxx b/src/drivers/WinAPI/Fl_WinAPI_Window_Driver.cxx
index f259b62ac..a0a4e57c0 100644
--- a/src/drivers/WinAPI/Fl_WinAPI_Window_Driver.cxx
+++ b/src/drivers/WinAPI/Fl_WinAPI_Window_Driver.cxx
@@ -394,6 +394,22 @@ void Fl_WinAPI_Window_Driver::make_current() {
fl_graphics_driver->clip_region(0);
}
+void Fl_WinAPI_Window_Driver::label(const char *name,const char *iname) {
+ if (pWindow->shown() && !pWindow->parent()) {
+ if (!name) name = "";
+ size_t l = strlen(name);
+ // WCHAR *lab = (WCHAR*) malloc((l + 1) * sizeof(short));
+ // l = fl_utf2unicode((unsigned char*)name, l, (xchar*)lab);
+ unsigned wlen = fl_utf8toUtf16(name, (unsigned) l, NULL, 0); // Pass NULL to query length
+ wlen++;
+ unsigned short * lab = (unsigned short*)malloc(sizeof(unsigned short)*wlen);
+ wlen = fl_utf8toUtf16(name, (unsigned) l, lab, wlen);
+ lab[wlen] = 0;
+ SetWindowTextW(fl_xid(pWindow), (WCHAR *)lab);
+ free(lab);
+ }
+}
+
//
// End of "$Id$".
//