Search found 286 matches

by Radek
Tue Nov 13, 2012 8:03 am
Forum: C++ Development
Topic: Fighting with wxTextCtrl
Replies: 6
Views: 1699

Fighting with wxTextCtrl

I have a small window, a wxTextCtrl, which should demonstrate a font style. I have tried: wxColour clr; wxTextAttr defstyle; wxFont deffont; ... defstyle = SeeFont->GetDefaultStyle(); // SeeFont is the wxTextAttr deffont = defstyle.GetFont(); deffont.SetStyle(fc.isitalic ? wxFONTSTYLE_ITALIC : wxFON...
by Radek
Tue Nov 13, 2012 5:52 am
Forum: C++ Development
Topic: Application freeze while long operation takes place
Replies: 3
Views: 1301

Re: Application freeze while long operation takes place

IMO, your machine is choking from creating the database. The log messages are hanging somewhere in a queue and they do not have a chance even during a "starvation boost". IMO, you need a thread for creating the database. The thread will run at a priority slightly lower than a normal priority of a wi...
by Radek
Sat Nov 10, 2012 12:58 pm
Forum: C++ Development
Topic: Reading a zip - questions
Replies: 5
Views: 1460

Re: Reading a zip - questions

I see. Correct, when I comment out delete is and return to delete ff the program does not crash. Thanks, doublemax. I think the documentation should state more explicitely that you should not delete wxFSFile::GetStream(), only the detached ones.
by Radek
Sat Nov 10, 2012 8:47 am
Forum: C++ Development
Topic: Reading a zip - questions
Replies: 5
Views: 1460

Re: Reading a zip - questions

I have opted for the wxWidgets VFS in the end :) I am able to decompress files in the .zip and create a tree of the .zip contents. Terrific, that's what I wanted, but... ... str = fs->FindFirst(wxT("*"),wxFILE); //fs is wxFileSystem * while( !str.IsEmpty() ) { text = new wxString; ff = fs->OpenFile(...
by Radek
Thu Nov 08, 2012 6:48 pm
Forum: C++ Development
Topic: Reading a zip - questions
Replies: 5
Views: 1460

Re: Reading a zip - questions

I have checked it and I have foud out that wxDir does not know wxArchiveFS, therefore wxDirTraverser will be no use. I am not sure what I should use at this moment. If wxZipInputStream::Open() provides the uncompressed data for the given entry (using the attached wxFFileInputStream) then wxZipInputS...
by Radek
Thu Nov 08, 2012 5:57 pm
Forum: C++ Development
Topic: Reading a zip - questions
Replies: 5
Views: 1460

Reading a zip - questions

I need to process a .zip file. The .zip file can contain several levels of directories. I need to create the directory tree of the .zip first. My build is "wxUSE_STL 0" so that I will use wxZipInputStream and similar classes. Q1: wxZipInputStream::GetNextEntry() returns a pointer to a wxZipEntry obj...
by Radek
Sun Oct 28, 2012 4:17 pm
Forum: C++ Development
Topic: How can I know the size of window(Emergency!!!)?
Replies: 4
Views: 1093

Re: How can I know the size of window(Emergency!!!)?

You need not call GetClientSize() only from OnPaint(). You can call GetClientSize() whenever you want. (Well, almost whenever. Don't call GetClient Size from the window's ctor. The reason is obvious: the window is't ready so far, you can get some default sizes at most.) You can call GetClientSize(),...
by Radek
Thu Oct 25, 2012 7:23 am
Forum: C++ Development
Topic: Error ISO C++ forbids declaration of MyFrame with no type
Replies: 3
Views: 2046

Re: Error ISO C++ forbids declaration of MyFrame with no typ

Naturally, it has if declaration of MyFrame is nowhere in sight -unless class MyFrame is declared in my_thread.h. If it isn't then something like #include "myframe.h" is missing. Note that C and C++ are L1 languages so that you need to declare everything before using it. If MyFrame is declared in my...
by Radek
Mon Oct 22, 2012 4:35 pm
Forum: C++ Development
Topic: wxSplitterWindow - problems with reconfiguring
Replies: 4
Views: 1714

Re: wxSplitterWindow - problems with reconfiguring

switch( SplitLevel ) { case 0 : { MainWnd->Unsplit(); MainWnd->SplitHorizontally(ptree,ptext); SplitLevel = 1; } break; case 1 : { MainWnd->Unsplit(ptext); SplitLevel = 2; } break; case 2 : { ptree->Hide(); ptext->Show(); SplitLevel = 3; } break; case 3 : { MainWnd->SplitVertically(ptree,ptext); Sp...
by Radek
Mon Oct 22, 2012 9:55 am
Forum: C++ Development
Topic: wxSplitterWindow - problems with reconfiguring
Replies: 4
Views: 1714

Re: wxSplitterWindow - problems with reconfiguring

The SplitLevel is the current wiew, which will be changed in the switch(). So "case 0" means that the windows are "side be side" and they should be reconfigured to "one above the other". Thus: case 0 : The windows are split vertically. Split horizontally (the sash should be horizontal on leaving the...
by Radek
Mon Oct 22, 2012 8:11 am
Forum: C++ Development
Topic: wxSplitterWindow - problems with reconfiguring
Replies: 4
Views: 1714

wxSplitterWindow - problems with reconfiguring

I have a wxSplitter window with two wxPanels, ptree (contains a sizer with a wxTreeCtrl) and ptext (constains a sizer with a wxRichTextCtrl). I want to cycle between views (1) Both panels side by side (ptree is left) (2) Both panels stacked (ptree is up) (3) Only one panel - ptree (4) Only one panel...
by Radek
Thu Oct 18, 2012 5:16 pm
Forum: C++ Development
Topic: wxDirTraverser - a wishing
Replies: 1
Views: 922

wxDirTraverser - a wishing

I need to create a custom directory tree. There are tools for it in wxWidgets - wxDir::Traverse() and wxDirTraverser - but they do not allow creating the tree so simply. The problem consists in the current directory: you get OnDir() but you do not know whether it is a subdirectory of the current dir...
by Radek
Thu Oct 18, 2012 2:42 pm
Forum: C++ Development
Topic: How to make wxPanel implementation
Replies: 5
Views: 1646

Re: How to make wxPanel implementation

Check the Local variables tab in your Watches window. If you have an older build of Code Blocks then all local variables should be there. If you have a newer build then you need to add watch by typing the variable name. Right click the pointer type variables and select dereference (or so) of the var...
by Radek
Thu Oct 18, 2012 6:19 am
Forum: C++ Development
Topic: How to make wxPanel implementation
Replies: 5
Views: 1646

Re: How to make wxPanel implementation

A GP fault (in Linux, "segmentation fault") is usually caused by a bad pointer (either NULL or a bogus). Create a debug build and break in your OnInit(). Trace until you crash. Check all pointers on your way (add them to the "Watches" window and when they are not NULL, check what they are referencin...
by Radek
Mon Oct 15, 2012 4:41 pm
Forum: C++ Development
Topic: Making a link inside a dialog box
Replies: 22
Views: 5533

Re: Making a link inside a dialog box

You are using some strange kind of wxWidgets not known to me, drharrison. There is no wxDialog ctor in standard wxWidgets (at least no public wxDialog ctor) which would fit your call. The wxDialog ctor has the following form: wxDialog::wxDialog( wxWindow *parent, // parent window wxWindowID id, // i...