Search found 16352 matches

by doublemax
Sat Sep 18, 2021 4:38 pm
Forum: C++ Development
Topic: paste date to wxDatePickerCtrl from clipboard
Replies: 4
Views: 118

Re: paste date to wxDatePickerCtrl from clipboard

Thanks it worked. I used IsMouseInWindow() to check if mouse is on the DatePicker. Is there a better way? For instance - the date is 05/06/2021. I click on "05"(it's highlighted) and move the mouse the other way. Is there a way to detect if "05" is highlighted? No. But why do you need that? If the ...
by doublemax
Sat Sep 18, 2021 11:12 am
Forum: C++ Development
Topic: paste date to wxDatePickerCtrl from clipboard
Replies: 4
Views: 118

Re: paste date to wxDatePickerCtrl from clipboard

It should be possible. Unfortunately wxDatePickerCtrl doesn't support wxClipboardTextEvent, so you'd have to handle that yourself: - catch wxEVT_CHAR key event on the wxDatePickerCtrl - in the event handler, check if CTRL-V was pressed - if yes, check if the clipboard contains any text https://docs....
by doublemax
Fri Sep 17, 2021 7:39 am
Forum: C++ Development
Topic: Calling Non-Wx Object
Replies: 1
Views: 86

Re: Calling Non-Wx Object

In general the way you did it is just fine. The only issue could arise if the method you call takes a long time to execute, because that would block the GUI. In that case you should move the processing to a different thread. By the way, I've searched for info on scope in WxWidgets and haven't found ...
by doublemax
Thu Sep 16, 2021 11:34 pm
Forum: Compiler / Linking / IDE Related
Topic: Setting up wxWidgets with wxChartDir for Visual Studio 2019.
Replies: 12
Views: 288

Re: Setting up wxWidgets with wxChartDir for Visual Studio 2019.

Riser wrote:
Thu Sep 16, 2021 11:00 pm
Nope, it's there.
With adding i didn't mean copying the file into the folder, i meant adding the source file to the project so that it gets compiled and linked. If the wxChartViewer constructor is not found, that's the only explanation i can think of.
by doublemax
Thu Sep 16, 2021 10:27 pm
Forum: Compiler / Linking / IDE Related
Topic: Setting up wxWidgets with wxChartDir for Visual Studio 2019.
Replies: 12
Views: 288

Re: Setting up wxWidgets with wxChartDir for Visual Studio 2019.

It looks like you only forgot to add wxchartviewer.cpp to the project.
by doublemax
Thu Sep 16, 2021 7:23 am
Forum: C++ Development
Topic: Clipboard<->UI best practices
Replies: 1
Views: 100

Re: Clipboard<->UI best practices

https://docs.wxwidgets.org/trunk/classw ... event.html

I'm usually not a big friend of wxUpdateUIEvent , because it can slow down an application significantly if you have many GUI elements. But your case seems perfect for it.
by doublemax
Wed Sep 15, 2021 9:25 pm
Forum: C++ Development
Topic: wxNotebook tab doesn't adjust properly when application is in High DPI aware mode
Replies: 1
Views: 130

Re: wxNotebook tab doesn't adjust properly when application is in High DPI aware mode

If you can see the same problem in the "notebook" sample that comes with wxWidgets, please open a ticket at http://trac.wxwidgets.org/
by doublemax
Wed Sep 15, 2021 5:06 am
Forum: C++ Development
Topic: wxAuiManager pane customization
Replies: 2
Views: 162

Re: wxAuiManager pane customization

I've never done that, but based on the API, i'd try a custom wxAuiDockArt and implementing wxAuiDockArt::DrawSash().
https://docs.wxwidgets.org/trunk/classw ... 083cd7d238
by doublemax
Tue Sep 14, 2021 7:27 pm
Forum: C++ Development
Topic: [SOLVED] Window not displaying.
Replies: 6
Views: 251

Re: Window not displaying.

The wxApp method you need to override is OnInit(), not onInit() (note the capital "O")
by doublemax
Tue Sep 14, 2021 7:17 pm
Forum: C++ Development
Topic: wxDataViewListCtrl::AppendItem: Freeing the data
Replies: 18
Views: 499

Re: wxDataViewListCtrl::AppendItem: Freeing the data

If you keep track of all user data in ItemAdded(), you can still free them all.
by doublemax
Tue Sep 14, 2021 4:45 pm
Forum: C++ Development
Topic: wxDataViewListCtrl::AppendItem: Freeing the data
Replies: 18
Views: 499

Re: wxDataViewListCtrl::AppendItem: Freeing the data

jpo234 wrote:
Tue Sep 14, 2021 4:04 pm
I knew about this, but I thought it won't work, because the callback happens after the item has been deleted from the wxDataViewListCtrl...

I'll give it a try and report back.
If the item was already invalid, it wouldn't make any sense to pass it to the callback.
by doublemax
Mon Sep 13, 2021 6:04 am
Forum: Platform Related Issues
Topic: Keyboard related question on MSW
Replies: 4
Views: 346

Re: Keyboard related question on MSW

But the bit 24 for detecting left and right Ctrl works?

As for the AltGr, i can't think of any way to distinguish that from pressing the individual keys.
by doublemax
Mon Sep 13, 2021 5:17 am
Forum: Platform Related Issues
Topic: Keyboard related question on MSW
Replies: 4
Views: 346

Re: Keyboard related question on MSW

Under Windows, bit 24 of the GetRawKeyFlags() should be 1 for the right-hand keys (= extended key in Windows terminology). https://docs.microsoft.com/en-us/windows/win32/inputdev/wm-keydown (I can see that in the keyboard sample) Be aware that the right Alt key is actually AltGr, which is not the sa...
by doublemax
Sun Sep 12, 2021 7:53 am
Forum: C++ Development
Topic: How to draw a transparent rectangle over an existing drawing?
Replies: 92
Views: 7554

Re: How to draw a transparent rectangle over an existing drawing?

If so I guess I need to check if selection is being drawn, and call Refresh() perhaps. Maybe check if CTRL is down keep refreshing?
Yes, you need to call Refresh() in the mouse event handler if you change anything that affects the visuals (like the selection rectangle).
by doublemax
Sat Sep 11, 2021 9:48 pm
Forum: C++ Development
Topic: How to draw a transparent rectangle over an existing drawing?
Replies: 92
Views: 7554

Re: How to draw a transparent rectangle over an existing drawing?

The activity of the timer is directly connected to playing of a file. So the timer should be started where you start playing a file. And even if there are several actions that could lead to playing a file, like pressing "play", double-clicking a file in the list, or when a file from a playlist is au...