#17462: solution to "deprecated: use wxFONT{FAMILY, STYLE, WEIGHT}_XXX"

21 views
Skip to first unread message

wxTrac

unread,
Mar 25, 2016, 9:31:33 AM3/25/16
to wx-...@googlegroups.com
#17462: solution to "deprecated: use wxFONT{FAMILY,STYLE,WEIGHT}_XXX"
--------------------------------------------+--------------------
Reporter: pmgrace30 | Owner:
Type: build error | Status: new
Priority: normal | Milestone:
Component: wxMSW | Version: 3.1.0
Keywords: deprecated wxFont Dialogblocks | Blocked By:
Blocking: | Patch: 0
--------------------------------------------+--------------------
I have just started using wxWidgets 3.1.0 and when I compiled my code
using Visual Studio I was got a lot of warnings like this:
"warning C4996: 'wxFont::wxFont': deprecated: use
wxFONT{FAMILY,STYLE,WEIGHT}_XXX constants ie: wxFONTFAMILY_SWISS,
wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD".

The code that caused the warning was generated by DialogBlocks and it took
me a few hours to figure out what the warnings were referring to. I now
realise that my code was using old enum constant names. Since the code
was generated by DialogBlocks it was just a matter of asking DialogBlocks
to regenerate the code in the hope that the recent versions of
DialogBlocks produce the correct code. It worked.

I post this for those that might need it and hopefully find it.

--
Ticket URL: <http://trac.wxwidgets.org/ticket/17462>

wxTrac

unread,
Mar 25, 2016, 9:45:55 AM3/25/16
to wx-...@googlegroups.com
#17462: solution to "deprecated: use wxFONT{FAMILY,STYLE,WEIGHT}_XXX"
--------------------------+--------------------------------------------
Reporter: pmgrace30 | Owner:
Type: build error | Status: closed
Priority: normal | Milestone:
Component: wxMSW | Version: 3.1.0
Resolution: invalid | Keywords: deprecated wxFont Dialogblocks
Blocked By: | Blocking:
Patch: 0 |
--------------------------+--------------------------------------------
Changes (by vadz):

* status: new => closed
* resolution: => invalid


Comment:

Sorry, this is not a bug and this is not the right place for hints/advices
-- please leave a note about this on the wiki page instead.

--
Ticket URL: <http://trac.wxwidgets.org/ticket/17462#comment:1>
Reply all
Reply to author
Forward
0 new messages