Search found 78 matches

by Virchanza
Mon Jun 07, 2010 11:36 am
Forum: C++ Development
Topic: wxNotebook on MS-Windows 7 : Won't change panel
Replies: 11
Views: 1934

wxNotebook on MS-Windows 7 : Won't change panel

My main dialog window contains a wxNotebook. The wxNotebook contains 3 panels, which of course can be navigated through by using the 3 tabs at the top of the notebook. My program works absolutely fine on Linux (wxGTK). However, I complied it on MS-Windows 7 Ultimate, ran it, but the wxNotebook doesn...
by Virchanza
Sun Jun 06, 2010 10:12 am
Forum: C++ Development
Topic: Wean me off wxMutexGuiEnter
Replies: 4
Views: 1373

Wean me off wxMutexGuiEnter

OK so I'm developing a multi-threaded application. There's two threads: ============================================================ Thread 1 : Main Thread : This is the main GUI thread. The main GUI thread displays a dialog box. On this dialog box, there is a wxListCtrl which displays information s...
by Virchanza
Wed Jun 02, 2010 1:29 pm
Forum: C++ Development
Topic: Destroy also set NULL ?
Replies: 2
Views: 772

If you create a local variable within a function, there's only 2 ways that the variable can be altered from outside of that function: 1) If you pass the variable's address to another function 2) If you pass the variable by reference to another function (It's possible that you could use a preprocesso...
by Virchanza
Wed Jun 02, 2010 1:04 pm
Forum: C++ Development
Topic: Try out X11 without messing up my GTK setup
Replies: 1
Views: 519

Try out X11 without messing up my GTK setup

I'm running the latest version of 32-Bit Ubuntu (Lucid Lynx). I installed Codeblocks and the wxWidgets development libraries in the most vanilla fashion possible by using "apt-get" as follows: apt-get install codeblocks apt-get install libwxgtk2.8-dev libwxgtk2.8-dbg I opened up Codeblocks, clicked ...
by Virchanza
Mon May 31, 2010 9:36 am
Forum: C++ Development
Topic: Segfault within wxWidgets library under GTK with wxListCtrl:
Replies: 1
Views: 431

Segfault within wxWidgets library under GTK with wxListCtrl:

Create a wxListCtrl and set it to Report Mode (i.e. wxLC_REPORT). I have done some testing with wx2.8 under GTK, and it appears that the wxWidgets library segfaults if you add an item to the wxListCtrl before having added a column. Firstly, let me show you some code that works fine. You can copy thi...
by Virchanza
Sat May 29, 2010 1:49 pm
Forum: C++ Development
Topic: wx2.8 is missing wxPanel::SetDefaultItem
Replies: 2
Views: 639

I found a workaround for what I'm trying to achieve. I have a wxNoteBook, and it contains 3 wxPanel's. When a tab is clicked on, a new panel appears, and I want each panel to have its own default button. The wxNotebook class has a PAGE_CHANGED event, so I use it as follows: void DialogMain::OnTabCha...
by Virchanza
Sat May 29, 2010 1:14 pm
Forum: C++ Development
Topic: wx2.8 is missing wxPanel::SetDefaultItem
Replies: 2
Views: 639

wx2.8 is missing wxPanel::SetDefaultItem

If you look at the manual for wx2.6, you'll see that the wxPanel class contains a member function called SetDefaultItem: http://docs.wxwidgets.org/2.6/wx_wxpanel.html However, if you look at the manual for wx2.8, the function is no longer listed: http://docs.wxwidgets.org/2.8/wx_wxpanel.html I've se...
by Virchanza
Fri May 28, 2010 11:30 am
Forum: C++ Development
Topic: Reshape and Resize a control after you change its text
Replies: 2
Views: 700

The following didn't work: m_static_status->SetLabel( wxT("one two three four five six seven") ); this->Layout(); However the following did work: m_static_status->SetLabel( wxT("one two three four five six seven") ); m_static_status->GetParent()->Layout(); The parent of my wxStaticText control is a ...
by Virchanza
Fri May 28, 2010 11:15 am
Forum: C++ Development
Topic: Making thread run after program exits
Replies: 4
Views: 1351

I like TrV's idea of simply hiding the main GUI.

That's what Firefox does if you close it while there's something currently downloading.
by Virchanza
Fri May 28, 2010 11:15 am
Forum: C++ Development
Topic: Why wxString**---C++basics
Replies: 3
Views: 790

The wxSQLite3FunctionContext class might contain a pointer member variable as follows: class wxSQLite3FunctionContext { protected: void *p; }; This variable, "p", stores the memory address of some particular data. It looks as though wxSQLite3FunctionContext wants to give you the ability to change th...
by Virchanza
Fri May 28, 2010 10:45 am
Forum: C++ Development
Topic: Reshape and Resize a control after you change its text
Replies: 2
Views: 700

Reshape and Resize a control after you change its text

I have a wxStaticText control centered in the middle of my main dialog box. When I run my program and manually resize the main dialog using the mouse, the wxStaticText control is automagically repositioned so that it remains in the middle of the dialog box. No problem there. OK so let's say that my ...
by Virchanza
Fri May 28, 2010 10:27 am
Forum: C++ Development
Topic: Simple thread runs forever until it's killed
Replies: 2
Views: 691

Thanks a lot for your reply. It actually wouldn't be impossible for me to do one of the following: a) Call an a synchronous function instead or b) Call a "semi-synchronous" function that is synchronous until it times out and returns. But I really don't want to do either of those because my code is s...
by Virchanza
Fri May 28, 2010 9:29 am
Forum: C++ Development
Topic: Simple thread runs forever until it's killed
Replies: 2
Views: 691

Simple thread runs forever until it's killed

You might see some really bad programming errors in this post, but please humour me and read all the way to end before beginning to compose your reply. Let's say we have a thread that makes the PC speaker beep periodically (i.e. beep beep beep). This thread is extremely simple: class BeeperThread : ...
by Virchanza
Sat Aug 01, 2009 5:30 pm
Forum: C++ Development
Topic: How to connect to a timer?
Replies: 1
Views: 620

How to connect to a timer?

Here's what I have in the constructor of the main dialog box for my program: DialogMain::DialogMain( wxWindow* parent ) : DialogMainTemplate( parent ) { timer_refresh_sniffbox = new wxTimer(this); timer_refresh_sniffbox->Connect( wxEVT_TIMER, wxTimerEventHandler( DialogMain::OnTimerRefreshSniffBox )...
by Virchanza
Mon Jul 27, 2009 3:11 pm
Forum: Open Discussion
Topic: Any need for "volatile" when accessing stuff btwn
Replies: 6
Views: 2275

OK I got the answers I needed. It turns out that I don't need volatile. There's a short discussion of it here: http://groups.google.ie/group/comp.lang.c++/browse_thread/thread/4e68d5b929c344d4/ Also regarding the atomic thing with 32-Bit integers, well that's a no-no as well. I can't remember exactl...