Search found 1547 matches

by PB
Wed Jun 20, 2018 12:33 pm
Forum: C++ Development
Topic: How to implement custom painted scrollbar of wxHtmlWindow
Replies: 1
Views: 31

Re: How to implement custom painted scrollbar of wxHtmlWindow

A believe nothing has changed since the question was asked last time , i.e., you are on your own and need to use platform-specific code. However, you may consider using wxWebView (embedded web browser) instead of somewhat limited (HTML-wise) wxHtmlWindow. Still, it seems that scrollbar customization...
by PB
Wed Jun 20, 2018 9:20 am
Forum: General Development
Topic: Many beginner questions, trying to learn wxWidgets
Replies: 6
Views: 176

Re: Many beginner questions, trying to learn wxWidgets

Finally, question 10 is still of importance to me, and I'll reword it here: how come, despite of using validators to associate text fields with the frame's member data, I still had to override the wxFrame::TransferDataFromWindow() function to "manually" update the object data? Do the vali...
by PB
Tue Jun 19, 2018 6:22 pm
Forum: C++ Development
Topic: Hover effect on a panel with children
Replies: 6
Views: 111

Re: Hover effect on a panel with children

Out of curiousity, I have tried the naive implementation from above #include <wx/wx.h> class HighlightPanel : public wxPanel { public: HighlightPanel(wxWindow* parent, size_t num) : wxPanel(parent), m_mouseInside(false) { SetName(wxString::Format("Panel%zu", num)); wxBoxSizer* sizer = new ...
by PB
Tue Jun 19, 2018 4:11 pm
Forum: C++ Development
Topic: Hover effect on a panel with children
Replies: 6
Views: 111

Re: Hover effect on a panel with children

I would, perhaps naively, try
1. binding the mouse event (enter/leave) for the panel and all its children (to avoid missing a potential mouse leave event for the panel).
2. checking the (properly translated) mouse coordinates against the panel rect to see whether the mouse is inside it or not.
by PB
Mon Jun 18, 2018 4:42 pm
Forum: Compiler / Linking / IDE Related
Topic: Trying to use wxWidgets in a VS2017 Community project
Replies: 1
Views: 35

Re: Trying to use wxWidgets in a VS2017 Community project

It looks as if you you did not build/install wxWidgets properly (at least for the static debug build) and the file is not there. Do you have file setup.h in $(WXWIN)/vc_lib/mswud ? Have you tried to build and run (at least) the bundled minimal sample? Or perhaps you did not set the path in the compi...
by PB
Fri Jun 15, 2018 2:14 pm
Forum: Compiler / Linking / IDE Related
Topic: Certain Path Not Available
Replies: 9
Views: 154

Re: Certain Path Not Available

Chikwado wrote:Thanks For Reply, But What Is The Meaning Of "Error: wx/setup.h File Or Directory Not Found" I Has Been Going Around These For A Long Time. Do I Have To Copy The File To Any Foler? I Need Help.

The solution is described in the third paragraph of my previous post in this thread.
by PB
Fri Jun 15, 2018 10:54 am
Forum: Compiler / Linking / IDE Related
Topic: Certain Path Not Available
Replies: 9
Views: 154

Re: Certain Path Not Available

If you are using GCC do not include MSVC-specific header. Regardless of the compiler, do not #include "wx\msw\setup.h" in your files. If you are getting "setup.h not found" error, see e.g. here: http://wxwidgets.org/docs/faq/windows/#setuph . Obviously, if you are using GCC your ...
by PB
Wed Jun 13, 2018 5:52 am
Forum: C++ Development
Topic: Assert Error: wxClassInfo:Register()
Replies: 9
Views: 262

Re: Assert Error: wxClassInfo:Register()

As I suggested before: Try doing the same with wxWidgets official build or the build of your own.

If this would work it is obvious that the issue is with the library provided by the client and you need to handle it with them.
by PB
Mon Jun 11, 2018 3:29 pm
Forum: C++ Development
Topic: Having two screens how i get in what display are my mouse?
Replies: 1
Views: 54

Re: Having two screens how i get in what display are my mouse?

It should be easy, see the display sample: all you need is to obtain the display index from the mouse position. For example, in your mouse event handler you do something like this void SomeWindow::MouseEventHandler(wxMouseEvent& event) { const wxPoint ptScreen = ClientToScreen(event.GetPosition(...
by PB
Fri Jun 08, 2018 5:28 am
Forum: Compiler / Linking / IDE Related
Topic: Changing from 32-bit to 64-bit MinGW
Replies: 1
Views: 48

Re: Changing from 32-bit to 64-bit MinGW

Yes. One cannot mix 32- and 64-bit code for obvious reasons.
by PB
Wed Jun 06, 2018 5:48 am
Forum: C++ Development
Topic: wxListCtrl GetTopItem() returns negative number [SOLVED]
Replies: 14
Views: 234

Re: wxListCtrl GetTopItem() returns negative number [SOLVED]

PB: You are not replicating my behaviour as you are not deleting any entries. The way I understand it, when using virtual mode you are not deleting any entries as far as wxListCtrl is concerned. You just tell wxListCtrl to change the item count and redraw - wxListCtrl in virtual mode does not own/m...
by PB
Tue Jun 05, 2018 12:15 pm
Forum: C++ Development
Topic: wxListCtrl GetTopItem() returns negative number [SOLVED]
Replies: 14
Views: 234

Re: wxListCtrl GetTopItem() returns negative number [SOLVED]

I believe the problem occurs when the list is scrolled down and after deleting items above the visible area, the scroll position becomes invalid. But i can't test this right now. I could not reproduce this with code from above: Step 1: Change the item count to 1000 Step 2: Scroll towards the bottom...
by PB
Tue Jun 05, 2018 11:01 am
Forum: C++ Development
Topic: wxListCtrl GetTopItem() returns negative number [SOLVED]
Replies: 14
Views: 234

Re: wxListCtrl GetTopItem() returns negative number [SOLVED]

Using the example code below, all seems to work as expected. However, I am using wxWidgets 3.1. The one suspect thing in your code is using an arbitrary number (is it smaller than the actual number of items?) in RefreshItems(). #include <wx/wx.h> #include <wx/listctrl.h> #include <wx/numdlg.h> class...
by PB
Tue Jun 05, 2018 9:24 am
Forum: C++ Development
Topic: Manually calling an Event Handler Function? [SOLVED]
Replies: 7
Views: 150

Re: Manually calling an Event Handler Function? [SOLVED]

The purpose of an event handler is to handle a specific event. You generally do not call such a function to do other things, it would imply bad code design. In contrast, you use event handlers to call a function that performs a task and which can be called from multiple places.
by PB
Tue Jun 05, 2018 6:29 am
Forum: C++ Development
Topic: Max no of Files that can be stored and displayed in wxFileHistory
Replies: 3
Views: 89

Re: Max no of Files that can be stored and displayed in wxFileHistory

The documentation states you can provide your own idBase in the wxFileHistory ctor. It doesn't work? Edit It seems to work as advertised filehistory.png #include <memory> #include <wx/wx.h> #include <wx/filehistory.h> class MyFrame : public wxFrame { public: MyFrame() : wxFrame(NULL, wxID_ANY, _(&qu...

Go to advanced search