Search found 23 matches
- Mon Apr 17, 2006 3:33 pm
- Forum: C++ Development
- Topic: wxString: How to get character code of wxChar ?
- Replies: 12
- Views: 2363
Perhaps what he needs to do is convert the string from ansi to unicode ? PWSTR StrA2W( PCSTR Data, PWSTR dest, int buflen ) { // convert from LPSTR to LPWSTR assert( Data != NULL ); assert( Data[0] != NULL ); if( Data == NULL || Data[0] == NULL ) { return NULL; } size_t acp = GetACP(); if( buflen ==...
- Tue Apr 11, 2006 4:31 am
- Forum: The Code Dump
- Topic: Latest wxTreeMultiCtrl Code
- Replies: 36
- Views: 14703
This is actually unrelated to your code but I ran into the ESP problem a week ago and it had something to do with the event table. If I commented out the DECLARE_EVENT_TABLE() then the problem went away, even if the event table was empty it did the same thing, complained that ESP was not properly sa...
- Tue Apr 11, 2006 2:09 am
- Forum: The Code Dump
- Topic: wxTreeCtrl and multiply displayed items - Saving memory
- Replies: 1
- Views: 1704
Here is the revised template version. Also I was thinking of making it match wxTreeCtrl's interface more closely so that for all intents you could use this directly assuming that you have appended at least 1 item so it has the tree control pointer of course. If there is any interest let me know and ...
- Mon Apr 10, 2006 10:24 am
- Forum: The Code Dump
- Topic: wxTreeCtrl and multiply displayed items - Saving memory
- Replies: 1
- Views: 1704
wxTreeCtrl and multiply displayed items - Saving memory
I have a tree control where I display thousands of items from a database. Thing is objects can be displayed in multiple places at the same time depending on the objects attributes. So I wrote this class, well two but one is negligable and only used as a base class for objects, could also rewrite it ...
- Wed Apr 05, 2006 2:14 pm
- Forum: C++ Development
- Topic: How do I return Parent that is top level window?
- Replies: 9
- Views: 4384
I merely used the frame as an example of finding a specific window type from a nested class. Could just as easily find a wxDialog based class in the same manner. And how often do you create a dialog without a parent unless its the top level window to start with ? Thats not good practice in general. ...
- Wed Apr 05, 2006 4:42 am
- Forum: C++ Development
- Topic: How do I return Parent that is top level window?
- Replies: 9
- Views: 4384
I do believe your solution ends up doing the same thing just in a more convuluted way. If he wants to find a specific window thats a different story. wxFrame* GetParentFrame(wxWindow* pWindow) { wxWindow* pWin = pWindow; wxFrame* pFrame = NULL; while( NULL == pFrame ) { pFrame = dynamic_cast<wxFrame...
- Tue Apr 04, 2006 7:56 am
- Forum: C++ Development
- Topic: How do I return Parent that is top level window?
- Replies: 9
- Views: 4384
I believe this does what you want actually. wxWindow * wxApp::GetTopWindow() Returns a pointer to the top window. If the top window hasn't been set using wxApp::SetTopWindow, this function will find the first top-level window (frame or dialog) and return that. or you could try this wxWindow* wxWindo...
- Fri Mar 31, 2006 9:26 am
- Forum: C++ Development
- Topic: wxTreeCtrl and Owner DATA - not DRAW :)
- Replies: 2
- Views: 730
- Fri Mar 31, 2006 9:18 am
- Forum: C++ Development
- Topic: open drop down box using wxComboBox ?
- Replies: 6
- Views: 1484
- Fri Mar 31, 2006 2:06 am
- Forum: C++ Development
- Topic: wxTreeCtrl and Owner DATA - not DRAW :)
- Replies: 2
- Views: 730
wxTreeCtrl and Owner DATA - not DRAW :)
in windows with mfc or without I can make a tree control ask me for the text when it needs to display it. I just set LPSTR_TEXTCALLBACK and it then asks me for the string when it needs it. Is there a way to do this with wxTreeCtrl ? I need to display thousands of items(a db view basically) and they ...
- Fri Mar 31, 2006 1:55 am
- Forum: C++ Development
- Topic: open drop down box using wxComboBox ?
- Replies: 6
- Views: 1484
- Fri Mar 31, 2006 1:43 am
- Forum: Compiler / Linking / IDE Related
- Topic: string problem in VC++ Express
- Replies: 8
- Views: 1272
- Tue Mar 28, 2006 4:40 am
- Forum: C++ Development
- Topic: Creating an event based on the state of a widget
- Replies: 9
- Views: 1406
- Tue Mar 28, 2006 2:01 am
- Forum: C++ Development
- Topic: Creating an event based on the state of a widget
- Replies: 9
- Views: 1406
You may have never used enums but you do have them. examples enum { Ok = 0, im, so, bad, sometimes }; or a named enum enum _state { Ok = 0, im, so, bad, sometimes }; btw they get numbered seq automatically so im=1 so=2 etc you can then do things like void foo( _state StatVar ) The problem with enum ...
- Mon Mar 27, 2006 6:49 pm
- Forum: C++ Development
- Topic: Problem with de wxTextCtrl
- Replies: 8
- Views: 1598