Search found 423 matches

by clyde729
Thu Sep 13, 2007 11:35 am
Forum: C++ Development
Topic: How to implement a log window
Replies: 5
Views: 1423

In short: To use wxLogMessage just insert this to your frame's constructor:

Code: Select all

wxLogWindow* w = new wxLogWindow(this, wxT("log"));
where "this" is the frame
by clyde729
Wed Sep 12, 2007 9:44 pm
Forum: C++ Development
Topic: Problem with a while loop (font size)
Replies: 5
Views: 932

I tried it without the limitation to 99. And it works. As doublemax suggested: Use some debugging messages (wxLogMessage is always good!). Or post some minimal sample we could create to see why it's not working.
by clyde729
Wed Sep 12, 2007 7:53 pm
Forum: C++ Development
Topic: Problem with a while loop (font size)
Replies: 5
Views: 932

Maybe the text is empty? You should check that before doing your "while". I made a little sample project and your method works just fine.

What is dc? Check your font, if it is "Ok()". Make yourself some debug messages. Have a look on the wxLog classes.
by clyde729
Tue Sep 11, 2007 11:59 am
Forum: Platform Related Issues
Topic: msw: detecting source of wxIconizeEvent
Replies: 8
Views: 1617

One last try:

Check some flags, i.e. "wxApp::IsActive", "wxTopLevelWindow::IsActive", or "wxWindow::FindFocus" and stuff like that. Maybe they are different in the two minimizing ways.
by clyde729
Tue Sep 11, 2007 9:07 am
Forum: C++ Development
Topic: Annoying warning! How to fix it?
Replies: 6
Views: 969

O.K., I really don't like to write something like this, but what are you trying to do in your method? What does the calling code trying to do? Which values need to be saved? One last idea: Maybe you could change the interface of your method. Change the boolean return value to a wxString. Give the fi...
by clyde729
Tue Sep 11, 2007 8:13 am
Forum: Platform Related Issues
Topic: msw: detecting source of wxIconizeEvent
Replies: 8
Views: 1617

I didn't understand the whole. Are you trying to minimize your window (as default) when user clicks on the "minimize"-button in the titlebar? And you like to hide your window to systemtray when user clicks the "close"-button in the titlebar? So the [x] and not the [_] ? Well clicking the [x]-button ...
by clyde729
Tue Sep 11, 2007 7:46 am
Forum: C++ Development
Topic: Annoying warning! How to fix it?
Replies: 6
Views: 969

The compiler is right :) You are trying to give a (changeable) reference to your method. But references must always be initilized before they are used. So you got 2 ways to solve your problem: First one: Try it this way: protected: bool HasGotFiles(const wxString& sFileName = wxEmptyString); Use the...
by clyde729
Mon Sep 10, 2007 9:07 am
Forum: C++ Development
Topic: how to render a string containing special characters??
Replies: 6
Views: 769

Hmm... then it's getting difficult (at least for me). Which version and OS do you use? Maybe it's some unicode problem?
by clyde729
Mon Sep 10, 2007 8:04 am
Forum: C++ Development
Topic: how to render a string containing special characters??
Replies: 6
Views: 769

Just to exclude some minor causes: Did you tried "DrawText" or are the umlaute supported by the font which is used to draw?
by clyde729
Sun Sep 09, 2007 10:45 pm
Forum: C++ Development
Topic: wxLog
Replies: 6
Views: 1028

Hi,

maybe you have invalid pointers. You destroy the textctrl while there are still some messages to process. Try to force / reproduce the error and post some code. Explain us, what you are doing to get the error.
by clyde729
Wed Sep 05, 2007 2:38 pm
Forum: C++ Development
Topic: wxTextValidator and OnChar.
Replies: 2
Views: 556

I think it must be:

Code: Select all

BEGIN_EVENT_TABLE( MyTextValidator, wxTextValidator)
  EVT_CHAR(MyTextValidator::OnChar)
END_EVENT_TABLE()
since it is a method of "MyTextValidator" that you want to call.
by clyde729
Wed Sep 05, 2007 2:25 pm
Forum: C++ Development
Topic: PRINT DIALOG
Replies: 1
Views: 343

I think the print dialogs are native. So if you want to let the user only some limited action, you will probably need to show your own printer-dialog and _not_ show the native one.
by clyde729
Tue Sep 04, 2007 3:01 pm
Forum: C++ Development
Topic: wxGrid: how to make all cells visible?
Replies: 3
Views: 893

This isn't as easy as the scrollbar problem. You will have to use a dirty hack. The related window is the "wxGridWindow" (an undocumented child window of wxGrid). You can get access by using: wxWindow* wxGrid::GetGridWindow() You will have to connect to the paint-event of this window and override th...
by clyde729
Mon Sep 03, 2007 1:43 pm
Forum: C++ Development
Topic: wxTextCtrl event WXK_BACK
Replies: 8
Views: 1445

Don't know, where's the problem... I tried the following code and it works like a charm: BEGIN_EVENT_TABLE(MyTextCtrl,wxTextCtrl) EVT_KEY_DOWN(MyTextCtrl::OnKeyDown) END_EVENT_TABLE() MyTextCtrl::MyTextCtrl(wxWindow* parent, wxWindowID id, const wxString& title) { this->Create(parent, id, title); } ...
by clyde729
Mon Sep 03, 2007 12:50 pm
Forum: C++ Development
Topic: wxTextCtrl event WXK_BACK
Replies: 8
Views: 1445

which version / os do you use? This should work (in theory). Try to call "event.Skip(false)" explicitly. Does he recognize that you are catching the backspace? Try to add some logmessages