Author Topic: Plugin Development using wxSmith  (Read 848 times)

Offline anandamu16

  • Multiple posting newcomer
  • *
  • Posts: 97
Plugin Development using wxSmith
« on: February 20, 2017, 05:39:09 am »

I have developed a plugin that deal with Menu, I mean it will add menu and submenus inside. (menuPlugin.cpp and .h)
Next, I want that whenever I clicked on any 1 of those menu/submenu options(that are added by me), A new window should open. I know, to implement this I need to make a Window dialog box through wxSmith (I did that also). (wxDialogBox.cpp and .h)
My question is how to link both i.e; Inside the menuplugin.cpp code, where I should call that dialog box so as to link all the cpp and header files together

Offline BlueHazzard

  • Lives here!
  • ****
  • Posts: 1853
Re: Plugin Development using wxSmith
« Reply #1 on: February 20, 2017, 11:12:15 am »
This is basic c++ code problem and not really topic of this forum....

But to give you an idea (note this is pseudo code, it wont run):
Code: [Select]

#include "wxDialogBox.h"

void OnMenuClick(event)
  wxDialogBox my_dialog();  // Create a instance of your dialog
  if(my_dialog.ShowModal() == wxID_OK)     // Shows the dialog with focus
      //all was ok
  } else
     // User abort or error