Mercurial > dwindows
comparison win/dw.c @ 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 | 24b19b905f04 |
comparison
equal
deleted
inserted
replaced
912:0c39705ddd4a | 913:81059acce901 |
---|---|
4689 * Parameters: | 4689 * Parameters: |
4690 * id: An ID to be used with dw_window_from_id or 0L. | 4690 * id: An ID to be used with dw_window_from_id or 0L. |
4691 */ | 4691 */ |
4692 HWND API dw_html_new(unsigned long id) | 4692 HWND API dw_html_new(unsigned long id) |
4693 { | 4693 { |
4694 #if defined(BUILD_DLL) || defined(BUILD_HTML) | |
4694 return CreateWindow(BrowserClassName, | 4695 return CreateWindow(BrowserClassName, |
4695 "", | 4696 "", |
4696 WS_VISIBLE | WS_CHILD | WS_CLIPSIBLINGS, | 4697 WS_VISIBLE | WS_CHILD | WS_CLIPSIBLINGS, |
4697 0,0,2000,1000, | 4698 0,0,2000,1000, |
4698 DW_HWND_OBJECT, | 4699 DW_HWND_OBJECT, |
4699 (HMENU)id, | 4700 (HMENU)id, |
4700 DWInstance, | 4701 DWInstance, |
4701 NULL); | 4702 NULL); |
4703 #else | |
4704 return 0; | |
4705 #endif | |
4702 } | 4706 } |
4703 | 4707 |
4704 /* | 4708 /* |
4705 * Create a bitmap object to be packed. | 4709 * Create a bitmap object to be packed. |
4706 * Parameters: | 4710 * Parameters: |
6439 if(array[pageid]->hwnd) | 6443 if(array[pageid]->hwnd) |
6440 dw_window_destroy(array[pageid]->hwnd); | 6444 dw_window_destroy(array[pageid]->hwnd); |
6441 array[pageid]->hwnd = tmpbox; | 6445 array[pageid]->hwnd = tmpbox; |
6442 if(pageidx == dw_notebook_page_get(handle)) | 6446 if(pageidx == dw_notebook_page_get(handle)) |
6443 { | 6447 { |
6448 ShowWindow(tmpbox, SW_HIDE); | |
6444 SetParent(tmpbox, handle); | 6449 SetParent(tmpbox, handle); |
6445 _resize_notebook_page(handle, pageid); | 6450 _resize_notebook_page(handle, pageid); |
6446 } | 6451 } |
6447 } | 6452 } |
6448 } | 6453 } |
9935 LPITEMIDLIST pidl; | 9940 LPITEMIDLIST pidl; |
9936 LPMALLOC pMalloc; | 9941 LPMALLOC pMalloc; |
9937 | 9942 |
9938 if ( flags == DW_DIRECTORY_OPEN ) | 9943 if ( flags == DW_DIRECTORY_OPEN ) |
9939 { | 9944 { |
9940 #if 0 | 9945 /* If we aren't building a DLL, use the more simple browser */ |
9946 #ifndef BUILD_DLL | |
9941 if (SUCCEEDED(SHGetMalloc(&pMalloc))) | 9947 if (SUCCEEDED(SHGetMalloc(&pMalloc))) |
9942 { | 9948 { |
9943 ZeroMemory(&bi,sizeof(bi)); | 9949 ZeroMemory(&bi,sizeof(bi)); |
9944 bi.hwndOwner = NULL; | 9950 bi.hwndOwner = NULL; |
9945 bi.pszDisplayName = 0; | 9951 bi.pszDisplayName = 0; |