Search found 32 matches

by sms91
Thu Apr 02, 2009 3:00 am
Forum: C++ Development
Topic: why block at WaitForAccept
Replies: 5
Views: 1131

no body know why?
by sms91
Mon Mar 23, 2009 11:19 am
Forum: C++ Development
Topic: how to get the local IP address
Replies: 2
Views: 563

oh , not the 127.0.0.1
by sms91
Mon Mar 23, 2009 11:14 am
Forum: C++ Development
Topic: how to get the local IP address
Replies: 2
Views: 563

how to get the local IP address

how can i use the wxWidgets for getting myself local IP address ?
by sms91
Sun Mar 22, 2009 6:56 am
Forum: wxWidgets Development (Chinese)
Topic: 为什么会阻塞在WaitForAccept
Replies: 0
Views: 1179

为什么会阻塞在WaitForAccept

AcceptThread::AcceptThread(MyFrame* Frame ) :wxThread(wxTHREAD_JOINABLE),myFrame(Frame) { wxIPV4address address ; address.Service( 6973 ) ; m_pSocektServer = new wxSocketServer( address , wxSOCKET_REUSEADDR ) ; } void * AcceptServerThread::Entry() { while( g_bRun) { //... if( m_pSocektServer->WaitF...
by sms91
Sun Mar 22, 2009 5:59 am
Forum: C++ Development
Topic: why block at WaitForAccept
Replies: 5
Views: 1131

GSocketEventFlags GSocket::Select(GSocketEventFlags flags) { if (!gs_gui_functions->CanUseEventLoop()) { GSocketEventFlags result = 0; fd_set readfds; fd_set writefds; fd_set exceptfds; assert(this); FD_ZERO(&readfds); FD_ZERO(&writefds); FD_ZERO(&exceptfds); FD_SET(m_fd, &readfds); if (flags & GSO...
by sms91
Sun Mar 22, 2009 2:36 am
Forum: C++ Development
Topic: why block at WaitForAccept
Replies: 5
Views: 1131

i have't connect the server , i want no-blocking socekt ,but now block at WaitForAccept
by sms91
Sat Mar 21, 2009 9:48 am
Forum: C++ Development
Topic: why block at WaitForAccept
Replies: 5
Views: 1131

why block at WaitForAccept

AcceptThread::AcceptThread(MyFrame* Frame ) :wxThread(wxTHREAD_JOINABLE),myFrame(Frame) { wxIPV4address address ; address.Service( 6973 ) ; m_pSocektServer = new wxSocketServer( address , wxSOCKET_REUSEADDR ) ; } void * AcceptServerThread::Entry() { while( g_bRun) { //... if( m_pSocektServer->WaitF...
by sms91
Fri Mar 13, 2009 1:26 am
Forum: C++ Development
Topic: 'PostMessage(WM_NULL)' failed with error 0x00000718
Replies: 5
Views: 2920

I had add this code:

Code: Select all

WXLRESULT MyFrame::MSWWindowProc(WXUINT message, WXWPARAM wParam, WXLPARAM lParam)
{
	if ( message == WM_NULL )
	{
		wxGetApp().ProcessPendingEvents() ;
	}

	return wxFrame::MSWWindowProc( message , wParam , lParam ) ;
}
by sms91
Thu Mar 05, 2009 6:32 am
Forum: C++ Development
Topic: 'PostMessage(WM_NULL)' failed with error 0x00000718
Replies: 5
Views: 2920

With some googling i found this : The "WM_NULL" message under Windows seems to come from wxWidgets when the desktop is not accessible (screensaver launched, or screen off). Try with all power saving functions off. Maybe it's a start? I have not use PostMessage(WM_NULL) , but the wxwidgets use the P...
by sms91
Thu Mar 05, 2009 1:57 am
Forum: C++ Development
Topic: 'PostMessage(WM_NULL)' failed with error 0x00000718
Replies: 5
Views: 2920

'PostMessage(WM_NULL)' failed with error 0x00000718

#define WX_REFRESH_GUI 10001 //... void* wxMyThread::Entry() { //... while(g_bRun) { for( //...) { //... wxCommandEvent CommandEvent( wxEVT_COMMAND_MENU_SELECTED , WX_REFRESH_GUI ) ; wxPostEvent( m_pUpdateHdr , CommandEvent ) ; } Sleep( 3000 ) ; } return NULL ; } if the program run a long time , i ...
by sms91
Mon Nov 24, 2008 8:47 am
Forum: C++ Development
Topic: Sometime , crash on Accept( false)
Replies: 3
Views: 790

up
by sms91
Thu Nov 20, 2008 2:10 am
Forum: C++ Development
Topic: Sometime , crash on Accept( false)
Replies: 3
Views: 790

Thanks for your reply.
I used the wxPostEvent.

Code: Select all

		wxCommandEvent DeleteEvent( wxEVT_COMMAND_MENU_SELECTED , WX_DELETE ) ;
		DeleteEvent.SetString( wxString( szName , *wxConvCurrent) ) ;
		wxPostEvent( pDlg , DeleteEvent ) ;

When the crash happened , the sentence have not implemented all the while.
by sms91
Wed Nov 19, 2008 2:00 am
Forum: C++ Development
Topic: Sometime , crash on Accept( false)
Replies: 3
Views: 790

Sometime , crash on Accept( false)

I have to make a very big GUI server, and I don't want to use events, I prefer for using threads.In my GUI program , i run the ServerThread,but ServerThread run a long time is likely to crash on m_pSocektServer->Accept( false) ; ServerThread::ServerThread() :wxThread(wxTHREAD_JOINABLE) { wxIPV4addre...
by sms91
Thu Nov 13, 2008 6:01 am
Forum: wxWidgets Development (Chinese)
Topic: 使用wx的朋友:报下你的编译器
Replies: 5
Views: 2923

VC2003
by sms91
Wed Nov 12, 2008 7:12 am
Forum: C++ Development
Topic: use the wxPostEvent send a user-defined data
Replies: 5
Views: 1101

fantaz wrote:In addition to the docs, maybe this could help also
best regards,
fantaz
fantaz , I use the example of class wxTextEvent from http://forums.wxwidgets.org/viewtopic.php?p=67029#67029

Thanks