Search found 147 matches

by tomay3000
Fri Sep 13, 2019 10:34 pm
Forum: C++ Development
Topic: What is the correct way of converting a wxString?
Replies: 4
Views: 62

Re: What is the correct way of converting a wxString?

strBuf is indeed a wxString used as container, I have updated my question. And yes I am receiving data from an external device. And only these conversions worked for me (notice the cast), any other conversion without any cast didn't work wxString str5((const char *)strBuf.wc_str()); wxString str6((...
by tomay3000
Fri Sep 13, 2019 8:03 pm
Forum: C++ Development
Topic: What is the correct way of converting a wxString?
Replies: 4
Views: 62

What is the correct way of converting a wxString?

Hello, I have written a simple Serial Port wrapper that takes many read function overloads, one of these overloads takes a wxString as parameter. I have learned that I should pass the writable buffer of the wxString like this: wxString strBuf('\0', 1024); wxStringBuffer(strBuf, strBuf.size()); This ...
by tomay3000
Sun Sep 01, 2019 11:00 pm
Forum: C++ Development
Topic: How to compare two wxBitmaps?
Replies: 1
Views: 50

How to compare two wxBitmaps?

Hello,
How to compare two wxBitmaps, I mean not pixel by pixel of course, but just the objects, because I can't find any == or != operators in the documentation.

TIA.
by tomay3000
Tue Aug 27, 2019 9:58 pm
Forum: C++ Development
Topic: How to prevent a wxButton from gaining the focus by pressing the TAB from the keyboard?
Replies: 3
Views: 75

How to prevent a wxButton from gaining the focus by pressing the TAB from the keyboard?

Hello,
As asked in the title, how to do so, or simply remove this wxButton from the tab navigation order at all, and allow the focus to be set only by a mouse click.

TIA.
by tomay3000
Sun Aug 18, 2019 12:43 pm
Forum: Platform Related Issues
Topic: [wxMSW][3.1.3] How to Set a wxComboBox item data without getting the wxEVT_TEXT event to be sent?
Replies: 5
Views: 94

Re: [wxMSW][3.1.3] How to Set a wxComboBox item data without getting the wxEVT_TEXT event to be sent?

You solution gave me an idea: May be I can do it like setting a bool member variable like bool m_bSetting to true before Set() and false after it, using the help of wxCriticalSectionLocker or wxMutexLocker and make an if (m_bSetting) check before I call Set() . I haven't tried it yet, but if it won'...
by tomay3000
Sun Aug 18, 2019 9:58 am
Forum: Platform Related Issues
Topic: [wxMSW][3.1.3] How to Set a wxComboBox item data without getting the wxEVT_TEXT event to be sent?
Replies: 5
Views: 94

Re: [wxMSW][3.1.3] How to Set a wxComboBox item data without getting the wxEVT_TEXT event to be sent?

When I said: Set(), I was talking about wxItemContainer::Set() not wxTextEntry::SetValue(), that is the item data "wxArrayString" of the list box associated with the combobox.

For some reason wxEVT_TEXT is sent if I call wxItemContainer::Set(), and I don't like that behaviour.
by tomay3000
Sun Aug 18, 2019 9:46 am
Forum: Platform Related Issues
Topic: [wxMSW][3.1.3] How to Set a wxComboBox item data without getting the wxEVT_TEXT event to be sent?
Replies: 5
Views: 94

[wxMSW][3.1.3] How to Set a wxComboBox item data without getting the wxEVT_TEXT event to be sent?

Hello, I have subclassed wxComboBox to create my own vesion " wxComboBoxEx " that filters the content when the combobox text changes. The problem is that, when I call Set() on the combobox within wxEVT_TEXT handler, it sends the wxEVT_TEXT again and I found myself in a recursive loop. I want to Set(...
by tomay3000
Thu Aug 01, 2019 10:56 pm
Forum: C++ Development
Topic: How to convert an int to a base 2 (binary) wxString?
Replies: 2
Views: 83

Re: How to convert an int to a base 2 (binary) wxString?

I found out that I can do it via std::bitset

Thank you for the hint anyway.
by tomay3000
Thu Aug 01, 2019 3:15 pm
Forum: C++ Development
Topic: How to convert an int to a base 2 (binary) wxString?
Replies: 2
Views: 83

How to convert an int to a base 2 (binary) wxString?

Hello,
I could not find any wx function that converts an int to a base 2 (binary) wxString.

TIA.
by tomay3000
Fri Jul 26, 2019 12:36 am
Forum: C++ Development
Topic: Where should be the best place to store the last focused control!?
Replies: 7
Views: 188

Re: Where should be the best place to store the last focused control!?

Windows 7 and later.
I need to get the default processing of wxEVT_LEFT_DOWN to override it without setting the focus.
which .cpp file is in it?
by tomay3000
Mon Jul 22, 2019 11:02 pm
Forum: C++ Development
Topic: Where should be the best place to store the last focused control!?
Replies: 7
Views: 188

Re: Where should be the best place to store the last focused control!?

The task is for creating a Visual Keyboard.
So when you click on a button from that Visual Keyboard, you have to restore the focus to what is was before and simulate a key press for that specific button, because not doing that keeps the focus on the clicked button, and nothing will happen.
by tomay3000
Mon Jul 22, 2019 4:43 pm
Forum: C++ Development
Topic: Where should be the best place to store the last focused control!?
Replies: 7
Views: 188

Re: Where should be the best place to store the last focused control!?

What I meant is when (sorry for that). What event handler should I use to catch any kill focus.
by tomay3000
Mon Jul 22, 2019 12:37 am
Forum: C++ Development
Topic: Where should be the best place to store the last focused control!?
Replies: 7
Views: 188

Where should be the best place to store the last focused control!?

Hello,
I was wondering, where should be the best place to store the last focused control in a member variable m_pWndLastFocused!?

TIA.