Search found 14596 matches

by doublemax
Fri Apr 03, 2020 5:41 pm
Forum: Platform Related Issues
Topic: Window 10: wxBell when wxTextCtrl max length is exceeded
Replies: 3
Views: 20

Re: Window 10: wxBell when wxTextCtrl max length is exceeded

Last question: is it possible to suppress the beeping of a wxWidgets program altogether? Or will there always be some cases that a program will beep, because wxWidgets is using Windows directly (if I understand correctly) and Windows will beep? The majority of controls in wxWidgets are wrappers aro...
by doublemax
Fri Apr 03, 2020 3:33 pm
Forum: Platform Related Issues
Topic: Window 10: wxBell when wxTextCtrl max length is exceeded
Replies: 3
Views: 20

Re: Window 10: wxBell when wxTextCtrl max length is exceeded

I'm almost certain that it's Windows itself that plays the beep, not wxWidgets. I only found thit post about suppressing the beep under Windows, but it seems like an unreasonable amount of effort: https://stackoverflow.com/a/55885061 I also think that the beep is justified when the user enters text ...
by doublemax
Fri Apr 03, 2020 3:28 pm
Forum: C++ Development
Topic: more info on wxSOCKET_IOERR
Replies: 2
Views: 222

Re: more info on wxSOCKET_IOERR

I don't know much about sockets, my feeling tells me that separate threads for reading and writing should work without a mutex. But i also think one thread per socket would be nicer ;) Try asking on the wx-users group where you can reach the core wx devs: https://groups.google.com/forum/#!forum/wx-u...
by doublemax
Fri Apr 03, 2020 3:11 pm
Forum: C++ Development
Topic: problem with socket program for p2p
Replies: 44
Views: 987

Re: problem with socket program for p2p

The error message is pretty clear, you should not create the socket in a secondary thread. As your whole application uses sockets in event-driven mode, you can't just change the socket to blocking mode and expect it to work. Besides, as far as i can see, all threads in your code are pointless at the...
by doublemax
Fri Apr 03, 2020 12:21 am
Forum: C++ Development
Topic: wxLocale and static wxString's translation
Replies: 10
Views: 119

Re: wxLocale and static wxString's translation

Well, I do need to share some const strings(wxString) between classes, any good way to avoid this issue?
Initialize them at run-time, e.g. with a static Init() function you call from wxApp::OnInit()
by doublemax
Thu Apr 02, 2020 11:40 pm
Forum: C++ Development
Topic: wxLocale and static wxString's translation
Replies: 10
Views: 119

Re: wxLocale and static wxString's translation

The main issue is still that if you use _() for global variables, wxWidgets functions will be called before wxWidgets itself is initialized. Which may work or not and should be avoided.

In general, there shall be no global variable of a non-trivial wxWidgets class.
by doublemax
Thu Apr 02, 2020 4:14 pm
Forum: C++ Development
Topic: problem with socket program for p2p
Replies: 44
Views: 987

Re: problem with socket program for p2p

In the mysocket constructor, you create one client socket:

Code: Select all

// Create the socket
m_client = new wxSocketClient();
You need a separate socket for each outgoing connection.
by doublemax
Wed Apr 01, 2020 5:42 pm
Forum: C++ Development
Topic: WxPanel and events
Replies: 11
Views: 212

Re: WxPanel and events

Don't want to be annoying but I am also wondering how get sub image in the shape of a circle. wxImage offers only method with wxRect argument. As you already noticed, there is no ready-to-use function for this. I would add an alpha channel to the image (if it doesn't already have one) and set all p...
by doublemax
Wed Apr 01, 2020 3:08 pm
Forum: C++ Development
Topic: WxPanel and events
Replies: 11
Views: 212

Re: WxPanel and events

Panel->Bind(wxEVT_MOTION ,&Control::OnMove,control); MainFrame->Bind(wxEVT_MOTION , &Control::OnMove, control); control->Bind(wxEVT_MOTION , &Control::OnMove, control); Theoretically this should work, but it's unclear what the visual hierarchy is. E.g. the MainFrame is probably completely covered b...
by doublemax
Tue Mar 31, 2020 11:52 am
Forum: C++ Development
Topic: Splash screen during initialization
Replies: 1
Views: 57

Re: Splash screen during initialization

Just call wxYield() after creating the wxSplashScreen
by doublemax
Mon Mar 30, 2020 11:44 pm
Forum: Compiler / Linking / IDE Related
Topic: [SOLVED] Cannot open file "wxbase31ud.lib" LNK1104 error
Replies: 10
Views: 89

Re: Cannot open file "wxbase31ud.lib" LNK1104 error

Code: Select all

$(wxwin)/include/lib/vc_lib
This should be:

Code: Select all

$(wxwin)/lib/vc_lib
by doublemax
Mon Mar 30, 2020 10:38 pm
Forum: Compiler / Linking / IDE Related
Topic: [SOLVED] Cannot open file "wxbase31ud.lib" LNK1104 error
Replies: 10
Views: 89

Re: Cannot open file "wxbase31ud.lib" LNK1104 error

Ok, i opened /samples/minimal/minimal_vc15.sln (the highest i found) and built it with "Build Solution". Did it compile and did you actually run the sample? This was all just to confirm that the building of the wxWidgets libraries was successful. If yes, then it's probably just a matter of wrong li...
by doublemax
Mon Mar 30, 2020 10:26 pm
Forum: Compiler / Linking / IDE Related
Topic: [SOLVED] Cannot open file "wxbase31ud.lib" LNK1104 error
Replies: 10
Views: 89

Re: Cannot open file "wxbase31ud.lib" LNK1104 error

Yes, In <wxdir>/samples/minimal/, use the highest version solution file.
by doublemax
Mon Mar 30, 2020 10:15 pm
Forum: Compiler / Linking / IDE Related
Topic: [SOLVED] Cannot open file "wxbase31ud.lib" LNK1104 error
Replies: 10
Views: 89

Re: Cannot open file "wxbase31ud.lib" LNK1104 error

Then proceeded to build it manually by opening build/msw/wx_vc16.sln as i didnt find any higher versions. I used the batch build and used select all option, so im guessing i have built everything there is to build. So building the wxWidgets libraries was successful? If yes, then the next step shoul...
by doublemax
Mon Mar 30, 2020 11:53 am
Forum: wxWidgets Development (Chinese)
Topic: 绘图问题,窗口在OnSizing时,OnPaint中绘制内容没有正常更新到窗口中。
Replies: 4
Views: 148

Re: 绘图问题,窗口在OnSizing时,OnPaint中绘制内容没有正常更新到窗口中。

不二 wrote:
Mon Mar 30, 2020 11:45 am
But I'm still confused about drawing with fixed value(blue rectangle) is working, and the dynamic value not(red rectangle)?
When you increase the window size, the OS will only generate update rectangles for the small, new parts that become visible, not the whole window.