changeset 913:81059acce901

If we aren't building a DLL use the simple folder browser and don't include the HTML browser... unless specifically requested. This allows for simple static linking by including dw.c in the project. Also hide the parent box when packing a notebook page to prevent some unnecessary drawing. Been trying to find a way to reduce flickering that happens sometimes during resize... but all the other methods I have tried seem to be worse than the HIDE and SHOW method currently employed.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Thu, 21 Apr 2011 22:21:15 +0000
parents 0c39705ddd4a
children 61732be875c7
files win/dw.c
diffstat 1 files changed, 7 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/win/dw.c	Thu Apr 21 11:27:09 2011 +0000
+++ b/win/dw.c	Thu Apr 21 22:21:15 2011 +0000
@@ -4691,6 +4691,7 @@
  */
 HWND API dw_html_new(unsigned long id)
 {
+#if defined(BUILD_DLL) || defined(BUILD_HTML)
    return CreateWindow(BrowserClassName,
                   "",
                   WS_VISIBLE | WS_CHILD | WS_CLIPSIBLINGS,
@@ -4699,6 +4700,9 @@
                   (HMENU)id,
                   DWInstance,
                   NULL);
+#else
+   return 0;
+#endif
 }
 
 /*
@@ -6441,6 +6445,7 @@
       array[pageid]->hwnd = tmpbox;
       if(pageidx == dw_notebook_page_get(handle))
       {
+         ShowWindow(tmpbox, SW_HIDE);
          SetParent(tmpbox, handle);
          _resize_notebook_page(handle, pageid);
       }
@@ -9937,7 +9942,8 @@
 
    if ( flags == DW_DIRECTORY_OPEN )
    {
-#if 0
+   /* If we aren't building a DLL, use the more simple browser */
+#ifndef BUILD_DLL
       if (SUCCEEDED(SHGetMalloc(&pMalloc)))
       {
          ZeroMemory(&bi,sizeof(bi));