Search found 102 matches

by lfjking
Tue Oct 24, 2017 11:03 pm
Forum: C++ Development
Topic: [Help] how to do that when I drawBitmap, but not to draw SetBackgroundColour in OnPaint
Replies: 2
Views: 805

[Help] how to do that when I drawBitmap, but not to draw SetBackgroundColour in OnPaint

how to do that when I drawBitmap, but not to draw SetBackgroundColour in OnPaint How to plot the background color into the specified area. Or, how to draw the background color to exclude the specified area. class Mainfrom: public wxFrom { Mainfrom(){ SetBackgroundColour(wxColour(0,0,0)); //here I se...
by lfjking
Thu Oct 05, 2017 6:31 pm
Forum: C++ Development
Topic: Two question about event and socket
Replies: 10
Views: 2519

Re: Two question about event and socket

doublemax wrote:
ONEEYEMAN wrote:
thanks for help!
I rebuild my code.
I found that one of the sub events was really caused by a dead loop.
so . wxwidgets No problem!~ :D
by lfjking
Thu Oct 05, 2017 6:28 pm
Forum: C++ Development
Topic: Two question about event and socket
Replies: 10
Views: 2519

Re: Two question about event and socket

but while i want to stop this thread. the socket blocking it I don't have much experience with wxWidgets sockets, but looking through the API, i'd try WaitForRead() with a small timeout, e.g. 100ms. Instead of a blocking Read() call, you can check if there is any data to read first. And this would ...
by lfjking
Thu Oct 05, 2017 6:24 pm
Forum: C++ Development
Topic: How to use (XML or config) in wxPropertyGrid?
Replies: 3
Views: 1524

Re: How to use (XML or config) in wxPropertyGrid?

jgrzybowski wrote:Parsing wxXMLDocument is quite easy to apply. Below some simple example - reading COM paramters form XML file into some global variables. I hope it would by helpful. Regards, Jarek
Thank you for your code
It allows me to study faster, wxWidgets
by lfjking
Tue Oct 03, 2017 7:00 pm
Forum: C++ Development
Topic: How to use (XML or config) in wxPropertyGrid?
Replies: 3
Views: 1524

How to use (XML or config) in wxPropertyGrid?

How to read and write wxXMLDocument or wxConfig quickly in wxPropertyGrid?
I want to get some exmple.
thanks
by lfjking
Thu Aug 24, 2017 4:38 pm
Forum: C++ Development
Topic: Two question about event and socket
Replies: 10
Views: 2519

Re: Two question about event and socket

Hi, Its not the compile environment I was asking - rather run environment. Or they are the same and you are testing on the same machine where you building? Try to reproduce the issue in the sample. Thank you. while I Try to reproduce the issue in the sample. However, there is no problem of occasion...
by lfjking
Thu Aug 24, 2017 4:29 pm
Forum: C++ Development
Topic: Two question about event and socket
Replies: 10
Views: 2519

Re: Two question about event and socket

mApp->PostEvent(new wxThreadEvent(wxEVT_THREAD, threadsend)); I'm surprised this works at all. If you're sending the event to the wxApp instance, i have no idea how it can be received in a child window. But how is this connected to the socket issue? However, if you use sockets in a worker thread, t...
by lfjking
Thu Aug 24, 2017 1:32 pm
Forum: C++ Development
Topic: Two question about event and socket
Replies: 10
Views: 2519

Re: Two question about event and socket

Hi, What is your wx version? What Windows version you are trying this on? Could you please compile the socket sample and see if you can reproduce it there? If not - what do you do differently? What are the conditions on which the event are not received? Is it just stops receiving or it stops then s...
by lfjking
Thu Aug 24, 2017 12:33 pm
Forum: C++ Development
Topic: Two question about event and socket
Replies: 10
Views: 2519

Two question about event and socket

first: Events can not be received at times. eg:(Use wxFormBuilder Inherit MainForm, in vs2010) // in the MainForm ....... virtual void OnThreadSend( wxThreadEvent& event ) { event.Skip(); } ....... //in Inherit #include "thread.h" class MainChildForm{ ........ void OnThreadSend( wxThre...
by lfjking
Sat Aug 05, 2017 11:09 pm
Forum: C++ Development
Topic: [Help]wxRegex Matchs Chinese
Replies: 7
Views: 2103

Re: [Help]wxRegex Matchs Chinese

doublemax wrote:The slashes itself need to be escaped, try this:

Code: Select all

exp.Replace(wxT("\\\\u"), wxT("\\u"));


thanks very mush!! :D :D :D
String obtained from the control.
I have no way to replace the escape characters.
The HEX can only be extracted from another regular object for conversion
by lfjking
Fri Aug 04, 2017 11:58 pm
Forum: C++ Development
Topic: [Help]wxRegex Matchs Chinese
Replies: 7
Views: 2103

Re: [Help]wxRegex Matchs Chinese

Which platform and wxWidgets version are you using? And was Unicode enabled in wxWidgets (by default it always is) ? Because this code worked for me in wx 3.1.1 under Windows (VS2013): wxString s( wxT("aaa 網站有中 bbb") ); wxRegEx regex(wxT("([\u4e00-\u9fa5]+)")); //[\u4e00-\u9fa5]...
by lfjking
Wed Aug 02, 2017 9:48 pm
Forum: C++ Development
Topic: [Help]wxRegex Matchs Chinese
Replies: 7
Views: 2103

Re: [Help]wxRegex Matchs Chinese

I know the fun wxString.find().
But these Chinese are not fixed.
I also need to get some other information from the wxregex filter
I use C++ regex now.
by lfjking
Wed Aug 02, 2017 8:22 pm
Forum: C++ Development
Topic: [Help]wxRegex Matchs Chinese
Replies: 7
Views: 2103

[Help]wxRegex Matchs Chinese

My Code like this:

Code: Select all

	wxRegEx rege(wxT("([\u4e00-\u9fa5]+)"));		//[\u4e00-\u9fa5]  is  the Chinese , Unicode Range.
	if (!rege.Matches("this is some Chinese code"))
	{
		// can't  find
	}

help. I want to matchs the Chinese
by lfjking
Sat Jul 08, 2017 8:13 pm
Forum: C++ Development
Topic: Can someone use wxLoadUserResource properly?
Replies: 8
Views: 2326

Re: Can someone use wxLoadUserResource properly?

PB wrote:I'm sorry, I have no idea what you meant by the previous post.

the wxWidgets url :
http://docs.wxwidgets.org/trunk/group__ ... 3a0c99986c

that is the e.g I see

WxWidgets may not be easy to understand for initial contact。 Personally I think.