wxDC does not have DrawTextW (Issue #22175)

149 views
Skip to first unread message

jshanab

unread,
Mar 3, 2022, 9:23:36 PM3/3/22
to wx-...@googlegroups.com, Subscribed

I have _UNICODE set in preprocessor and am linking to the ud versions of WX but for some reason I am getting an error when I try to use DrawText on the DC passed in to myPaint

The application compiles and runs up to this point that I am adding the dc.DrawText( "foo", ....

Almost like I am not linking the correct windows GDI.
The micorsoft header is detecting the _UNICODE flag in it's #ifdef and defineing DrawText to DrawTextW

Windows 10, VS2019 (generated with CMake) , latest wxWidgets.

What am I missing?


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/22175@github.com>

VZ

unread,
Mar 3, 2022, 9:26:25 PM3/3/22
to wx-...@googlegroups.com, Subscribed

Closed #22175.


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/issue/22175/issue_event/6182383282@github.com>

VZ

unread,
Mar 3, 2022, 9:26:26 PM3/3/22
to wx-...@googlegroups.com, Subscribed

Don't include windows.h directly, use wx/msw/wrapwin.h or at least include wx/msw/winundef.h after including it. Or, better, don't include it at all -- why do you do it?

In any case, there is nothing we can do about windows.h brokenness, it remained like this for 30 years and clearly is never going to change/be fixed.


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/22175/1058763054@github.com>

jshanab

unread,
Mar 3, 2022, 9:32:07 PM3/3/22
to wx-...@googlegroups.com, Subscribed

I did not.! I will take a closer look in the morning. Maybe another lib
did. This a very basic wxaui project, based on example code as this is a
new project startup.


On Thu, Mar 3, 2022, 21:26 VZ ***@***.***> wrote:

> Don't include windows.h directly, use wx/msw/wrapwin.h or at least
> include wx/msw/winundef.h after including it. Or, better, don't include
> it at all -- why do you do it?
>
> In any case, there is nothing we can do about windows.h brokenness, it
> remained like this for 30 years and clearly is never going to change/be
> fixed.
>
> —
> Reply to this email directly, view it on GitHub
> <https://github.com/wxWidgets/wxWidgets/issues/22175#issuecomment-1058763054>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AAIZF5I5MAHO4QHK62AYH53U6FYE5ANCNFSM5P4JJ5UA>

> .
> Triage notifications on the go with GitHub Mobile for iOS
> <https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
> or Android
> <https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
>
> You are receiving this because you authored the thread.Message ID:
> ***@***.***>
>


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/22175/1058765823@github.com>

Reply all
Reply to author
Forward
0 new messages