Search found 118 matches

by Parduz
Mon Apr 19, 2021 12:28 pm
Forum: Platform Related Issues
Topic: Getting windows mousepointer icon = black square
Replies: 25
Views: 9364

Re: Getting windows mousepointer icon = black square

The issue just has been fixed in wxWidgets master: https://github.com/wxWidgets/wxWidgets/commit/b889f6897ba8429c02e598ee9d5a366347fef477 Great!. But.... should'nt the new code be inside the "if ( hbmp )" branch, instead of outside of it? (just 'cause i'm gonna recompile my widgets so i w...
by Parduz
Fri Apr 16, 2021 3:45 pm
Forum: Platform Related Issues
Topic: Getting windows mousepointer icon = black square
Replies: 25
Views: 9364

Re: Getting windows mousepointer icon = black square

This is a try to get the color one (i modified your sample): WHY it does'nt work? I think there is a bug, you are always missing "!" when checking the result of ::GetObject(), this function returns zero on failure, non-zero otherwise. I did not read the rest of the code. I check his retur...
by Parduz
Fri Apr 16, 2021 3:27 pm
Forum: Platform Related Issues
Topic: Getting windows mousepointer icon = black square
Replies: 25
Views: 9364

Re: Getting windows mousepointer icon = black square

Ok, but: BITMAP bmMask,bmCurs; if ( !ii.hbmMask ) { wxLogMessage("NO Cursor Mask???"); return false; }else{ if( GetObject(ii.hbmMask, sizeof(bmMask), &bmMask) != sizeof(bmMask) ) { wxLogError("Could not get BITMAP from the mask."); return false; } wxLogMessage("Cursor Ma...
by Parduz
Fri Apr 16, 2021 3:20 pm
Forum: Platform Related Issues
Topic: Getting windows mousepointer icon = black square
Replies: 25
Views: 9364

Re: Getting windows mousepointer icon = black square

Anyway, i still wonder WHY we should use the wxIcon, and then the wxBitmap, while the IconInfo.hbmColor and hbmMask already are the HBITMAP we need. You cans use them but for monochrome cursors, you need to do what wxWidgets attempts to do, i.e., properly blend the two parts of the mask... I'd like...
by Parduz
Fri Apr 16, 2021 3:16 pm
Forum: Platform Related Issues
Topic: Getting windows mousepointer icon = black square
Replies: 25
Views: 9364

Re: Getting windows mousepointer icon = black square

I am going to ask there, wxWidgets has code to convert monochrome icons to a wxBitmap: https://github.com/wxWidgets/wxWidgets/blob/master/src/msw/bitmap.cpp#L486 Problem is that there's the right comments, but the code does nothing to handle the double-height. Seems something like "i forgot to...
by Parduz
Fri Apr 16, 2021 8:06 am
Forum: Platform Related Issues
Topic: Getting windows mousepointer icon = black square
Replies: 25
Views: 9364

Re: Getting windows mousepointer icon = black square

Off-topic: i'm still waiting for a reply about the questions i wrote here about the wxStopWatch class members. I think Vadim gave you a pretty clear answer. And in case you don't know him, he's the main wxWidgets maintainer. His word has weight. Yes and i'm totally dumb and missed his answer, waiti...
by Parduz
Thu Apr 15, 2021 1:53 pm
Forum: Platform Related Issues
Topic: Getting windows mousepointer icon = black square
Replies: 25
Views: 9364

Re: Getting windows mousepointer icon = black square

I would ask in the wx-users mailing first, to see what can be done and if it is indeed a bug. I think it could be worked around in the user code, but I did not have time to try yet. I'm not sure about the mailing list, i'm still waiting for a reply about the questions i wrote here about the wxStopW...
by Parduz
Wed Apr 14, 2021 2:13 pm
Forum: Platform Related Issues
Topic: Getting windows mousepointer icon = black square
Replies: 25
Views: 9364

Re: Getting windows mousepointer icon = black square

Your code works flawlessy.... and i spent so many hours trying to get this result! :roll: Regarding the issue with the text cursor... When I look at the saved PNG, the text cursor looks like this textCursor.png while other cursors like this arrowCursor.png I think that this should be considered a bu...
by Parduz
Wed Apr 14, 2021 12:51 pm
Forum: Platform Related Issues
Topic: Getting windows mousepointer icon = black square
Replies: 25
Views: 9364

Re: Getting windows mousepointer icon = black square

Thanks a lot! Not sure where the issue is, I did not have time to investigate further. Not an issue at all: Monochrome icons are managed in this way The icon bitmask bitmap. If this structure defines a black and white icon, this bitmask is formatted so that the upper half is the icon AND bitmask and...
by Parduz
Tue Apr 13, 2021 12:17 pm
Forum: Platform Related Issues
Topic: Getting windows mousepointer icon = black square
Replies: 25
Views: 9364

Re: Getting windows mousepointer icon = black square

I would unselect hbmCanvas from the DC before accessing it. Nothing changed, anyway. I would also check if DrawIconEx() returns TRUE and dib.IsOk() Both alredy there: DrawIconEx "If the function succeeds, the return value is nonzero" and the wxDIB constructor throws an error if it fails. ...
by Parduz
Tue Apr 13, 2021 10:55 am
Forum: Platform Related Issues
Topic: Getting windows mousepointer icon = black square
Replies: 25
Views: 9364

Getting windows mousepointer icon = black square

This is the function that should capture the system mouse pointer icon and store it in the given wxImage: void CopyMousePointerImage(wxImage &im) { // Get information about the global cursor. ICONINFO ii = {0}; CURSORINFO ci = {0}; ci.cbSize = sizeof(ci); if (!GetCursorInfo(&ci)) { // error ...
by Parduz
Fri Apr 09, 2021 4:01 pm
Forum: C++ Development
Topic: Some questions about wxStopWatch
Replies: 4
Views: 752

Re: Some questions about wxStopWatch

How can i know if a wxStopWatch is paused or running? Why m_elapsedBeforePause and m_pauseCount are all private (or there's no methods to access them)? Same question about GetClockFreq and GetCurrentClockValue? Just out of curiousity: Why would you need this information? It seems you're trying to u...
by Parduz
Wed Mar 31, 2021 1:38 pm
Forum: C++ Development
Topic: Some questions about wxStopWatch
Replies: 4
Views: 752

Some questions about wxStopWatch

How can i know if a wxStopWatch is paused or running? Why m_elapsedBeforePause and m_pauseCount are all private (or there's no methods to access them)? Same question about GetClockFreq and GetCurrentClockValue? If they were at least protected i could use them in a derived class, but as they are i c...
by Parduz
Mon Mar 29, 2021 3:34 pm
Forum: C++ Development
Topic: There's a wxPowerEvent example?
Replies: 1
Views: 522

There's a wxPowerEvent example?

I'd like to see how to bind the "power events" and handle them.

I need to close/reopen virtual serial ports and restablish communication with USB devices, but i don't get if i should manage the events in the frame or in the app.
by Parduz
Thu Feb 11, 2021 5:32 pm
Forum: C++ Development
Topic: Help with wxTaskBarIcon, please?
Replies: 15
Views: 778

Re: Help with wxTaskBarIcon, please?

You can't. the taskbaricon is a separate object, it has no logical connection to the main frame (you could have an app with just a taskbaricon, but no windows at all). So the events from the taskbaricon can never travel to the frame on their own. This is what i have'nt understood 'til now. Thanks a...