Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6998815
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T20:27:36+00:00 2026-05-27T20:27:36+00:00

I am using wxWidgets 2.9.2, when i use following code //ToolBar wxToolBar *mainTool =

  • 0

I am using wxWidgets 2.9.2, when i use following code

//ToolBar
wxToolBar *mainTool = new wxToolBar(this, 120);
wxBitmap newTool(_("images/icons/newtool.png"), wxBITMAP_TYPE_PNG);
wxBitmap saveTool(_("images/icons/savetool.png"), wxBITMAP_TYPE_PNG);
mainTool->InsertTool(0, idToolNew, newTool);
mainTool->InsertTool(1, idToolSave, saveTool);
mainTool->Realize();
SetToolBar(mainTool);

i get following warning

warning C4996: ‘wxToolBarBase::InsertTool’: was declared deprecated
c:\wxwidgets-2.9.2\include\wx\tbarbase.h(546) : see declaration of
‘wxToolBarBase::InsertTool’

Same happens for AddTool instead of InsertTool

In the tbarbase.h both of them are enclosed in

#if WXWIN_COMPATIBILITY_2_8
    // the old versions of the various methods kept for compatibility
    // don't use in the new code!
    // --------------------------------------------------------------

But i can’t find which function to use as alternative. Do you know the new function i should use instead?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T20:27:37+00:00Added an answer on May 27, 2026 at 8:27 pm

    I got the answer for this question on wxWidgets IRC. This is currently a bug in documentation, as it does not suggests the new alternative for InsertTool

    from chat

    looking in header file it now has a new third argument which is a label

    so it should be

    mainTool->InsertTool(1, idToolSave,wxT(""), saveTool);

    This makes the warning vanish.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to learn wxWidgets using this tutorial . It directs me to use
I built wxWidgets on Linux using this command: ../configure --enable-shared --disable-debug It see results
I'm on windows using mingw and when i use the following to try and
I am using wxwidgets together with boost::thread. The Thread is a worker thread which
I'm using wxWidgets 2.8.9, built with the default settings under Windows XP, VC9. And
I'm working on a program for my C++ programming class, using wxWidgets. I'm having
I created a program using dev-cpp and wxwidgets which solves a puzzle. The user
I am trying to learn the wxWidgets library, using MinGW and msys to compile
I'm using wxWidgets to write cross-plafrom applications. In one of applications I need to
How do I go about doing the following? I am using the following query

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.