Search found 27 matches

by BobS0327
Fri Dec 01, 2006 2:36 am
Forum: C++ Development
Topic: Converting C# code to C++ wxwidgets code
Replies: 1
Views: 556

Converting C# code to C++ wxwidgets code

I am trying to convert the following C# code to wxWidgets C++ code. Can anybody off any suggestion etc on how to do this? PictureBox PB = ((Form2)child).pictureBox1; PB.Image = GetImage(URLloc); public Image GetImage(string sURL) { byte[] buffer = new byte[500000]; Stream str = null; try { HttpWebRe...
by BobS0327
Mon Oct 23, 2006 1:44 am
Forum: C++ Development
Topic: Implementing wxTimer
Replies: 4
Views: 3108

THANX!!!!!
by BobS0327
Sun Oct 22, 2006 10:45 pm
Forum: C++ Development
Topic: Implementing wxTimer
Replies: 4
Views: 3108

Implementing wxTimer

In the book Cross platform prgramming with wxWidgets there is a wxTimer example that is implemented as follows: MyFrame::MyFrame() : m_timer(this, TIMERID) How would I implement this timer in the following code snippet? MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size, ...
by BobS0327
Fri Sep 01, 2006 10:58 am
Forum: C++ Development
Topic: wxTxtCtrl problem
Replies: 10
Views: 2570

David,

First of all I just to say that I'm a wxWidgets newbie. So, I misunderstood how all my code works. My reasoning on how it should work was really off on a tangent.

Thanx for explaining the problem and providing a resolution.

Bob
by BobS0327
Thu Aug 31, 2006 11:12 pm
Forum: C++ Development
Topic: wxTxtCtrl problem
Replies: 10
Views: 2570

I've include a complete sample of my problem. This code compiles and runs fine. But if I uncomment the int y = text2->GetLineLength(0); statement, I will get a segmentation fault error. Anybody have any ideas on why this is happening and possibly a resolution? Thanx #include "wx/wxprec.h" #ifdef __B...
by BobS0327
Thu Aug 31, 2006 12:41 pm
Forum: C++ Development
Topic: wxTxtCtrl problem
Replies: 10
Views: 2570

Oops, sorry. btnAdd2DB is declared as a class member not a local variable.
by BobS0327
Thu Aug 31, 2006 11:37 am
Forum: C++ Development
Topic: wxTxtCtrl problem
Replies: 10
Views: 2570

It is initialized as follows: wxButton *btnAdd2DB; btnAdd2DB = new wxButton( this, AddRecord2DB, "Add Record to Database", wxPoint(350,130), wxSize(180,30)); btnAdd2DB->Disable(); The button is initially disabled until all the wxTextCtrl's contain data, at which time it is enabled. btnAdd2DB is part...
by BobS0327
Wed Aug 30, 2006 10:33 pm
Forum: C++ Development
Topic: wxTxtCtrl problem
Replies: 10
Views: 2570

I found the source of my problem. I just don't know how to fix it. The btnAdd2DB->Disable() causes the fault. void BasicPanel::OnTextEnter(wxCommandEvent& WXUNUSED(event)) { if(description->GetLineLength(0) > 0 && ipaddress->GetLineLength(0) > 0 && port->GetLineLength(0) > 0 && password->GetLineLeng...
by BobS0327
Wed Aug 30, 2006 10:02 pm
Forum: C++ Development
Topic: wxTxtCtrl problem
Replies: 10
Views: 2570

The GDB output: Program received signal SIGSEGV, Segmentation fault. [Switching to Thread -1208371504 (LWP 4413)] 0x080709cd in wxWindowBase::Disable (this=0x0) at /usr/local/include/wx-2.6/wx/window.h:453 453 bool Disable() { return Enable(false); } (gdb) backtrace #0 0x080709cd in wxWindowBase::Di...
by BobS0327
Wed Aug 30, 2006 2:10 pm
Forum: C++ Development
Topic: wxTxtCtrl problem
Replies: 10
Views: 2570

wxTxtCtrl problem

I am using wxWidget 2.6.3 with Linux Fedora Core 5 OS and Windows XP Pro OS. Essentially, I'm writing a cross platform app. My problem code: wxTextCtrl *key1; key1 = new wxTextCtrl(this, KeyText1,wxEmptyString , wxPoint(110, 180), wxSize(180, 30),wxTE_PROCESS_ENTER ); key1->SetToolTip( _T("First par...
by BobS0327
Sun Jul 09, 2006 1:45 pm
Forum: Compiler / Linking / IDE Related
Topic: Adding wxPanel to Minimal sample problem
Replies: 4
Views: 771

David, Jorgen,

Your suggestions have resolved my problem.

I'm a total wxWidgets newbie and I really appreciate your help.

THANX!!!!!

Bob
by BobS0327
Sat Jul 08, 2006 11:36 pm
Forum: Compiler / Linking / IDE Related
Topic: Adding wxPanel to Minimal sample problem
Replies: 4
Views: 771

This is the code that I use in my wxFrame: thePanel = new wxPanel(this, ID_WXPANEL1, wxPoint(0,0), wxSize(600,490), wxTAB_TRAVERSAL |wxNO_BORDER); My wxPanel: class BasicPanel : public wxPanel { public: BasicPanel( wxWindow* parent); ~BasicPanel( ); wxTextCtrl* theText; wxSpinCtrl *m_NumContollersSp...
by BobS0327
Wed Jul 05, 2006 11:53 pm
Forum: Compiler / Linking / IDE Related
Topic: Adding wxPanel to Minimal sample problem
Replies: 4
Views: 771

Adding wxPanel to Minimal sample problem

I am attempting to add a wxPanel to the Minimal example. Unfortunately, when I compile I get the following errors: MINIMAL.obj : error LNK2001: unresolved external symbol "protected: virtual class wxEventHashTable & __thiscall BasicPanel::GetEventHashTable(void)const " ([email protected]...
by BobS0327
Wed Jun 07, 2006 11:23 pm
Forum: C++ Development
Topic: Minimizing a wxDialog
Replies: 7
Views: 1551

I finally did resolve this problem by switching from wxDialog to wxFrame. However, this did create another unusual problem. I'm displaying two GIF images, several wxButtons, severl wxListCtrls and static text. This displays fine using a wxFrame under Linux but under Windows XP, the background is a d...
by BobS0327
Tue Jun 06, 2006 2:16 pm
Forum: C++ Development
Topic: Minimizing a wxDialog
Replies: 7
Views: 1551

oops, sorry,

Code: Select all

// Dialog constructor
MyDialog::MyDialog(const wxString& title, const wxPoint& pos, const 
	wxSize& 
	size, long style)
: wxDialog((wxDialog *)NULL, -1, title, pos, size, style)
{