Search found 2473 matches

by PB
Fri Mar 14, 2014 6:39 am
Forum: C++ Development
Topic: wxTreeCtrl selection error
Replies: 8
Views: 1528

Re: wxTreeCtrl selection error

[quote="raananb"]BTW, the last wxCHECK_RET statement does not accept GetId(). Sorry, that was the most important check, it didn't work due to mistyped "Id", which should be "ID". so wxCHECK_RET( treeCategories->GetSelection().GetID() == evt.GetItem().GetID(), "Selected items mismatch in handler"); a...
by PB
Thu Mar 13, 2014 2:02 pm
Forum: C++ Development
Topic: wxTreeCtrl selection error
Replies: 8
Views: 1528

Re: wxTreeCtrl selection error

Just to be sure we are on the same page, you mean that the selection you retrieve in wxEVT_TREE_SEL_CHANGED is not what you expect it to be? Does wxTreeItemId::IsOk() return true for both root Ids? Are the events properly connected, you didn't post that code, but I assume it's automatically generate...
by PB
Thu Mar 13, 2014 1:03 pm
Forum: C++ Development
Topic: wxTreeCtrl selection error
Replies: 8
Views: 1528

Re: wxTreeCtrl selection error

Difficult to say without seeing code on how you create the controls and retrieve the selected item. By the way, have you created those two wxTreeCtrls with unique window IDs?
by PB
Wed Mar 12, 2014 7:12 am
Forum: C++ Development
Topic: How do you get 12 hour clock format with wxDataTime?
Replies: 4
Views: 1051

Re: How do you get 12 hour clock format with wxDataTime?

I don't know, from what I see it behaves according to the specs of wxDateTime::Format(): "This function does the same as the standard ANSI C strftime".

If you believe the current behaviour to be a bug, file a ticket and see what the developers have to say.
by PB
Wed Mar 12, 2014 6:39 am
Forum: C++ Development
Topic: How do you get 12 hour clock format with wxDataTime?
Replies: 4
Views: 1051

Re: How do you get 12 hour clock format with wxDataTime?

According to the specs you linked, the %r parameter is:
1. Locale dependent
2. Implementation dependent - required only for C++ 11 compilers. E.g. MSVC 2008 asserts when using it for strftime().
by PB
Sun Mar 09, 2014 5:03 pm
Forum: C++ Development
Topic: wxAutomationobject with powerpoint, vba code conversion
Replies: 7
Views: 2023

Re: wxAutomationobject with powerpoint, vba code conversion

I do not think looking into wxAutoExcel is going to help you any.

What I do think is that if you are serious about creating MS Office automation wrapper, you may be better off creating also your own automation wrapper instead of using wxOleAutomationObject.
by PB
Sun Mar 09, 2014 10:08 am
Forum: C++ Development
Topic: wxAutomationobject with powerpoint, vba code conversion
Replies: 7
Views: 2023

Re: wxAutomationobject with powerpoint, vba code conversion

Sorry, I know virtually nothing about automating PowerPoint or any other MS Office application besides Excel. The solution was analogical to getting a single Worksheet from Worksheets collection of ActiveWorkbook in MS Excel. I guess some objects/APIs are shared across Office, like Shape and related...
by PB
Sat Mar 08, 2014 9:05 pm
Forum: C++ Development
Topic: wxAutomationobject with powerpoint, vba code conversion
Replies: 7
Views: 2023

Re: wxAutomationobject with powerpoint, vba code conversion

The code I posted was the C++/wxOleAutomation equivalent of your VBA code. You have to get individual items from the collection and work with them one at a time. Unless you want to create a wrapper class overloading operator(), like I did in wxAutoExcel for Workbooks, Worksheets and many other Excel...
by PB
Sat Mar 08, 2014 2:06 pm
Forum: C++ Development
Topic: wxAutomationobject with powerpoint, vba code conversion
Replies: 7
Views: 2023

Re: wxAutomationobject with powerpoint, vba code conversion

I haven't tried it, but I think something like this may work:

Code: Select all

// assuming slides contains a valid Slides object
wxAutomationObject slide;
wxVariant params[2];

params[0] = 1L; // slide number 1
slides.GetObject(slide, "Item", 1, &params);

if ( slide.IsOk() )
{
  slide.CallMethod("Select");
}

by PB
Wed Mar 05, 2014 8:27 pm
Forum: C++ Development
Topic: I want an auto-fill text input component
Replies: 12
Views: 2011

Re: I want an auto-fill text input component

Thanks doublemax, I will look into this. I'm afraid it's too advanced for me (wxWidgets edit related code must be pretty complicated). If nothing else, I will link the thread from the ticket.

EditI see you already linked the thread in the ticket, thanks again.
by PB
Tue Mar 04, 2014 1:43 pm
Forum: C++ Development
Topic: only one instance of a frame
Replies: 2
Views: 828

Re: only one instance of a frame

What I used in such situations was to not close the frame but simply hide it. This is not always possible but often it is and it is probably the simplest solution.
by PB
Mon Mar 03, 2014 8:21 pm
Forum: C++ Development
Topic: I want an auto-fill text input component
Replies: 12
Views: 2011

Re: I want an auto-fill text input component

doublemax wrote:If you're under Windows, this seems to be a known bug:
http://trac.wxwidgets.org/ticket/12613
I, for one, find thiswx Autocomplete bug rather annoying too: http://trac.wxwidgets.org/ticket/13945. :(
by PB
Fri Feb 28, 2014 8:00 pm
Forum: C++ Development
Topic: problems with thread for playing an animation
Replies: 6
Views: 1663

Re: problems with thread for playing an animation

I am not sure if I understand you. With your current approach, the user has to wait till the thread is finished and the file fully loaded before the he can work with it. On the other hand, the GUI is not blocked (unless you show "progress" indicator in a modal dialog or something like that] and he c...
by PB
Fri Feb 28, 2014 10:57 am
Forum: C++ Development
Topic: problems with thread for playing an animation
Replies: 6
Views: 1663

Re: problems with thread for playing an animation

Yes, the worker threads are called that for a reason. ;)
by PB
Fri Feb 28, 2014 10:42 am
Forum: C++ Development
Topic: problems with thread for playing an animation
Replies: 6
Views: 1663

Re: problems with thread for playing an animation

From http://docs.wxwidgets.org/trunk/classwx_thread.html#thread_secondary All threads other than the "main application thread" (the one running wxApp::OnInit() or the one your main function runs in, for example) are considered "secondary threads". GUI calls, such as those to a wxWindow or wxBitmap a...