Search found 4204 matches

by PB
Mon Sep 17, 2018 9:42 am
Forum: Compiler / Linking / IDE Related
Topic: Issue with Visual Studio 2017 15.8.4?
Replies: 10
Views: 3708

Re: Issue with Visual Studio 2017 15.8.4?

Can you reproduce the issue using the bundled minimal sample?

I could not with MSVC 15.8.4 (Express) with Debug configuration and Platform Toolset v141.
by PB
Mon Sep 17, 2018 5:39 am
Forum: C++ Development
Topic: Delete an item from wxListCtrl.
Replies: 10
Views: 2696

Re: Delete an item from wxListCtrl.

While it does not seem very likely, perhaps deleting the item in the OnSelect event handler may be an issue. Try doing it with CallAfter instead, e.g. like this #include <wx/wx.h> #include <wx/listctrl.h> class MyFrame : public wxFrame { public: MyFrame() : wxFrame(NULL, wxID_ANY, "Test", ...
by PB
Sun Sep 16, 2018 1:24 pm
Forum: C++ Development
Topic: Delete an item from wxListCtrl.
Replies: 10
Views: 2696

Re: Delete an item from wxListCtrl.

For PB code i take error when pick an item... Is library's bug? /usr/include/wx-3.0/wx/strvararg.h(456): assert "(argtype & (wxFormatStringSpecifier<T>::value)) == argtype" failed in wxArgNormalizer(): format specifier doesn't match argument type But when disable code // wxLogMessage(...
by PB
Sun Sep 16, 2018 10:47 am
Forum: C++ Development
Topic: How to "capture" a wxTextCtrl changed by the user?
Replies: 2
Views: 1956

Re: How to "capture" a wxTextCtrl changed by the user?

You should be always able to obtain the content of wxTextCtrl using its GetValue() method. In your event handler, you should be able to obtain the wxTextCtrl from which the event came from like this #include <wx/wx.h> #include <wx/textctrl.h> class MyDialog : public wxDialog { public: MyDialog() : w...
by PB
Sun Sep 16, 2018 10:34 am
Forum: C++ Development
Topic: Delete an item from wxListCtrl.
Replies: 10
Views: 2696

Re: Delete an item from wxListCtrl.

Using the simple code below it basically (did not test how multiple selection works) seems to work as expected( git master, MSW) #include <wx/wx.h> #include <wx/listctrl.h> class MyFrame : public wxFrame { public: MyFrame() : wxFrame(NULL, wxID_ANY, "Test", wxDefaultPosition, wxSize(600, 4...
by PB
Wed Sep 12, 2018 9:59 am
Forum: C++ Development
Topic: Combined date and time picker
Replies: 17
Views: 5543

Re: Combined date and time picker

I do not think that the native version supports custom highlight colors. Is the repaint slow all the time or only during/after the pop-up? If the latter you could try creating the panel hidden and Show() it only after all the controls are created. Not sure if this helps in this case though. Anyway, ...
by PB
Wed Sep 12, 2018 7:21 am
Forum: Compiler / Linking / IDE Related
Topic: System Error Visual Studio 2017
Replies: 4
Views: 1380

Re: System Error Visual Studio 2017

That is because you compiled wxWidgets as DLL but your application cannot find them, as they are probably (assuming your built them successfully) only in your <WXWIN>/lib/vc_x64_dll (or something like that) folder. You need to either: * copy the required DLLs to the folder where the executable is. *...
by PB
Tue Sep 11, 2018 6:48 pm
Forum: C++ Development
Topic: Combined date and time picker
Replies: 17
Views: 5543

Re: Combined date and time picker

The focus issue seems to be fixed by calling UseAltPopupWindow() before calling SetPopupControl(m_popup) ; Edit FWIW, I tried to implement very simple combined date and time picker, similar to that in the original post. Seems to work as expected on Windows 10 (except when I use <Alt+PrtScr> to scree...
by PB
Tue Sep 11, 2018 4:19 pm
Forum: Compiler / Linking / IDE Related
Topic: Resource File Error During Windows App Execution
Replies: 1
Views: 706

Re: Resource File Error During Windows App Execution

The assert is about a windows resource format (.rc) which is not in XML format, you probably confused it with the XRC file. The file needs to be compiled with windows resource compiler (into .res file) and embedded into an executable by linker. Therefore it needs to be set in your project somehow, d...
by PB
Tue Sep 11, 2018 3:48 pm
Forum: C++ Development
Topic: Combined date and time picker
Replies: 17
Views: 5543

Re: Combined date and time picker

I think it seems obvious that the calendar cannof fit the current popup and you need to do it the other way around, i.e., fit the popup around the controls. Have you tried something like wxSize wxCustomDateTimePickerPopup::GetAdjustedSize(int minWidth, int prefHeight, int maxHeight) { return GetSize...
by PB
Tue Sep 11, 2018 12:48 pm
Forum: C++ Development
Topic: Combined date and time picker
Replies: 17
Views: 5543

Re: Combined date and time picker

Do you mean this sample ? If it so, then I need to inherit my class from wxPopupTransientWindow and place all the control on wxScrolledWindow, don't I? Yes, that's the sample. I meant to run it to see how it behaves and whether this fits your requirements. Perhaps wxComboBox-like control using cust...
by PB
Tue Sep 11, 2018 12:14 pm
Forum: C++ Development
Topic: Combined date and time picker
Replies: 17
Views: 5543

Re: Combined date and time picker

Currently I've got only pane with needed controls and for some reason background is transparent: That's because you have a bug in your code. You call SetBackgroundStyle(wxBG_STYLE_PAINT); but you do not draw the panel background by yourself. Unless you for some odd reason need custom-drawn panel ba...
by PB
Tue Sep 11, 2018 8:25 am
Forum: C++ Development
Topic: Combined date and time picker
Replies: 17
Views: 5543

Re: Combined date and time picker

1. I would suggest wxPanel. 2. What drawing? You will use standard controls which draw themselves. 3. I guess you need to switch between the control sets and hide/display the appropriate controls as needed while taking care of changing the best size for the panel. I assume that you are aware that th...
by PB
Tue Sep 11, 2018 8:18 am
Forum: C++ Development
Topic: How can I load PNG files from Resource?
Replies: 10
Views: 5043

Re: How can I load PNG files from Resource?

Are you sure it is interesting and not by design, i.e., the difference between ordinal and string resource identifiers?
by PB
Sun Sep 09, 2018 7:16 pm
Forum: Compiler / Linking / IDE Related
Topic: Compiling statically linked app with wxwidgets
Replies: 5
Views: 3967

Re: Compiling statically linked app with wxwidgets

As you can see in your list, the main wxWidgets library (as well as the Open GL one) is not there. For the static monolithic release build, the files in the lib folder should be libwxexpat.a libwxjpeg.a libwxmsw30u.a libwxmsw30u_gl.a libwxpng.a libwxregexu.a libwxscintilla.a libwxtiff.a libwxzlib.a ...