diff os2/dw.c @ 1010:9af693aafa93

Attempt at implmenting dw_window_get_font on OS/2. Also some more formatting cleanups in the template.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Sat, 14 May 2011 06:40:27 +0000
parents f1256b32fd22
children b7e7e2bc8085
line wrap: on
line diff
--- a/os2/dw.c	Sat May 14 05:27:17 2011 +0000
+++ b/os2/dw.c	Sat May 14 06:40:27 2011 +0000
@@ -4089,7 +4089,10 @@
  */
 char * API dw_window_get_font(HWND handle)
 {
-   return "not implemented";
+   char *str = (char *)alloca(50);
+   if(str && WinQueryPresParam(handle, PP_FONTNAMESIZE, 0, NULL, 50, str, QPF_NOINHERIT))
+      return strdup(str);
+   return NULL;
 }
 
 /* Internal version */