Search found 23 matches

by Kraymer
Thu Jul 01, 2010 11:29 am
Forum: C++ Development
Topic: CaptureMouse on gtk port disables mouse events?
Replies: 14
Views: 2197

thanks!

Hi! Today I fought with the same Problem (under GTK). After my first implementation steps I tried the MovableButton example from the wiki. It was close to my implementation and also didn't work. MouseMove just wasn't called when the left mouse button was still down (so there was a gap between mouse_...
by Kraymer
Mon Jun 14, 2010 7:59 pm
Forum: C++ Development
Topic: Thread TestDestroy()
Replies: 5
Views: 1727

I think what I was just missing in the documentation is the following: Because you can (of course?) use TestDestroy() in a joinable thread, it makes sense to use Delete() on it. You then of course still have to Wait() for it to finish. Delete() is never mentioned with deletion of joinable threads, a...
by Kraymer
Wed Apr 14, 2010 9:03 am
Forum: C++ Development
Topic: Unique wx IDs?
Replies: 20
Views: 3585

Re: ::wxNewId() not unique?!

I get the same problem : I created a static library, which uses wxNewId(). I linked my applicatino to this lib : OK. I added a plugin (shared lib) which also linked to this static lib : the IDs had different values in the plugin ! Erm, I'm not sure we're on the same page here.. What I wanted to exp...
by Kraymer
Tue Apr 13, 2010 11:06 pm
Forum: C++ Development
Topic: Unique wx IDs?
Replies: 20
Views: 3585

::wxNewId() not unique?!

One thing i can add about ::wxNewId() is it's also file-specific because i ran recently into the situation of 2 different ::wxNewId() in 2 different class-files which were equals. Are you sure? I just found out about wxNewId(), used it once in my program and got 2 distinct IDs. The docs say that it...
by Kraymer
Mon Nov 09, 2009 1:31 pm
Forum: C++ Development
Topic: Thread TestDestroy()
Replies: 5
Views: 1727

delete() vs. wait()

Finally, yes, calling Delete() for a joinable thread will make TestDistroy() for the same thread return true. I have a question about that: When calling Delete(), a Wait() afterwards will fail due to an "invalid handle". That's understandable however and the documentation does warn that this might ...
by Kraymer
Sat Sep 05, 2009 4:15 pm
Forum: C++ Development
Topic: Moving to Linux
Replies: 19
Views: 2688

Tried to build a test project, but the compiler said that there is no wx/wx.h file. Does it mean I have to copy the wxWidgets files to the right place? You rather have to specify the search path(s) for the includes. Most of the parameters are rather easy to get because the wx package has the wx-con...
by Kraymer
Sat Sep 05, 2009 3:24 pm
Forum: C++ Development
Topic: Moving to Linux
Replies: 19
Views: 2688

import to Codeblocks!

Another hint: Codeblocks offers to import your dev-c++ project so that might be an easy one. IMO, the first big step is to get the build system working, and being able to migrating some of the dev-c++ stuff might be useful. I'm using Codeblocks for a few weeks now and I think it's pretty good for a ...
by Kraymer
Wed Aug 05, 2009 11:37 am
Forum: C++ Development
Topic: CollapsibalePane resizes window - very ugly - screen inside
Replies: 4
Views: 871

Re: CollapsibalePane resizes window - very ugly - screen ins

extreme001 wrote:Is there a way to avoid resizing the whole window?
Hey!

I had the same problem today and with help from #wxwidgets I found the solution: use the wxCP_NO_TLW_RESIZE style. It's only documented for trunk but also available in the latest stable release.

HTH
by Kraymer
Fri Jun 12, 2009 9:49 am
Forum: C++ Development
Topic: wxTread: communication between the main and second thread
Replies: 6
Views: 1272

I need to end the loop in the secondary thread properly because when it ends additional actions are taken - client is unregistered from a server. Usually, you'll use yourthread::Entry() { while (!TestDestroy()) { // do stuff } // cleanup, end connections etc. return 0; } so there is nothing about y...
by Kraymer
Fri Jun 05, 2009 10:00 am
Forum: C++ Development
Topic: wxButton
Replies: 13
Views: 2225

wxThread

I think I'd go with threads. Just start one when the (toggle-)button is clicked and stop&delete it on release. Depending on what action is to be done repeatedly, take care that your thread doesn't interact with GUI elements directly. EDIT: Ah, scratch that. I think I misread your question. I think y...
by Kraymer
Mon May 25, 2009 10:16 pm
Forum: C++ Development
Topic: Have the application restart
Replies: 10
Views: 2217

You could write a wrapper application.
Just use different possible return codes for (int)wxApp::OnExit in your server app so that the wrapper knows if it should shutdown, restart or do whatever.
by Kraymer
Fri May 22, 2009 8:58 am
Forum: Component Writing
Topic: Semaphore
Replies: 4
Views: 2630

There is a section about inter-process communicatiion in the wiki: http://wiki.wxwidgets.org/Inter-Thread_and_Inter-Process_communication#Inter-Process_Communication I haven't used it so I can't tell if it's correct. But maybe it's a place to start if you still want to stick with wx for this purpose.
by Kraymer
Thu May 21, 2009 4:55 pm
Forum: C++ Development
Topic: InterlockedIncrement?
Replies: 10
Views: 1956

I think there's an AtomicIncement method in the development branch and trunk of wxwidgets, but I'm not sure. Also, I don't know it's exact name but it shouldn't be too hard to find it out. AFAIK there's no such thing in the stable versions (<2.9)
by Kraymer
Wed May 20, 2009 11:19 am
Forum: C++ Development
Topic: Once more: threads and events
Replies: 2
Views: 1219

main mistake, wrong order of "id, commandType" Yes, it was mentioned on IRC too. Thanks anyway! Looking forward to a hopefully improved (and easier?) event system. Another thing although it didn't lead to a crash in this particular case. If you intend to send an event from a thread and have a wxStr...
by Kraymer
Wed May 20, 2009 10:52 am
Forum: C++ Development
Topic: GUI freezes while wxThread is reading serial port
Replies: 3
Views: 902

Are you using AddPendingEvent() in your Entry() routine? I think that should go smoothly (in comparison to e.g. ProcessEvent() ). Of course, like already mentioned, it's hard to say without any code.