Mercurial > dwindows
comparison win/dw.c @ 2001:f7acca46f795
Win: Fixes for Edge (Chromium) embedding, the loading can be delayed so...
prior to finishing loading save location and raw HTML data requests and
then actually load it when the browser context has finished loading.
Also actually detect Edge (Chromium) instead of just returning TRUE.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Thu, 31 Oct 2019 21:28:32 +0000 |
parents | 77e43d71eaa7 |
children | c30f4354966e |
comparison
equal
deleted
inserted
replaced
2000:77e43d71eaa7 | 2001:f7acca46f795 |
---|---|
4283 wc.lpszMenuName = NULL; | 4283 wc.lpszMenuName = NULL; |
4284 wc.lpszClassName = StatusbarClassName; | 4284 wc.lpszClassName = StatusbarClassName; |
4285 | 4285 |
4286 RegisterClass(&wc); | 4286 RegisterClass(&wc); |
4287 | 4287 |
4288 #if (defined(BUILD_DLL) || defined(BUILD_HTML)) | |
4289 /* Register HTML renderer class */ | |
4290 memset(&wc, 0, sizeof(WNDCLASS)); | |
4291 wc.lpszClassName = BrowserClassName; | |
4292 wc.style = CS_HREDRAW | CS_VREDRAW; | |
4293 #ifdef BUILD_EDGE | |
4294 /* Check if Microsoft Edge (Chromium) is installed */ | |
4295 if(_DW_EDGE_DETECTED = _dw_edge_detect()) | |
4296 { | |
4297 wc.lpfnWndProc = (WNDPROC)_edgeWindowProc; | |
4298 } | |
4299 else | |
4300 #endif | |
4301 { | |
4302 wc.lpfnWndProc = (WNDPROC)_browserWindowProc; | |
4303 } | |
4304 RegisterClass(&wc); | |
4305 #endif | |
4306 | |
4307 /* Create a set of brushes using the default OS/2 and DOS colors */ | 4288 /* Create a set of brushes using the default OS/2 and DOS colors */ |
4308 for(z=0;z<18;z++) | 4289 for(z=0;z<18;z++) |
4309 _colors[z] = CreateSolidBrush(RGB(_red[z],_green[z],_blue[z])); | 4290 _colors[z] = CreateSolidBrush(RGB(_red[z],_green[z],_blue[z])); |
4310 | 4291 |
4311 /* Register an Object Windows class like OS/2 and Win2k+ | 4292 /* Register an Object Windows class like OS/2 and Win2k+ |
4338 { | 4319 { |
4339 dw_messagebox("Dynamic Windows", DW_MB_OK|DW_MB_ERROR, "Could not initialize the object window. error code %d", GetLastError()); | 4320 dw_messagebox("Dynamic Windows", DW_MB_OK|DW_MB_ERROR, "Could not initialize the object window. error code %d", GetLastError()); |
4340 exit(1); | 4321 exit(1); |
4341 } | 4322 } |
4342 | 4323 |
4324 #if (defined(BUILD_DLL) || defined(BUILD_HTML)) | |
4325 /* Register HTML renderer class */ | |
4326 memset(&wc, 0, sizeof(WNDCLASS)); | |
4327 wc.lpszClassName = BrowserClassName; | |
4328 wc.style = CS_HREDRAW | CS_VREDRAW; | |
4329 #ifdef BUILD_EDGE | |
4330 /* Check if Microsoft Edge (Chromium) is installed */ | |
4331 if (_DW_EDGE_DETECTED = _dw_edge_detect()) | |
4332 { | |
4333 wc.lpfnWndProc = (WNDPROC)_edgeWindowProc; | |
4334 } | |
4335 else | |
4336 #endif | |
4337 { | |
4338 wc.lpfnWndProc = (WNDPROC)_browserWindowProc; | |
4339 } | |
4340 RegisterClass(&wc); | |
4341 #endif | |
4342 | |
4343 /* Create a tooltip. */ | 4343 /* Create a tooltip. */ |
4344 hwndTooltip = CreateWindowEx(WS_EX_TOPMOST, TOOLTIPS_CLASS, NULL, WS_POPUP | TTS_NOPREFIX | TTS_ALWAYSTIP, | 4344 hwndTooltip = CreateWindowEx(WS_EX_TOPMOST, TOOLTIPS_CLASS, NULL, WS_POPUP | TTS_NOPREFIX | TTS_ALWAYSTIP, |
4345 CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, DW_HWND_OBJECT, NULL, DWInstance,NULL); | 4345 CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, DW_HWND_OBJECT, NULL, DWInstance,NULL); |
4346 | 4346 |
4347 SetWindowPos(hwndTooltip, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE); | 4347 SetWindowPos(hwndTooltip, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE); |