MCPcopy Create free account
hub / github.com/0x7c13/UnityEditor-DarkMode / CBTProc

Function CBTProc

UnityEditorDarkMode.cpp:255–292  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

253LRESULT CALLBACK CallWndSubClassProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, UINT_PTR uIdSubclass, DWORD_PTR dwRefData);
254
255LRESULT CALLBACK CBTProc(int nCode, WPARAM wParam, LPARAM lParam) {
256 switch (nCode) {
257 case HCBT_CREATEWND:
258 {
259 HWND hWnd = (HWND)wParam;
260 if (IsUnityWndClass(hWnd) ||
261 IsWndClass(hWnd, L"#32770") ||
262 IsWndClass(hWnd, L"Button") ||
263 IsWndClass(hWnd, L"tooltips_class32") ||
264 IsWndClass(hWnd, L"ComboBox") ||
265 IsWndClass(hWnd, L"SysListView32") ||
266 IsWndClass(hWnd, L"SysTreeView32")) {
267
268 EnableDarkMode(hWnd);
269 SetWindowSubclass(hWnd, CallWndSubClassProc, 0, 0);
270 }
271 break;
272 }
273 case HCBT_DESTROYWND:
274 {
275 HWND hWnd = (HWND)wParam;
276 if (IsUnityWndClass(hWnd) ||
277 IsWndClass(hWnd, L"#32770") ||
278 IsWndClass(hWnd, L"Button") ||
279 IsWndClass(hWnd, L"tooltips_class32") ||
280 IsWndClass(hWnd, L"ComboBox") ||
281 IsWndClass(hWnd, L"SysListView32") ||
282 IsWndClass(hWnd, L"SysTreeView32")) {
283
284 RemoveWindowSubclass(hWnd, CallWndSubClassProc, 0);
285 }
286 break;
287 }
288 default:
289 break;
290 }
291 return 0;
292}
293
294void UAHDrawMenuNCBottomLine(HWND hWnd) {
295 MENUBARINFO mbi = { sizeof(mbi) };

Callers

nothing calls this directly

Calls 3

IsUnityWndClassFunction · 0.85
IsWndClassFunction · 0.85
EnableDarkModeFunction · 0.85

Tested by

no test coverage detected