Search found 148 matches

by timg
Thu May 01, 2008 9:39 pm
Forum: C++ Development
Topic: Excel Automation: how to get ranges like "A1:D1"
Replies: 2
Views: 612

I haven't tried to copy data out of Excel before like this, but I don't think it would work the way you are doing it.

You might want to try making your wxVariant an array at least as big as what you are trying to get.
by timg
Tue Feb 05, 2008 10:23 pm
Forum: Component Writing
Topic: how to keep a window fix-sized?
Replies: 2
Views: 1044

From the manual:

The default frame style is for normal, resizeable frames. To create a frame which can not be resized by user, you may use the following combination of styles: wxDEFAULT_FRAME_STYLE & ~ (wxRESIZE_BORDER | wxRESIZE_BOX | wxMAXIMIZE_BOX)
by timg
Mon Jan 21, 2008 5:20 pm
Forum: C++ Development
Topic: YAGQ - Yet another Grid Question
Replies: 5
Views: 739

You don't want to call CreateGrid again.

Just call AppendRows(NumOfRows) on the grid you already have (after you delete the exisiting rows as suggested above)
by timg
Fri Jan 04, 2008 5:50 pm
Forum: wxCode
Topic: double to wxLongLong conversion (newbie question)
Replies: 4
Views: 1020

you can just do it like this:

Code: Select all

mygrid->SetCellValue(4, 3, wxString::Format("%f", mydouble));
by timg
Tue Nov 13, 2007 7:59 pm
Forum: C++ Development
Topic: multiple fonts in a text control
Replies: 6
Views: 810

It should only change the font for newly typed text.

Maybe you can explain a little more what you are doing. I am using similar code in one of my projects and it does work.
by timg
Tue Nov 13, 2007 6:44 am
Forum: C++ Development
Topic: multiple fonts in a text control
Replies: 6
Views: 810

Don't do the first part - that sets the font for the whole text control. Instead, do something like this: if(font->ShowModal() == wxID_OK) { wxTextAttr tmp; tmp.SetFont(font->GetFontData().GetChosenFont()); tcMain->SetStyle(tcMain->GetInsertionPoint(), tcMain->GetInsertionPoint(), tmp); } That shoul...
by timg
Tue Nov 13, 2007 1:07 am
Forum: C++ Development
Topic: multiple fonts in a text control
Replies: 6
Views: 810

How are you setting the new font in the wxTextCtrl? Are you specifying where to start with the new style?

Code: Select all

myTextCtrl->SetStyle(myTextCtrl->GetInsertionPoint(),myTextCtrl->GetInsertionPoint(),myStyle);
by timg
Fri Nov 09, 2007 10:28 pm
Forum: C++ Development
Topic: accepting "Enter" from a wxTextCtrl
Replies: 2
Views: 447

Be sure you create your wxTextCtrl with the wxTE_PROCESS_ENTER style, then add this:

Code: Select all

	EVT_TEXT_ENTER(ID_TEXTCTRL, myFrame::OnEnter)
To your EVENT_TABLE, of course changing the ID to your textctrl's ID and the function to whatever function you need.
by timg
Thu Nov 08, 2007 9:17 pm
Forum: C++ Development
Topic: Visual C++ 2005 won't load images from file
Replies: 7
Views: 767

I have not used Toolbars, but I would think that you need to resize the image to the correct dimensions. If you are worried about resizing to the right size, call GetToolBitmapSize() on the toolbar and resize to the size it gives you.

The wxImage size can be changed with image.Rescale(width, height)
by timg
Thu Nov 08, 2007 8:17 pm
Forum: C++ Development
Topic: Visual C++ 2005 won't load images from file
Replies: 7
Views: 767

For the image handler issue, did you initialize the image handler for the type you want to use?

you could stick this:

Code: Select all

    ::wxInitAllImageHandlers();
into your wxApp::OnInit() function if you didn't.
by timg
Wed Nov 07, 2007 5:53 pm
Forum: C++ Development
Topic: Problems setting an app icon
Replies: 8
Views: 882

If you still have trouble, check this link.

http://www.gamedev.net/community/forums ... _id=457396

there seem to be some links to resource editors there. I haven't tried any of them though.
by timg
Wed Nov 07, 2007 5:44 pm
Forum: C++ Development
Topic: Problems setting an app icon
Replies: 8
Views: 882

Ok, I'll try that. But I don't have any experience with rc files, so I have a couple of questions for you. Where you entered klp.ico, should I substitute the name of the file I want to use, or does it need to say klp.ico? Can I make the rc file with only those two lines, or does it need to have mor...
by timg
Wed Nov 07, 2007 3:51 am
Forum: C++ Development
Topic: Problems setting an app icon
Replies: 8
Views: 882

just with a text editor.
by timg
Wed Nov 07, 2007 2:47 am
Forum: C++ Development
Topic: Problems setting an app icon
Replies: 8
Views: 882

I'm using Visual C++ 2003, not 2005, but what I did was create a .rc file with same name as solution and put this inside: anIcon ICON klp.ico #include "wx\msw\wx.rc" then in the frame constructor, used this code frame->SetIcon(wxICON(anIcon)); Is that what you tried? I also added the .rc file to my ...
by timg
Mon Nov 05, 2007 11:08 pm
Forum: C++ Development
Topic: wxAboutBox unresolved external symbol
Replies: 2
Views: 572

I am not positive which one it is in, but it works fine in my program that links to these additional libraries:

wxmsw28_adv.lib
wxbase28_net.lib

If I had to guess it would be in the _adv.lib