Possibly bogus warning "Using possibly wrong DPI for wxPropertyGrid" (Issue #26433)

25 views
Skip to first unread message

oltolm

unread,
May 8, 2026, 12:06:09 PMMay 8
to wx-...@googlegroups.com, Subscribed
oltolm created an issue (wxWidgets/wxWidgets#26433)

I am getting the following message when running Cemu and opening the Settings dialog:

Using possibly wrong DPI for wxPropertyGrid@0000014e47a9b3c0 ("", HWND=0000000000000000)
Using possibly wrong DPI for wxPropertyGrid@0000014e47a9b3c0 ("", HWND=0000000000000000)
Using possibly wrong DPI for wxPropertyGrid@0000014e47a9b3c0 ("", HWND=0000000000000000)

I asked ChatGPT and that's what is said:

Yes. Based on the wxWidgets code path, this looks like an upstream wxMSW/wxPropertyGrid issue, not a Cemu bug.

The relevant behavior is this:
wxPropertyGrid::Create() calls Init2().
Inside Init2(), wxPropertyGrid uses FromDIP(...).
On MSW, that goes through GetDPI().
If the control doesn’t yet have a usable HWND, wxMSW emits the debug log you pasted: “Using possibly wrong DPI ... HWND=0000000000000000”.

That means the warning is produced by wxPropertyGrid during its own initialization sequence, before the native handle is fully established. So if you don’t want a workaround on the Cemu side, the honest answer is: this should be fixed upstream in wxWidgets.

I am using wxWidgets 3.3.2 on Windows.


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issues/26433@github.com>

VZ

unread,
May 9, 2026, 4:08:07 PMMay 9
to wx-...@googlegroups.com, Subscribed
vadz left a comment (wxWidgets/wxWidgets#26433)

Why is HWND invalid in Init2()? It's called after the base class Create() which should succeed.

We can apply

diff --git a/src/propgrid/manager.cpp b/src/propgrid/manager.cpp
index 5d562e71cd..28df24d4b8 100644
--- a/src/propgrid/manager.cpp
+++ b/src/propgrid/manager.cpp
@@ -628,16 +628,18 @@ bool wxPropertyGridManager::Create( wxWindow *parent,
     if ( !m_pPropGrid )
         m_pPropGrid = CreatePropertyGrid();
 
-    bool res = wxPanel::Create( parent, id, pos, size,
-                                (style & wxWINDOW_STYLE_MASK)|wxWANTS_CHARS,
-                                name );
+    if ( !wxPanel::Create( parent, id, pos, size,
+                           (style & wxWINDOW_STYLE_MASK)|wxWANTS_CHARS,
+                           name ) )
+        return false;
+
     Init2(style);
 
     SetInitialSize(size);
     // Create controls
     RecreateControls();
 
-    return res;
+    return true;
 }
 
 // -----------------------------------------------------------------------

to prevent it from being called in this case, but there must still be some other problem which results in Create() failing which is more serious than the message you see.

Also, the fact that you see it means that debug logging is enabled in wx and I am not sure if this intentional. You may need to use wxDISABLE_DEBUG_SUPPORT() if it isn't.


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issues/26433/4413563209@github.com>

Reply all
Reply to author
Forward
0 new messages