Search found 144 matches

by Tapsa
Fri Jun 26, 2015 3:07 pm
Forum: C++ Development
Topic: Runtime error with try catch o.o
Replies: 0
Views: 1264

Runtime error with try catch o.o

I recently upgraded my compiler to MinGW 4.9.1 from MinGW 4.6.2. I am also trying wxWidgets 3.0.2 coming from 2.8.12. This code runs fine when put into widgets sample, but when I use it in my very big and complex wxWidgets project, it results in C Runtime error and the program exits. That is, if the...
by Tapsa
Mon Jun 08, 2015 5:32 pm
Forum: C++ Development
Topic: Get last selected item in wxLB_MULTIPLE kind of wxListBox
Replies: 3
Views: 654

Re: Get last selected item in wxLB_MULTIPLE kind of wxListBox

Thanks. I don't quite understand what it does. It seems to me that I tell the function to look if an item exists at a place. I don't know what item number the first visible is from my code. Should HitTest be called with 0 0 in that case? I currently have no clue what is the purpose of HitTest. Why a...
by Tapsa
Mon Jun 08, 2015 2:22 pm
Forum: C++ Development
Topic: Get last selected item in wxLB_MULTIPLE kind of wxListBox
Replies: 3
Views: 654

Get last selected item in wxLB_MULTIPLE kind of wxListBox

And when I have many items selected, I want to get the item I am clicking, even if I click on already selected item.
Also, how do I get the first visible item?

Does Windows have API to get these?
by Tapsa
Wed Dec 18, 2013 5:31 pm
Forum: C++ Development
Topic: How to add multiple void* data into wxListBox?
Replies: 13
Views: 3001

Re: How to add multiple void* data into wxListBox?

Multiple selecting with single mouse click/drag.
by Tapsa
Wed Dec 18, 2013 5:01 pm
Forum: C++ Development
Topic: How to add multiple void* data into wxListBox?
Replies: 13
Views: 3001

Re: How to add multiple void* data into wxListBox?

Well, I don't mean multiple selecting like it is in that sample... :(
wxMSW and 3.0.0.
by Tapsa
Wed Dec 18, 2013 4:49 pm
Forum: C++ Development
Topic: How to add multiple void* data into wxListBox?
Replies: 13
Views: 3001

Re: How to add multiple void* data into wxListBox?

I have not set wxLC_SINGLE_SEL. I use this:
wxListView(parent, wxID_ANY, wxDefaultPosition, size, wxLC_VIRTUAL | wxLC_REPORT | wxLC_NO_HEADER)

Without mouse drag selection selecting many at once becomes a lot harder (needs keyboard input).
by Tapsa
Wed Dec 18, 2013 1:55 pm
Forum: C++ Development
Topic: wxTE_PROCESS_ENTER handled too many times (over 1)
Replies: 3
Views: 969

Re: wxTE_PROCESS_ENTER handled too many times (over 1)

Could it be that I am using enum when connecting event handlers to events? enum { MenuOption_Prompt, MenuOption_IDFix, MenuOption_Buttons, MenuOption_Tips, MenuOption_About, ToolBar_Open, ToolBar_Save, ToolBar_Show, ToolBar_Help }; Connect(MenuOption_IDFix, wxEVT_COMMAND_MENU_SELECTED, wxCommandEven...
by Tapsa
Tue Dec 17, 2013 4:31 pm
Forum: C++ Development
Topic: wxTE_PROCESS_ENTER handled too many times (over 1)
Replies: 3
Views: 969

wxTE_PROCESS_ENTER handled too many times (over 1)

I am using 3.0.0 and I've noticed that whenever I press enter in a wxTextCtrl that does not have wxTE_PROCESS_ENTER property set, the event (enter press) gets handled in my own completely unrelated handler which has nothing to do with the correct event handler. The proper handler probably handles it...
by Tapsa
Tue Dec 17, 2013 3:26 pm
Forum: C++ Development
Topic: How to add multiple void* data into wxListBox?
Replies: 13
Views: 3001

Re: How to add multiple void* data into wxListBox?

With wxListBox I can select multiple items by holding mouse left button down. Is it possible with custom wxListView?
I also need only one column which should always be the size of the widest item string.
Custom wxListView seems to be insanely faster than wxListBox :)
by Tapsa
Mon Dec 16, 2013 7:59 pm
Forum: C++ Development
Topic: How to add multiple void* data into wxListBox?
Replies: 13
Views: 3001

Re: How to add multiple void* data into wxListBox?

It seems that wxListCtrl doesn't have GetSelections(), SetSelection(), SetFirstItem(). For example, in a multiple selection virtual list control, the selections won't be sent when many items are selected at once because this could mean iterating over all the items. Yes, I already have all the data i...
by Tapsa
Mon Dec 16, 2013 6:10 pm
Forum: C++ Development
Topic: How to add multiple void* data into wxListBox?
Replies: 13
Views: 3001

Re: How to add multiple void* data into wxListBox?

:( Thanks for the suggestion. Sounds a bit complicated... So would myWxListBox->GetClientData(integer) still work? Why do I need to override useless OnGetItemText? Anyhow, it appears that assigning data later in a for loop and appending all strings as wxArrayString decreases the overall time by ~30 %.
by Tapsa
Mon Dec 16, 2013 5:15 pm
Forum: C++ Development
Topic: How to add multiple void* data into wxListBox?
Replies: 13
Views: 3001

How to add multiple void* data into wxListBox?

I know how to add wxArrayString into wxListBox with single Append but I haven't figured out how I can add custom data at the same time. This is how I add custom data with string one by one: myWxListBox->Append(myString, (void*)&myVariableInVector); How to preadd custom data into void** (no C malloc ...
by Tapsa
Sat Dec 14, 2013 5:45 pm
Forum: Compiler / Linking / IDE Related
Topic: CMake not finding 3.0.0 and ugly graphics with 2.8.12
Replies: 5
Views: 4784

Re: CMake not finding 3.0.0 and ugly graphics with 2.8.12

From wxWidgets 2.5, the XP manifest is included in wx/msw/wx.rc and so your application will be themed automatically so long as you include wx.rc in your own .rc file. This isn't true with MinGW 4.8.2, but now that wxWidgets 3 seems to work (nice graphics), perhaps I'll ditch the old wxWidgets 2.8....
by Tapsa
Sat Dec 14, 2013 4:49 pm
Forum: Compiler / Linking / IDE Related
Topic: CMake not finding 3.0.0 and ugly graphics with 2.8.12
Replies: 5
Views: 4784

Re: CMake not finding 3.0.0 and ugly graphics with 2.8.12

I browsed that link with not much success, BUT I solved CMake not finding 3.0.0 by modifying FindwxWidgets.cmake to look for 3.0 libs.
Also by quick look it seems like some really annoying graphics bugs were fixed in 3.0.0!
It's hard to believe the graphic glitches got fixed, but so it seems so far...
by Tapsa
Fri Dec 13, 2013 3:16 pm
Forum: Compiler / Linking / IDE Related
Topic: CMake not finding 3.0.0 and ugly graphics with 2.8.12
Replies: 5
Views: 4784

CMake not finding 3.0.0 and ugly graphics with 2.8.12

Why the same CMakeLists.txt can find wxWidgets 2.8.12 but not 3.0.0? Also why I get the fancy graphics only with 3.0.0. but not with 2.8.12? I used to get the fancy graphics with 2.8.12 when I used an earlier MinGW compiler, but now I get something like Win 95 graphics with the latest gcc 4.8.2 usin...