Search found 10 matches

by hmtksteve
Sat Sep 03, 2005 5:17 pm
Forum: C++ Development
Topic: wxfile and opening files
Replies: 8
Views: 4202

Large files

What do we do for large files? I'm trying to write an SQL parsing program to go into my SQL backups and look for keywords. I then want it to take the line with the keyword and put it in a new file so that I can return these items to my server. I tried using wxTextFile but the files I'm working with ...
by hmtksteve
Tue Apr 05, 2005 10:39 pm
Forum: C++ Development
Topic: How to use wxLogWindow?
Replies: 7
Views: 3723

Wny not

Why not just create a class of wxframe with a read only text control and just send it mesages? That's what I do...
by hmtksteve
Wed Mar 30, 2005 3:13 am
Forum: C++ Development
Topic: Searching a treectrl
Replies: 1
Views: 1159

Searching a treectrl

here is my code Buffer.Append(ItemName); do { if(text.Len()==0) { otherid = theTree->GetFirstChild(branch, cookie); } if(otherid.IsOk()) { do { // valid text = theTree->GetItemText(otherid); if(Buffer.Cmp( text )== 0) { // We have a match! OnNewRoot(otherid, ItemName, names, values, i); return; } ot...
by hmtksteve
Wed Mar 30, 2005 2:59 am
Forum: General Development
Topic: saving structures
Replies: 13
Views: 4623

XML

I'm just going to save as XML and create a function full of

Code: Select all

integervariablexyz=0;
wxStringvariablexyz.Clear();
To clear out my data...

I'm just looking for an "easier, quicker, more seductive" way to do this.
by hmtksteve
Mon Mar 28, 2005 8:32 pm
Forum: General Development
Topic: saving structures
Replies: 13
Views: 4623

clearing functions

A short cut I use to clear out my structures is to save an empty structure to file and reload it when I want to clear the existing structure.

If I fread the above structure back into the existing (used) structure, will it effectively clear it or will it just cause trouble?
by hmtksteve
Mon Mar 28, 2005 6:42 pm
Forum: General Development
Topic: saving structures
Replies: 13
Views: 4623

saving structures

I'm porting some code from C++ to wxwidgets My question involves saving structures. In the past if I have a structure: struct some_data { char name[50]; int number; char Job[100]; }; If I save this using fwrite I then use fread to read it back everything works fine because the size of the structure ...
by hmtksteve
Sun Mar 27, 2005 4:23 am
Forum: C++ Development
Topic: How to use wxTreeCtrl
Replies: 6
Views: 2287

Spelling Error

My intial attempts involved a spelling error... I now have a new question. Is there an easy way to search a tree for a given string? Some of my tree branches are 4 levels deep and searching for the next siblings and then doing a compare works to find the top level branches but if a branch is 3 deep ...
by hmtksteve
Fri Mar 25, 2005 2:25 pm
Forum: C++ Development
Topic: How to use wxTreeCtrl
Replies: 6
Views: 2287

Here is my code

pctreectrl.h #ifndef __PCTREECTRL_H__ #define __PCTREECTRL_H__ #include <wx/treectrl.h> class PCTreeFrame: public wxFrame { private: public: PCTreeFrame(wxWindow *parent, const wxString& title, const wxPoint& pos, const wxSize& size); ~PCTreeFrame(); wxTreeCtrl *theTree; wxMenuBar *menuB...
by hmtksteve
Fri Mar 25, 2005 1:01 pm
Forum: C++ Development
Topic: How to use wxTreeCtrl
Replies: 6
Views: 2287

wxtreeid

I can't save the ID.

Whenever I try I get error messages teling me the variable was never declared.

I add

Code: Select all

wxTreeItem ID  rootID;
rootID = theTree->AppendItem(...);
when it compiles it keeps telling me that rootID was never declared.
by hmtksteve
Fri Mar 25, 2005 2:59 am
Forum: C++ Development
Topic: How to use wxTreeCtrl
Replies: 6
Views: 2287

How to use wxTreeCtrl

I'm trying to use a treectrl to display data to the user in my program. I have no problem adding a root item and a few child items with a child of their own... But I have a problem. I want there to be: 1 root item a small number of level 1 items a large number of level 2 items and the final level of...