Search found 286 matches

by Radek
Mon Oct 15, 2012 7:58 am
Forum: C++ Development
Topic: Making a link inside a dialog box
Replies: 22
Views: 5690

Re: Making a link inside a dialog box

Code: Select all

wxDialog::wxDialog( wxWindow *parent, wxWindowID /" i.e., an int */ ID, const wxString& title  /*[,defaulted parameters]*/  );
See wxDialog documentation. There shouldn't be any parameter missing.
by Radek
Fri Oct 12, 2012 2:30 pm
Forum: C++ Development
Topic: Making a link inside a dialog box
Replies: 22
Views: 5690

Re: Making a link inside a dialog box

Do a little debugging. (1) Update the Show() statement: it returns a bool indicating whether the dialog has been shown and has a bool parameter whether to show or hide: bool bb = dlg->Show(true); Place a break at this statement, start the debugger, "proceed" and check the return variable. If it isn'...
by Radek
Thu Oct 11, 2012 3:26 pm
Forum: C++ Development
Topic: Making a link inside a dialog box
Replies: 22
Views: 5690

Re: Making a link inside a dialog box

You cannot do it this way. You need to declare (and implement) a dialog class, for example MyDialog1, then you need to create dialog instance in your AboutPdfMenuCommand() function ACCB1 void ACCB2 AboutPdfMenuCommand( wxWindow *parent, void *clienData ) ( MyDialog *dlg = new MyDialog1(parent); dlg-...
by Radek
Thu Oct 11, 2012 8:18 am
Forum: C++ Development
Topic: Making a link inside a dialog box
Replies: 22
Views: 5690

Re: Making a link inside a dialog box

There is a wxHyperLinkCtrl class for it in wxWidgets. Most likely, you need to compose the dialog box yourself and use the hyper link in it. Usage: double click the link. The class will take care for opening a browser and passing it the link. Edit: Bare bones generated by wxFormBuilder hpp file: cla...
by Radek
Mon Oct 08, 2012 4:00 pm
Forum: C++ Development
Topic: wxBitmap wxImage can not save picture
Replies: 3
Views: 1131

Re: wxBitmap wxImage can not save picture

Only the BMP handler is loaded by default. If you are using other image formats (for example XPM), you need to load the corresponding handler explicitely. See wxImage documentation for available handlers. You can load either all available handlers by wxInitAllImageHandlers() or you can load individu...
by Radek
Mon Oct 08, 2012 2:02 pm
Forum: C++ Development
Topic: wxT alternative in 2.9.3
Replies: 6
Views: 2085

Re: wxT alternative in 2.9.3

Now, the problem isn't with wxT("hello %s") but with st.c_str(). For some reason, it is not a POD value, so that it cannot be passed to the "three dots". Most likely, the "three dots" dislike const. Try gen_log(wxT("Hello %s"),const_cast<wxChar *>(st.c_str())); whether it helps. The wxWidgets refere...
by Radek
Mon Oct 08, 2012 6:47 am
Forum: C++ Development
Topic: wxT alternative in 2.9.3
Replies: 6
Views: 2085

Re: wxT alternative in 2.9.3

This seems to be a problem of Unicode and non-Unicode builds. In Unicode, a wxChar is wchat_t, in non-Unicode, a wxChar is char. The wxT() macro prefixes 'L' to string and char constants in a Unicode build and does nothing in a non-Unicode build. Therefore, gen_log( const char *, ... ) will not acce...
by Radek
Tue Oct 02, 2012 5:46 am
Forum: C++ Development
Topic: Add image with zooming feature?
Replies: 12
Views: 5231

Re: Add image with zooming feature?

(1) You can blit an area of a DC, you cannot blit an image directly. Therefore, you need the image displayed or "displayed" (in the non-zoomed) state somewhere first. (2) You can display only a bitmap on a screen or a screen-like device. The device where you "display" the original image is a memory ...
by Radek
Mon Oct 01, 2012 2:49 pm
Forum: C++ Development
Topic: wxBitmap Button Missing from WxWidgets 2.8.12
Replies: 6
Views: 1569

Re: wxBitmap Button Missing from WxWidgets 2.8.12

IMO, wxFormBuilder is far better than wxSmith. It gives you more control on your GUI, it does not contain some rather artificial restrictions known from wxSmith. Disadvantage: wxFormBuilder isn't integrated in Code Blocks and you need to run wxFB as a standalone application. You cannot make any harm...
by Radek
Fri Sep 28, 2012 3:55 pm
Forum: C++ Development
Topic: Adding String To a wxListBox??
Replies: 3
Views: 3901

Re: Adding String To a wxListBox??

What is meant by ListBox1 ,-> etc ? Let us suppose that the comma is a relic of something that should not be here. AddItem() does not seem to be a method of a listbox neither any of its predecessors. SetFirstItem() moves an existing item on the top of a listbox. Your code would work if there is alre...
by Radek
Fri Sep 28, 2012 5:12 am
Forum: C++ Development
Topic: OpenGL in wxWidgets glew problem
Replies: 6
Views: 2977

Re: OpenGL in wxWidgets glew problem

For example Code Blocks (an IDE) is written using wxWidgets. As to fullscreen, you need to process the controlling yourself most likely: Process a key event (for example window key down) and switch between fullscreen and normal window. You find the needed methods (like ShowFullScreen or Restore) at ...
by Radek
Tue Sep 25, 2012 4:32 pm
Forum: C++ Development
Topic: HELP! EVENT Doesn't work as if in a conflict situation
Replies: 3
Views: 1304

Re: HELP! EVENT Doesn't work as if in a conflict situation

I am adding event.Skip() every time I sniff a possible need of "system processing" of the event. Your handler is usually called before the system processing so that a plain return from the event handler causes no system processing. You need not event.Skip() WM_COMMAND like events and paint events fo...
by Radek
Tue Sep 25, 2012 6:05 am
Forum: C++ Development
Topic: cant get a pointer to wxwidget object, using wxsmith
Replies: 12
Views: 2475

Re: cant get a pointer to wxwidget object, using wxsmith

Yes. dajpointer() can look, for example, like this: the header: class probaFrame { public : friend wxStaticText *dajpointer( probaFrame *frame ); ... }; the code: wxStaticText *dajpointer( probaFrame *frame ) { return frame->StaticText1; } the usage: pp = dajpointer(Frame); You need all this if Stat...
by Radek
Mon Sep 24, 2012 1:23 pm
Forum: C++ Development
Topic: cant get a pointer to wxwidget object, using wxsmith
Replies: 12
Views: 2475

Re: cant get a pointer to wxwidget object, using wxsmith

This cannot compile. friend wxStaticText *dajpointer(); The friend function needs a probaFrame parameter, either a reference or a pointer (in general, it can also be an instance but not in our case). A freind function without a class parameter isn't tolerated by most of compilers (GCC belongs to the...
by Radek
Mon Sep 24, 2012 5:58 am
Forum: C++ Development
Topic: cant get a pointer to wxwidget object, using wxsmith
Replies: 12
Views: 2475

Re: cant get a pointer to wxwidget object, using wxsmith

Perhaps

Code: Select all

text = proba2Frame.StaticText1;
More info is needed for deciding it. Check your headers what they contain. Also check what is StaticText1 and proba2Frame, whether they are a pointer to a wxStaticText and an instance of wxFrame (proba2Frame might be a pointer and so on).