Mercurial > dwindows
comparison win/dw.c @ 1982:c35b68443905
Win: Remove notebook subclass, it looks like we need to go full owner
draw to support dark mode, and I am not up for that right now.
Same with the menubar, does not seem to be dark modeable without
completely replacing it.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Tue, 13 Aug 2019 19:34:27 +0000 |
parents | ccd34ec31971 |
children | 21811c9e2eaf |
comparison
equal
deleted
inserted
replaced
1981:ccd34ec31971 | 1982:c35b68443905 |
---|---|
3421 } | 3421 } |
3422 #endif | 3422 #endif |
3423 return _simplewndproc(hWnd, msg, mp1, mp2); | 3423 return _simplewndproc(hWnd, msg, mp1, mp2); |
3424 } | 3424 } |
3425 | 3425 |
3426 LRESULT CALLBACK _notebookwndproc(HWND hWnd, UINT msg, WPARAM mp1, LPARAM mp2) | |
3427 { | |
3428 #ifdef AEROGLASS | |
3429 if(msg == WM_ERASEBKGND) | |
3430 { | |
3431 if(_DW_DARK_MODE_ALLOWED == 2 && _DW_DARK_MODE_SUPPORTED) | |
3432 { | |
3433 HDC hdc; | |
3434 RECT rc; | |
3435 | |
3436 hdc=(HDC)mp1; | |
3437 GetClientRect(hWnd, &rc); | |
3438 FillRect(hdc, &rc, _DW_GetSysColorBrush(COLOR_3DFACE)); | |
3439 return (LRESULT)TRUE; | |
3440 } | |
3441 } | |
3442 #endif | |
3443 return _simplewndproc(hWnd, msg, mp1, mp2); | |
3444 } | |
3445 | |
3446 void _changebox(Box *thisbox, int percent, int type) | 3426 void _changebox(Box *thisbox, int percent, int type) |
3447 { | 3427 { |
3448 int z; | 3428 int z; |
3449 | 3429 |
3450 for(z=0;z<thisbox->count;z++) | 3430 for(z=0;z<thisbox->count;z++) |
5794 DW_HWND_OBJECT, | 5774 DW_HWND_OBJECT, |
5795 (HMENU)(uintptr_t)id, | 5775 (HMENU)(uintptr_t)id, |
5796 DWInstance, | 5776 DWInstance, |
5797 NULL); | 5777 NULL); |
5798 cinfo->fore = cinfo->back = -1; | 5778 cinfo->fore = cinfo->back = -1; |
5799 cinfo->pOldProc = SubclassWindow(tmp, _notebookwndproc); | 5779 cinfo->pOldProc = SubclassWindow(tmp, _simplewndproc); |
5800 SetWindowLongPtr(tmp, GWLP_USERDATA, (LONG_PTR)cinfo); | 5780 SetWindowLongPtr(tmp, GWLP_USERDATA, (LONG_PTR)cinfo); |
5801 dw_window_set_data(tmp, "_dw_array", (void *)array); | 5781 dw_window_set_data(tmp, "_dw_array", (void *)array); |
5802 dw_window_set_font(tmp, DefaultFont); | 5782 dw_window_set_font(tmp, DefaultFont); |
5803 return tmp; | 5783 return tmp; |
5804 } | 5784 } |