Search found 223 matches

by DenDev
Sat Jan 23, 2016 1:41 pm
Forum: C++ Development
Topic: Programatically Adding & removing child control in a wxpanel
Replies: 19
Views: 1469

Re: Programatically Adding & removing child control in a wxpanel

Are you deleting the sizer in the panels destructor? What version of wx are you using?

You problem sounds quite odd to me since I have a dialog in one of my apps that creates and destroys its content on demand. Never had any issues with that.
by DenDev
Sat Jan 23, 2016 1:25 pm
Forum: C++ Development
Topic: Programatically Adding & removing child control in a wxpanel
Replies: 19
Views: 1469

Re: Programatically Adding & removing child control in a wxpanel

You should never explicitly delete a sizer. When you assign a sizer to a window (using SetSizer) the window owns the sizer and will delete it as required. When you assign a new sizer to a window the old one is deleted unless the window is told not to delete it. Unless you need the sizer to access th...
by DenDev
Sat Jan 23, 2016 11:54 am
Forum: C++ Development
Topic: Programatically Adding & removing child control in a wxpanel
Replies: 19
Views: 1469

Re: Programatically Adding & removing child control in a wxpanel

Have you tried to not reuse the sizer and instead create a new sizer each time the controls change? ... void load(MYDATACLASS * no) { //Freeze control to prevent screen updates Freeze(); //Create sizer szContent = new wxBoxSizer(...); //Set new sizer and delete the old one SetSizer(szContent, true);...
by DenDev
Thu Jan 14, 2016 6:36 pm
Forum: C++ Development
Topic: wxApp and the initial window show
Replies: 11
Views: 812

Re: wxApp and the initial window show

Have you tried to do the create and ShowModal the splashwindow as the last line of code in the app_win's constructor? Or have you tried to assign an event handler for wxEVT_SHOW on the app_win and create/ShowModal the splash from there? AFAIK wxApp requires a valid window handle in order to create a...
by DenDev
Thu Jan 14, 2016 6:18 pm
Forum: C++ Development
Topic: wxApp and the initial window show
Replies: 11
Views: 812

Re: wxApp and the initial window show

Remove this and try again:

Code: Select all

if (!wxApp::OnInit())
            return false;
by DenDev
Thu Jan 14, 2016 3:27 pm
Forum: C++ Development
Topic: Splash screen with video
Replies: 6
Views: 740

Re: Splash screen with video

I think some of your code is broke (construction of app_win), but you should consider to create app_win as not visible (remove "app_win->Show(true)" from app::OnInit) and then display it after you close / destroy the splash screen (in OnMediaFinished). Also, your splash screen should probably be cre...
by DenDev
Tue Jan 12, 2016 6:19 pm
Forum: C++ Development
Topic: How to call a function after a frame has been drawn
Replies: 3
Views: 269

Re: How to call a function after a frame has been drawn

Using an idle event would be ideal for this since it is not fired before the frame is fully displayed: http://docs.wxwidgets.org/trunk/classwx_idle_event.html - but it will still block the GUI while polling the hardware.
by DenDev
Mon Jan 11, 2016 11:10 am
Forum: C++ Development
Topic: wxSocketClient & Unread problem
Replies: 10
Views: 1102

Re: wxSocketClient & Unread problem

Even though marked as solved, I believe the issue is not really solved. You are always suggesting that you do not know how much data can be read from the socket - this is in fact not true. If you read through all of the RFC's that declares internet protocols (HTTP, FTP, POP3 and so on) you would kno...
by DenDev
Sun Jan 10, 2016 7:26 pm
Forum: C++ Development
Topic: wxSocketClient & Unread problem
Replies: 10
Views: 1102

Re: wxSocketClient & Unread problem

wxStopWatch and wxTimer have nothing to do with each other. wxStopWatch is used to determine how much time in milliseconds has elapsed since started or created. It is usefull when doing long tasks that has a timeout. If your sockets are used in separate threads it is important that they uses flag wx...
by DenDev
Sun Jan 10, 2016 10:50 am
Forum: C++ Development
Topic: wxSocketClient & Unread problem
Replies: 10
Views: 1102

Re: wxSocketClient & Unread problem

First you should know that I've had some issues with the reliability of wxSocket's. But as far as I can see this line: pSock->Read(buf2.data(), sizeof(buf2) ); will block until 256 bytes has been put into buf2 or the socket connection is terminated (or timeout is reached). If you want to read one li...
by DenDev
Thu Jan 07, 2016 6:25 pm
Forum: Platform Related Issues
Topic: wxStyledTextCtrl - crash when only using constructor
Replies: 9
Views: 1858

Re: wxStyledTextCtrl - crash when only using constructor

#26 in you latest stack trace suggests there is a bad pointer. Have you tried using one of the alternate MinGW's?

http://www.mingw.org/
http://sourceforge.net/projects/mingw-w64/
by DenDev
Wed Jan 06, 2016 8:12 pm
Forum: Compiler / Linking / IDE Related
Topic: Errors when building my wxW application on TDM-GCC-64
Replies: 4
Views: 854

Re: Errors when building my wxW application on TDM-GCC-64

Sorry, cannot help you with that one then. It seems like others experience odd problems when using TDM-GCC and this might be a problem in wxWidgets or a problem with the compiler.

viewtopic.php?f=1&t=41734

I'll stick with the old MingGW until this is solved..
by DenDev
Tue Jan 05, 2016 4:49 pm
Forum: Compiler / Linking / IDE Related
Topic: Errors when building my wxW application on TDM-GCC-64
Replies: 4
Views: 854

Re: Errors when building my wxW application on TDM-GCC-64

Looks like you are providing a wrong data type to a macro. Can you provide the line of code that causes the issue? Or a small sample that reproduces the problem?
by DenDev
Tue Jan 05, 2016 4:47 pm
Forum: C++ Development
Topic: Get Text size on a DC, but from a console app
Replies: 3
Views: 537

Re: Get Text size on a DC, but from a console app

Looks like the app cannot determine the screens pixel depth because there is not GDI window present. Try to set depth to 24 in the bitmaps constructor.
by DenDev
Sat Jan 02, 2016 12:33 pm
Forum: C++ Development
Topic: wxNotebook pages don't redraw
Replies: 8
Views: 1318

Re: wxNotebook pages don't redraw

Yes, putting the "wxSize(0, 0)" solves the problem though I don't know why. When you create the panel as a child of the notebook it is placed at the top of the Z-order and drawed (Freeze / Thaw should actually prevent this). Since it is set to default size and has no children or sizers it will appe...