Search found 148 matches

by timg
Wed Nov 29, 2006 12:42 am
Forum: C++ Development
Topic: wxAutomationObject and exel question
Replies: 10
Views: 2466

I tried the code and this seems to work for me. void TestFrm::WxButton1Click(wxCommandEvent& event) { wxVariant var; wxAutomationObject excelObject; if (excelObject.GetInstance("Excel.Application")) { wxAutomationObject cell; wxVariant rng[2]; int row, col; row = 1; col = 1; rng[0] = w...
by timg
Tue Nov 28, 2006 9:24 pm
Forum: C++ Development
Topic: wxAutomationObject and exel question
Replies: 10
Views: 2466

what does var.GetType() return?
by timg
Tue Nov 28, 2006 8:14 pm
Forum: C++ Development
Topic: wxAutomationObject and exel question
Replies: 10
Views: 2466

It does compile, but after reading the manual i am still unable to output it. Since wxTextCtrl expects a wxString i thought i would have to convert it to a string so i used this command: this->edit1->SetValue(*result->GetString()); but it still shows blank. I think you should be using result[0].Get...
by timg
Tue Nov 28, 2006 3:54 pm
Forum: C++ Development
Topic: wxAutomationObject and exel question
Replies: 10
Views: 2466

Change this line:

var=excelObject.GetProperty("Value", 1, result);

to:

var=excelObject.GetProperty("Value", 1, &result);

That should at least compile.

To use the returned data, please look at the documentation for wxVariant.
by timg
Mon Nov 27, 2006 5:50 pm
Forum: C++ Development
Topic: wxAutomationObject and exel question
Replies: 10
Views: 2466

You could try this. I haven't tried it, but it should work. wxAutomationObject cell; wxVariant rng[2], result[1]; int row, col; rng[0] = wxVariant(row); rng[1] = wxVariant(col); objExcel->GetObject(cell, "Cells", 2,rng); appo=objExcel->GetProperty("Value",1,result );
by timg
Tue Nov 14, 2006 9:13 pm
Forum: Compiler / Linking / IDE Related
Topic: I know I'm missing something easy - can't compile w/VC7.1
Replies: 3
Views: 1097

I have not used wxPack or the Visual integration, but it seems that your compiler is missing an include directory.

Make sure you have your project properties set correctly and your wxwidgets include directory is included in the Additional Include Directories.
by timg
Fri Nov 10, 2006 8:41 pm
Forum: Compiler / Linking / IDE Related
Topic: Compile wxMac with Xcode?
Replies: 1
Views: 650

Compile wxMac with Xcode?

I've been using wxMac for a little while and compiling by Makefile. I noticed that the more recent downloads include an xcodeproj file. I tried to open that with Xcode and build it, but it hangs up almost immediately looking for a pbsetup-sh file. Obviously, I must have missed a step somewhere. What...
by timg
Fri Nov 10, 2006 12:28 am
Forum: Compiler / Linking / IDE Related
Topic: Break out MyModalDialog in dialogs example
Replies: 3
Views: 1011

What exactly are you trying to do? Do you want to just have the code in separate .cpp files? or do you want to compile your dialogs into a shared DLL?
by timg
Mon Nov 06, 2006 8:38 pm
Forum: Platform Related Issues
Topic: Can you call an Applescript with parameters from wxMac?
Replies: 0
Views: 359

Can you call an Applescript with parameters from wxMac?

Can you execute an Applescript from a wxMac application and pass parameters to it?

If so, how?

Thanks.
by timg
Thu Oct 19, 2006 5:07 pm
Forum: C++ Development
Topic: Outputing contents of wxArrayStrings
Replies: 2
Views: 1070

fn is an array, not a wxString. You could a simple for loop.

for(i=0;i<fn.GetCount();i++)
cout <<fn << endl;
by timg
Tue Sep 19, 2006 5:35 pm
Forum: C++ Development
Topic: Plot control with log scale axis?
Replies: 4
Views: 1847

Do you have any examples of deriving these axes? I downloaded the code, but there is little to no documentation.

Thanks.
by timg
Mon Sep 18, 2006 8:18 pm
Forum: C++ Development
Topic: Plot control with log scale axis?
Replies: 4
Views: 1847

Plot control with log scale axis?

I looked at a few controls and didn't see any that have built in log scales for axis. Are there any?

Thanks.
by timg
Wed Aug 30, 2006 1:34 am
Forum: Component Writing
Topic: Animation preview
Replies: 2
Views: 1741

Look at wxTimer class. It may be enough for what you want to do.
by timg
Tue Jul 25, 2006 5:22 pm
Forum: C++ Development
Topic: WxAutomationObject and Excel
Replies: 2
Views: 1449

Re: WxAutomationObject and Excel

Try this:

Code: Select all

wxAutomationObject range;
wxVariant rng[1];

rng[0] = wxVariant("C3");

objExcel->GetObject(range, "Range", 1,rng);

range.CallMethod("Activate");

appo=objExcel->PutProperty("ActiveCell.Value", "Test");