Search found 66 matches

by JudyL
Tue Jul 22, 2008 5:05 pm
Forum: C++ Development
Topic: Creating event...
Replies: 2
Views: 1122

Here's some code I just wrote yesterday that creates a wxEVT_COMMAND_CHOICE_SELECTED // set first choice and force a wxChoiceEvent m_choiceFreqRange->SetSelection (0); wxCommandEvent fakeEvent (wxEVT_COMMAND_CHOICE_SELECTED, ID_CHOICE_FREQ_RANGE); fakeEvent.SetEventObject (m_choiceFreqRange); fakeEv...
by JudyL
Thu Jul 10, 2008 7:30 pm
Forum: C++ Development
Topic: '\n' interpreted different ways
Replies: 9
Views: 2166

We know that unix use '\n' and windows use '\r\n'. It doesn't matter how other applications interpret this. Not true. That distinction is not dictated by the OS. It is determined by the programs that read and write text files. There is no hard and fast rule on an operating system as to what constit...
by JudyL
Wed Jul 09, 2008 12:08 pm
Forum: C++ Development
Topic: tab flow control with wxwidgets
Replies: 2
Views: 883

Does MoveAfterInTabOrder give you what you need?

Judy
by JudyL
Fri Jun 27, 2008 8:00 pm
Forum: C++ Development
Topic: wxColor vs wxColour
Replies: 4
Views: 1429

I find that my use of things like color/colour and gray/grey always depends on whether I've been recently reading stuff by American or English authors. It filters into the brain and becomes the "right" way to spell this word.
by JudyL
Thu Jun 26, 2008 12:32 pm
Forum: General Development
Topic: Closing a wxWidget application?
Replies: 5
Views: 1695

I have tried the Distroy function but it does not close the application properly... I get a link error when I try to compile the application again Destroy does work. I've used it to close an application calling it from the handler for the wxCloseEvent of the main frame window. It closes the window ...
by JudyL
Wed Jun 25, 2008 8:40 pm
Forum: C++ Development
Topic: Useful debug information
Replies: 15
Views: 3258

is the debug version of new used when you #define _CRTDBG_MAP_ALLOC or am I way off base? The problem with using just that macro is that the file and line numbers aren't very useful (the source code file that maps new to malloc is what shows up). You'll need something like what MFC does: // from af...
by JudyL
Wed Jun 25, 2008 7:49 pm
Forum: C++ Development
Topic: Useful debug information
Replies: 15
Views: 3258

sudden thought - make sure you are using the debug version of new for your allocations. The debug version is what logs the file and line numbers for reporting.
by JudyL
Wed Jun 25, 2008 7:40 pm
Forum: C++ Development
Topic: Useful debug information
Replies: 15
Views: 3258

By normal mem dump stuff I mean the hex code and how many bytes, but no line/file information. Using these crt flags, should I expect line/file information in the output window? Depends on how the files were compiled, same as with non-wx apps. I don't remember off-hand which switches control what a...
by JudyL
Wed Jun 25, 2008 7:31 pm
Forum: C++ Development
Topic: Useful debug information
Replies: 15
Views: 3258

So I included the crtdbg.h at the top of my APPs cpp. and then in the OnExit function of my app i included the call to crtDumpMemoryLeaks(), but it's not giving me anything extra in the output window. just the normal mem dump stuff. am i forgetting to add something? You don't mention it, so I'm goi...
by JudyL
Wed Jun 25, 2008 7:18 pm
Forum: C++ Development
Topic: Useful debug information
Replies: 15
Views: 3258

Now is that in conjunction with the visual leak detector, or is that independent of that? That was added so that the "in-house" memory leak detection of Visual Studio via its debug CRT libraries would see and report memory leaks in my code as opposed to the wx code. This is the report tha...
by JudyL
Wed Jun 25, 2008 6:26 pm
Forum: C++ Development
Topic: Useful debug information
Replies: 15
Views: 3258

When debugging my wx apps with Visual Studio, I found that I needed to add _CrtSetDbgFlag (_CrtSetDbgFlag (_CRTDBG_REPORT_FLAG) | _CRTDBG_LEAK_CHECK_DF); to my app's OnInit to get VS to report the memory leaks in my app. Without this, my wx leaks were reported but not my own home-grown leaks. Judy
by JudyL
Wed Jun 25, 2008 6:22 pm
Forum: General Development
Topic: Closing a wxWidget application?
Replies: 5
Views: 1695

Call Destroy instead of Close in your close event handler
by JudyL
Thu Jun 19, 2008 12:17 pm
Forum: C++ Development
Topic: 2 Instances of wxWidget in one Process
Replies: 7
Views: 1732

I already posted the code from the DLL InitInstance (called at DLL load) and ExitInstance (called at DLL unload). There is nothing else related to wx ininitalization in the DLL source code. Please note that my DLL does not contain GUI code. Also, my DLL exports C style functions. app.h class CMyApp ...
by JudyL
Wed Jun 18, 2008 12:22 pm
Forum: C++ Development
Topic: 2 Instances of wxWidget in one Process
Replies: 7
Views: 1732

I have exactly the same situation as you - a wx DLL that must be callable from both non-wx and wx applications. As you've discovered, if a wx app statically links with a wx DLL, it crashes. If a wx app dynamically links with a wx DLL, it leaks memory. My solution is the following: The non-wx app can...
by JudyL
Thu Jun 12, 2008 6:39 pm
Forum: C++ Development
Topic: Display Escaped %-sign
Replies: 2
Views: 1132

%% is correct. This code

Code: Select all

    wxString str = wxString::Format ("testing %% in a string");
    wxMessageDialog dlg (NULL, str, "title", wxOK | wxICON_INFORMATION);
    dlg.ShowModal ();
produces a message box containing testing % in a string

Judy