changeset 1336:63e05ef4a59a

Fixes to the source on Windows so it will build standalone again. (With HTML widget disabled) Also fixes for building without GDI+. Missed a few #ifdefs.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Sun, 13 Nov 2011 14:46:30 +0000
parents 44f8a846f3c1
children e32b5e5595cd
files win/dw.c
diffstat 1 files changed, 8 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/win/dw.c	Sun Nov 13 08:47:41 2011 +0000
+++ b/win/dw.c	Sun Nov 13 14:46:30 2011 +0000
@@ -21,7 +21,9 @@
 #include <time.h>
 #include <math.h>
 #include "dw.h"
+#ifdef BUILD_DLL
 #include "XBrowseForFolder.h"
+#endif
 
 #ifdef GDIPLUS
 /* GDI+ Headers are not C compatible... so define what we need here instead */
@@ -158,7 +160,9 @@
 static int screenx, screeny;
 HFONT _DefaultFont = NULL;
 
+#ifdef BUILD_DLL
 LRESULT CALLBACK _browserWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
+#endif
 void _resize_notebook_page(HWND handle, int pageid);
 void _handle_splitbar_resize(HWND hwnd, float percent, int type, int x, int y);
 int _lookup_icon(HWND handle, HICON hicon, int type);
@@ -3627,7 +3631,9 @@
    INITCOMMONCONTROLSEX icc;
    char *fname, *alttmpdir;
    HFONT oldfont;
+#ifdef GDIPLUS
    struct GdiplusStartupInput si; 
+#endif
 
    /* Initialize our thread local storage */
    _foreground = TlsAlloc();
@@ -3692,12 +3698,14 @@
 
    RegisterClass(&wc);
 
+#ifdef BUILD_DLL
    /* Register HTML renderer class */
    memset(&wc, 0, sizeof(WNDCLASS));
    wc.lpfnWndProc = (WNDPROC)_browserWindowProc;
    wc.lpszClassName = BrowserClassName;
    wc.style = CS_HREDRAW|CS_VREDRAW;
    RegisterClass(&wc);
+#endif
 
    /* Create a set of brushes using the default OS/2 and DOS colors */
    for(z=0;z<18;z++)