Search found 32 matches

by silverstorm82
Sat Jan 11, 2014 5:45 pm
Forum: C++ Development
Topic: wxPaintDC fails after several attempts
Replies: 2
Views: 693

Re: wxPaintDC fails after several attempts

Which version did you use before? And does it still work correctly there? It was 2.9. I can't test it right now but I am pretty sure as I did not change the source code of that file for more than a year. How is the paint event connected? Using Connect() What type is "c_pbmMap"? It's a wxStaticBitma...
by silverstorm82
Sat Jan 11, 2014 7:51 am
Forum: C++ Development
Topic: wxPaintDC fails after several attempts
Replies: 2
Views: 693

wxPaintDC fails after several attempts

Hello all, I am currently facing a problem with custom paint code which worked just perfect until I switched to wxWidgets 3.0. However, I tried several modifications to make the code work but it did not change anything. The code that fails is in a window that draws a map of the earth and drawing a d...
by silverstorm82
Wed Aug 07, 2013 9:39 pm
Forum: C++ Development
Topic: Correct way to handle errors in dialog initialization?
Replies: 8
Views: 3218

Re: Correct way to handle errors in dialog initialization?

Hello doublemax, first, I am sorry for not answering that long. My job kept me busy a lot so I did not have much time to work on this issue. However, I found a solution for the problem when wxWidgets 2.9.5 was released: Calling CallAfter() within OnInitDialog will work and actually close the window:...
by silverstorm82
Mon Jun 03, 2013 3:01 pm
Forum: C++ Development
Topic: Correct way to handle errors in dialog initialization?
Replies: 8
Views: 3218

Re: Correct way to handle errors in dialog initialization?

So, I tried it and it doesn't work: The dialog ist called from the main frame: void CMyFrame::OnOpenFooDialog(wxCommandEvent& WXUNUSED(event)) { CMyDialog dlg; dlg.ShowModal(); } The OnInitDialog() handler looks like this: void CMyDialog::OnInitDialog(wxInitDialogEvent& event) { try { // Initializat...
by silverstorm82
Sun Jun 02, 2013 12:54 pm
Forum: C++ Development
Topic: Correct way to handle errors in dialog initialization?
Replies: 8
Views: 3218

Re: Correct way to handle errors in dialog initialization?

Hello doublemax,

well, I tried that but that didn't cause the dialog to be closed when called from within OnInitDialog(). However, I will try again tonight and post the results here.

Greetings,
Jens
by silverstorm82
Thu May 30, 2013 1:39 pm
Forum: C++ Development
Topic: Correct way to handle errors in dialog initialization?
Replies: 8
Views: 3218

Re: Correct way to handle errors in dialog initialization?

No ideas how to handle init-errors in OnInitDialog() ?
by silverstorm82
Tue May 21, 2013 10:02 pm
Forum: C++ Development
Topic: Correct way to handle errors in dialog initialization?
Replies: 8
Views: 3218

Re: Correct way to handle errors in dialog initialization?

Solution 1 (untested) : Call event.Skip(false) on your OnInitDialog handler in case your tests failed. This does not work :-( Solution 2: Do your tests before creating the dialog, and create it only if all tests passed. Well, that's the worst-case solution as there should be a possibility to proces...
by silverstorm82
Tue May 21, 2013 6:18 pm
Forum: C++ Development
Topic: Correct way to handle errors in dialog initialization?
Replies: 8
Views: 3218

Correct way to handle errors in dialog initialization?

Hi all, a few days ago, I wrote a dialog with an OnInitDialog event handler to do all the initialization necessary for the dialog. During this initialization process several errors can occur which will cause the dialog to be useless. So in my opinion the logical way of handling these errors is to cl...
by silverstorm82
Wed Jul 04, 2012 9:55 am
Forum: C++ Development
Topic: Tab traversal for custom controls
Replies: 2
Views: 731

Re: Tab traversal for custom controls

Hello doublemax,

worked perfectly, thank you :-)

Greetings,
Jens
by silverstorm82
Wed Jul 04, 2012 8:59 am
Forum: C++ Development
Topic: Tab traversal for custom controls
Replies: 2
Views: 731

Tab traversal for custom controls

Hello all, I hope anybody can help me with a problem I am currently facing. I created a custom control derived from wxControl that simple has two wxChoice elements. My problem now is that the first (and also the second) wxChoice never get the focus or in other words cannot be controlled by the keybo...
by silverstorm82
Tue Jul 03, 2012 12:15 pm
Forum: C++ Development
Topic: Sorting wxDataViewTreeCtrl
Replies: 2
Views: 707

Re: Sorting wxDataViewTreeCtrl

Hello evstevemd, built-in sorting can be activated by adding the wxDATAVIEW_COL_SORTABLE flag to columns that should be able to be sorted. The only problem left is that built-in sorting always sorts by container first and then by items within those containers. So, a structure like this - CONTAINER B...
by silverstorm82
Thu Jan 26, 2012 12:22 am
Forum: wxCode
Topic: wxSQLite3Statement problem
Replies: 11
Views: 5216

Re: wxSQLite3Statement problem

Hello Ulrich, thank you for the update. Unfortunately there is a problem with this new version at least on my machine: As soon as I open a database file, I get an access violation in one of the wxWidgets files. This access violation does not happen when using version 2.1.3. I cannot tell the line of...
by silverstorm82
Mon Dec 19, 2011 9:08 am
Forum: C++ Development
Topic: wxGrid and EVT_CONTEXT_MENU
Replies: 2
Views: 745

Re: wxGrid and EVT_CONTEXT_MENU

Hi,

that was my first approach but I thought there may be another one as I read in the documentation that handling a wxContextMenuEvent is the better approach as there are different ways of how context menus are handled on the various platforms.

Greetings,
Jens
by silverstorm82
Mon Dec 19, 2011 1:52 am
Forum: C++ Development
Topic: wxGrid and EVT_CONTEXT_MENU
Replies: 2
Views: 745

wxGrid and EVT_CONTEXT_MENU

Hello folks, did anyone got wxGrid to respond to the EVT_CONTEXT_MENU event-handler? I am using a derived class from wxGrid, declared an event table and used EVT_CONTEXT_MENU in it but the handler function is not called: class CMyGrid : public wxGrid { ... protected: void OnContextMenu(wxContextMenu...
by silverstorm82
Fri Dec 02, 2011 7:54 pm
Forum: wxCode
Topic: wxSQLite3Statement problem
Replies: 11
Views: 5216

Re: wxSQLite3Statement problem

Hello Ulrich,

got it, thank you :-)

Greetings,
Jens