Search found 223 matches

by DenDev
Sat Aug 27, 2016 6:01 pm
Forum: C++ Development
Topic: getting the output of another process
Replies: 2
Views: 446

Re: getting the output of another process

Handling output from another process can be quite annoying. I think you should try to examine wheter your process outputs errors to the errout stream which you can get access to with wxProcess::GetErrorStream: http://docs.wxwidgets.org/trunk/classwx ... d310948c68
by DenDev
Mon Jun 13, 2016 6:00 pm
Forum: C++ Development
Topic: Update size on dynamicly Add / Remove children
Replies: 10
Views: 1553

Re: Update size on dynamicly Add / Remove children

BoxSizer1 should probably be a wxFlexGridSizer to avoid weird control sizes.. As a sollution, try this: void wxWTestFrame::OnButton1Click(wxCommandEvent& event) { wxButton* button = new wxButton(DynamicPanel, wxID_ANY, _("dynamicly added button")); DynamicBoxSizer->Add(button, 0, wxEXPAND, 5); Dynam...
by DenDev
Mon Jun 13, 2016 12:29 pm
Forum: C++ Development
Topic: Update size on dynamicly Add / Remove children
Replies: 10
Views: 1553

Re: Update size on dynamicly Add / Remove children

You need to keep track of the outer boxsizer and do the layout and fit on that: void wxWTestFrame::OnButton1Click(wxCommandEvent& event) { wxButton* button = new wxButton(DynamicPanel, wxID_ANY, _("dynamicly added button")); DynamicBoxSizer->Add(button, 0, wxEXPAND, 5); BoxSizer1->Layout(); BoxSizer...
by DenDev
Thu Feb 18, 2016 2:27 pm
Forum: C++ Development
Topic: system metrics
Replies: 2
Views: 298

Re: system metrics

Try:

Code: Select all

wxPoint p = myFrame->ClientToScreen(myFrame->GetClientAreaOrigin());
by DenDev
Sat Feb 13, 2016 11:26 am
Forum: C++ Development
Topic: wxURL -> wxInputStream -> std::vector
Replies: 4
Views: 537

Re: wxURL -> wxInputStream -> std::vector

Http either predefines the size of the content in the header "Content-Length" as the number of octets (bytes) or the transfer is marked as chunked in with the "Transfer-Encoding" header. Note that both might be defined, so in order to receive the content you must always check for chunked encoding be...
by DenDev
Fri Jan 29, 2016 11:14 am
Forum: C++ Development
Topic: wxSocket write status
Replies: 1
Views: 199

Re: wxSocket write status

Usually the socket blocks until all data has been tranfered or the connection is terminated (TCP stream sockets).
by DenDev
Wed Jan 27, 2016 2:38 pm
Forum: C++ Development
Topic: Pointer to a dynamic array
Replies: 4
Views: 409

Re: Pointer to a dynamic array

I'm not sure that I entirely understand the question, but is this what you want? //Declare point list as a type typedef wxVector<wxPoint> myPointList; //Usage myPointList points; points.Add(wxPoint(..)); ... myPointList *points_ptr = &points; points_ptr->Add(wxPoint(..)); ... wxPoint p1 = points[0];...
by DenDev
Mon Jan 25, 2016 1:08 pm
Forum: C++ Development
Topic: Programatically Adding & removing child control in a wxpanel
Replies: 19
Views: 1634

Re: Programatically Adding & removing child control in a wxpanel

When looking into your code it seems that the "Create" method is called twice: This is the constructor of objViewPanel objViewPanel::objViewPanel(wxWindow* parent,wxWindowID id, const wxPoint& pos, const wxSize& size , long style , const wxString& name ) : wxScrolledWindow(parent,id,pos,size,style,n...
by DenDev
Mon Jan 25, 2016 11:15 am
Forum: C++ Development
Topic: Programatically Adding & removing child control in a wxpanel
Replies: 19
Views: 1634

Re: Programatically Adding & removing child control in a wxpanel

What happens if you add your custom panel to a regular panel? .... current_object_pages = new wxNotebook(current_object, ID_NOTEBOOK2, wxDefaultPosition, wxDefaultSize, 0, _T("ID_NOTEBOOK2")); wxPanel *dummy = new wxPanel(current_object_pages, ID_PANEL_??, wxDefaultPosition, wxDefaultSize, wxTAB_TRA...
by DenDev
Mon Jan 25, 2016 10:39 am
Forum: C++ Development
Topic: Programatically Adding & removing child control in a wxpanel
Replies: 19
Views: 1634

Re: Programatically Adding & removing child control in a wxpanel

Do you assign a size to the panel in its contructor? I remember that I have had odd crashes when adding a panel to a notebook that had a non default size..
by DenDev
Sun Jan 24, 2016 11:37 am
Forum: C++ Development
Topic: Programatically Adding & removing child control in a wxpanel
Replies: 19
Views: 1634

Re: Programatically Adding & removing child control in a wxpanel

Hehe.. If I had a dime for each minute wasted on dealing with cut 'n paste bugs I'd be a wealthy man! ;-)
by DenDev
Sat Jan 23, 2016 7:48 pm
Forum: C++ Development
Topic: How to make \n appear in wxTextCtrl?
Replies: 8
Views: 604

Re: How to make \n appear in wxTextCtrl?

\n is just a C-style escape character for 0x0A and equals to \x0a, \r\n equals to \x13\x0a :-)
by DenDev
Sat Jan 23, 2016 6:21 pm
Forum: C++ Development
Topic: How to make \n appear in wxTextCtrl?
Replies: 8
Views: 604

Re: How to make \n appear in wxTextCtrl?

Does a replace do any change?

Code: Select all

wxString str = (set to whatever);
str.Replace("\n", "\r\n");
text_ctrl->AppendText(str);
by DenDev
Sat Jan 23, 2016 4:23 pm
Forum: C++ Development
Topic: How to make \n appear in wxTextCtrl?
Replies: 8
Views: 604

Re: How to make \n appear in wxTextCtrl?

It works in wx version 3.0.2. You might try to "\r\n" instead since that is the default line break sequence in windows.
by DenDev
Sat Jan 23, 2016 1:53 pm
Forum: C++ Development
Topic: Programatically Adding & removing child control in a wxpanel
Replies: 19
Views: 1634

Re: Programatically Adding & removing child control in a wxpanel

Btw. Are you assigning any event handlers to any of the controls or the panel? Could it be that such handler tries to access a control that has been deleted?