Search found 15674 matches

by doublemax
Sat Mar 06, 2021 10:15 pm
Forum: C++ Development
Topic: Cannot change wxMenu item label.
Replies: 1
Views: 33

Re: Cannot change wxMenu item label.

By the time OnSampleListViewContextMenuSelect is executed, the popup menu is already closed to about to be closed. It doesn't make sense to make any changes to the menu there. In OnShowSampleListViewContextMenu you must check if the item is already favorited or not, and dynamically decide which menu...
by doublemax
Sat Mar 06, 2021 5:31 pm
Forum: C++ Development
Topic: Multi touch screen
Replies: 4
Views: 793

Re: Multi touch screen

https://docs.wxwidgets.org/trunk/classwx_gesture_event.html I only know that the MSW implementation doesn't work at all, i don't know about the state under the other platforms. https://groups.google.com/g/wx-dev/c/JdeuH95_bGQ/m/tcJCXMZUDgAJ Check the "event" sample that comes with wxWidgets, it has ...
by doublemax
Sat Mar 06, 2021 2:32 pm
Forum: C++ Development
Topic: I cant open two different windows
Replies: 5
Views: 88

Re: I cant open two different windows

thanks now its working and what thoes mean ? this ID ? its just ID for button ? An "id" is used to uniquely "id"entify an object, in this case a wxButton. EVT_BUTTON(ID_BUTTON_REGISTER, AmiFrame::register_button) wxButton *register_button = new wxButton(this, ID_BUTTON_REGISTER, "Register", wxPoint...
by doublemax
Sat Mar 06, 2021 10:32 am
Forum: C++ Development
Topic: I cant open two different windows
Replies: 5
Views: 88

Re: I cant open two different windows

i try to with wxid any and its same login opening register everytime but i domt know why No, you should *not* use wxID_ANY. wxID_ANY in an event table, it means "matches for any ID". And when passing it to constructor, it means "create a new ID". Where ever idMenuQuit and idMenuAbout are defined, j...
by doublemax
Sat Mar 06, 2021 12:45 am
Forum: C++ Development
Topic: I cant open two different windows
Replies: 5
Views: 88

Re: I cant open two different windows

EVT_BUTTON(wxID_ANY, AmiFrame::register_button) wxButton *register_button = new wxButton(this, wxID_ANY, "Register", wxPoint(400, 300), wxSize(70,50), 0); You need to use a unique ID instead of wxID_ANY. I would also suggest to use a different ID for the login button, wxID_OPEN does not really fit ...
by doublemax
Thu Mar 04, 2021 9:08 pm
Forum: C++ Development
Topic: CommondDialog from DLL
Replies: 40
Views: 369

Re: CommondDialog from DLL

It seems that in your screenshot, the "Show info" button has Windows95 look (i.e., a 3D one) but the font picker has the proper themed (i.e., flat) look? Are my eyes deceiving me? I'm not sure, but i think this deserves more attention, especially since the original post mentions a "CommDlgExtendedE...
by doublemax
Thu Mar 04, 2021 7:18 pm
Forum: C++ Development
Topic: Advice on using the new keyword.
Replies: 4
Views: 84

Re: Advice on using the new keyword.

ONEEYEMAN wrote:
Thu Mar 04, 2021 6:19 pm
MS ID system will let ypou create only MAX_INT number of them.
The IDs are not the main problem, the 10000 GDI handle limit is ;)
by doublemax
Thu Mar 04, 2021 7:16 pm
Forum: C++ Development
Topic: Changing wxToggleButton behaviour
Replies: 10
Views: 161

Re: Changing wxToggleButton behaviour

Your definition of "minimal" is slightly different than mine ;) "minimal" means it should not contain anything that's not needed to reproduce the issue, e.g. the whole wxTimer stuff. And we also don't know yet if setting any (good) bitmap can trigger the assert, or if it only happens when setting a ...
by doublemax
Thu Mar 04, 2021 5:24 pm
Forum: C++ Development
Topic: Changing wxToggleButton behaviour
Replies: 10
Views: 161

Re: Changing wxToggleButton behaviour

Going back to the initial assert:

Code: Select all

must have image widget
Maybe there is a bug that a button that's initially is created without a bitmap, can't be a assigned a bitmap later.

Try to create a minimal sample to narrow down the exact circumstances under which the assert is triggered.
by doublemax
Thu Mar 04, 2021 9:29 am
Forum: Compiler / Linking / IDE Related
Topic: Linking error when integrating wxwidget3.1.4 to my c++ project.
Replies: 5
Views: 113

Re: Linking error when integrating wxwidget3.1.4 to my c++ project.

kyadav78 wrote:
Thu Mar 04, 2021 9:01 am
Should i add wxregex.lib?
Might be worth a try.
by doublemax
Wed Mar 03, 2021 9:38 pm
Forum: C++ Development
Topic: Changing wxToggleButton behaviour
Replies: 10
Views: 161

Re: Changing wxToggleButton behaviour

I'm wondering if p_button->SetBitmap(wxNullBitmap); works as expected. Try commenting it out or replacing it with a dummy bitmap and check if it still crashes.
by doublemax
Wed Mar 03, 2021 9:33 pm
Forum: C++ Development
Topic: wxDecodeChar returns invalid string iterator and crashes program
Replies: 7
Views: 119

Re: wxDecodeChar returns invalid string iterator and crashes program

At the code you were looking at it's already too late. The assert just tells you that someone tried to access a character in a string which is outside the string boundaries. You need to find out how that happens. There are two things i would check first: buffer.InsertTextWithUndo(buffer.GetText().si...
by doublemax
Wed Mar 03, 2021 6:34 pm
Forum: C++ Development
Topic: Adding moving buttons to the mini-game
Replies: 4
Views: 69

Re: Adding moving buttons to the mini-game

First you need a pointer to the button you want to move. Then you can call wxWindow::Move() to change its position https://docs.wxwidgets.org/trunk/classwx_window.html#ab1cb98c8d25b9e6ff7b706b1446c3df7 However, this will change the position immediately. If you want to animate it, you need to use a w...
by doublemax
Wed Mar 03, 2021 6:31 pm
Forum: C++ Development
Topic: Changing wxToggleButton behaviour
Replies: 10
Views: 161

Re: Changing wxToggleButton behaviour

If it crashes, examine the call stack. This should give a hint.

Code: Select all

p_button->Update();
This alone does nothing, you need to call p_button->Refresh() first.