Mercurial > dwindows
comparison win/edge.cpp @ 2022:28809bf17957
Win: Switch to using _wcsicmp() from CompareStringOrdinal() for increased compatibility.
Remove debug messages from the new IE code. Add _free_window_memory() to cleanup browsers.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Sat, 09 Nov 2019 07:18:21 +0000 |
parents | 663d79f28e46 |
children | d81d2ea806c6 |
comparison
equal
deleted
inserted
replaced
2021:0cce5fed4594 | 2022:28809bf17957 |
---|---|
25 LPWSTR _myUTF8toWide(char *utf8string, void *outbuf); | 25 LPWSTR _myUTF8toWide(char *utf8string, void *outbuf); |
26 char *_myWideToUTF8(LPWSTR widestring, void *outbuf); | 26 char *_myWideToUTF8(LPWSTR widestring, void *outbuf); |
27 #define UTF8toWide(a) _myUTF8toWide(a, a ? _alloca(MultiByteToWideChar(CP_UTF8, 0, a, -1, NULL, 0) * sizeof(WCHAR)) : NULL) | 27 #define UTF8toWide(a) _myUTF8toWide(a, a ? _alloca(MultiByteToWideChar(CP_UTF8, 0, a, -1, NULL, 0) * sizeof(WCHAR)) : NULL) |
28 #define WideToUTF8(a) _myWideToUTF8(a, a ? _alloca(WideCharToMultiByte(CP_UTF8, 0, a, -1, NULL, 0, NULL, NULL)) : NULL) | 28 #define WideToUTF8(a) _myWideToUTF8(a, a ? _alloca(WideCharToMultiByte(CP_UTF8, 0, a, -1, NULL, 0, NULL, NULL)) : NULL) |
29 LRESULT CALLBACK _wndproc(HWND hWnd, UINT msg, WPARAM mp1, LPARAM mp2); | 29 LRESULT CALLBACK _wndproc(HWND hWnd, UINT msg, WPARAM mp1, LPARAM mp2); |
30 BOOL CALLBACK _free_window_memory(HWND handle, LPARAM lParam); | |
30 extern HWND DW_HWND_OBJECT; | 31 extern HWND DW_HWND_OBJECT; |
31 BOOL DW_EDGE_DETECTED = FALSE; | 32 BOOL DW_EDGE_DETECTED = FALSE; |
32 | 33 |
33 /******************************* dw_edge_detect() ************************** | 34 /******************************* dw_edge_detect() ************************** |
34 * Attempts to create a temporary Edge (Chromium) browser context... | 35 * Attempts to create a temporary Edge (Chromium) browser context... |
290 webview = (IWebView2WebView*)dw_window_get_data(hWnd, _DW_HTML_DATA_NAME); | 291 webview = (IWebView2WebView*)dw_window_get_data(hWnd, _DW_HTML_DATA_NAME); |
291 if (webview) | 292 if (webview) |
292 { | 293 { |
293 dw_window_set_data(hWnd, _DW_HTML_DATA_NAME, NULL); | 294 dw_window_set_data(hWnd, _DW_HTML_DATA_NAME, NULL); |
294 webview->Close(); | 295 webview->Close(); |
295 | 296 } |
296 } | 297 _free_window_memory(hwnd, 0); |
297 return(TRUE); | 298 return(TRUE); |
298 } | 299 } |
299 } | 300 } |
300 | 301 |
301 return(DefWindowProc(hWnd, uMsg, wParam, lParam)); | 302 return(DefWindowProc(hWnd, uMsg, wParam, lParam)); |