Search found 2946 matches

by PB
Fri Apr 16, 2021 5:39 pm
Forum: Platform Related Issues
Topic: Getting windows mousepointer icon = black square
Replies: 22
Views: 292

Re: Getting windows mousepointer icon = black square

Attempting to fix wxWidgets code, I have realized that perhaps monochrome icons cannot be properly stored in a wxBitmap/wxImage. wxBitmap stores pixels to be drawn and optionally a transparent mask to indicate which pixels to not draw. Similarly with alpha for wxBitmap/wxImage. However, a monochrome...
by PB
Fri Apr 16, 2021 3:49 pm
Forum: Platform Related Issues
Topic: Getting windows mousepointer icon = black square
Replies: 22
Views: 292

Re: Getting windows mousepointer icon = black square

I check his return value against sizeof(BITMAP): whatever result (0 or not) not equal to the size of that BITMAP means a failure. Seems to me more strict than just checking for 0. Sorry for having missing that check, I did not look past the end of the function closing parentheses. Anyway, the docs ...
by PB
Fri Apr 16, 2021 3:35 pm
Forum: Platform Related Issues
Topic: Getting windows mousepointer icon = black square
Replies: 22
Views: 292

Re: Getting windows mousepointer icon = black square

Parduz wrote:
Fri Apr 16, 2021 3:27 pm
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.
by PB
Fri Apr 16, 2021 3:22 pm
Forum: Platform Related Issues
Topic: Getting windows mousepointer icon = black square
Replies: 22
Views: 292

Re: Getting windows mousepointer icon = black square

Parduz wrote:
Fri Apr 16, 2021 3:20 pm
I'd like to do it so much, but until i can't get anything even from the "normal" hbmColor i'm stuck.
As shown in my code from my previous post, hbmColor is not used for monochrome cursors, so...
by PB
Fri Apr 16, 2021 3:18 pm
Forum: Platform Related Issues
Topic: Getting windows mousepointer icon = black square
Replies: 22
Views: 292

Re: Getting windows mousepointer icon = black square

Parduz wrote:
Fri Apr 16, 2021 3:16 pm
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...
by PB
Fri Apr 16, 2021 3:13 pm
Forum: Platform Related Issues
Topic: Getting windows mousepointer icon = black square
Replies: 22
Views: 292

Re: Getting windows mousepointer icon = black square

In the end, I decided to file a ticket, considering this a bug: https://trac.wxwidgets.org/ticket/19146
by PB
Thu Apr 15, 2021 3:58 pm
Forum: Platform Related Issues
Topic: Getting windows mousepointer icon = black square
Replies: 22
Views: 292

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 i'll try to sort out the monochrome icons on my own. I am going to ask there, wxWidgets has code to convert monochrome icons to a wxBitmap: https://github.com/wxWidgets/wxWidgets/blob/master/src/ms...
by PB
Wed Apr 14, 2021 4:01 pm
Forum: Platform Related Issues
Topic: Getting windows mousepointer icon = black square
Replies: 22
Views: 292

Re: Getting windows mousepointer icon = black square

I have updated the code to include some more information #include <wx/wx.h> #include <wx/msw/wrapwin.h> bool CreatewxBitmapFromCurrentCursor(wxBitmap& bitmap) { CURSORINFO ci{0}; ICONINFO ii{0}; ci.cbSize = sizeof(ci); if ( !::GetCursorInfo(&ci) || (ci.flags & CURSOR_SHOWING) == 0 ) { wxLogError("Co...
by PB
Wed Apr 14, 2021 9:55 am
Forum: Compiler / Linking / IDE Related
Topic: Debug wxWidgets classes
Replies: 3
Views: 88

Re: Debug wxWidgets classes

This may not be really related, but FWIW, wxWidgets ships with GDB pretty printer for some of its classes, including wxArrayString (I have never used it):
https://github.com/wxWidgets/wxWidgets/ ... b/print.py

The CodeLite question would probably be better asked on their forum.
by PB
Tue Apr 13, 2021 6:00 pm
Forum: Compiler / Linking / IDE Related
Topic: The easy and rapid method to start wxWidgets project in visual studio 2019
Replies: 10
Views: 175

Re: The easy and rapid method to start wxWidgets project in visual studio 2019

The only thing missing in the project I create from the temple is the "Configuration prporties>Environment". In the new project created using the template, I have to add it manually, I don't know why? I know nothing about MSVS templates. However, the reason why this cannot be done with a .props fil...
by PB
Tue Apr 13, 2021 2:45 pm
Forum: Platform Related Issues
Topic: Getting windows mousepointer icon = black square
Replies: 22
Views: 292

Re: Getting windows mousepointer icon = black square

Sorry, I do not have time to address your comments ATM. But, FWIW, I tried to write simple code to get the system cursor. It seems to work mostly fine, except when the cursor is the text cursor over an edit control. In this case, the cursor has black instead of transparent background and it itself i...
by PB
Tue Apr 13, 2021 1:11 pm
Forum: Compiler / Linking / IDE Related
Topic: swap exisintg project config
Replies: 4
Views: 66

Re: swap exisintg project config

ONEEYEMAN wrote:
Tue Apr 13, 2021 12:32 pm
Unless you want to modify the CodeBlock sources, please drop monolithic build option.
I don't see how the two are connected?
by PB
Tue Apr 13, 2021 11:16 am
Forum: Compiler / Linking / IDE Related
Topic: The easy and rapid method to start wxWidgets project in visual studio 2019
Replies: 10
Views: 175

Re: The easy and rapid method to start wxWidgets project in visual studio 2019

I do not understand French. But it seems that it is just Windows telling you that it cannot find wxWidgets DLLs. This cannot be done by a .props file. You need to place them where the executable can find them, just as with any other DLL. But for just running the executable from MSVS, you could just ...
by PB
Tue Apr 13, 2021 11:11 am
Forum: Platform Related Issues
Topic: Getting windows mousepointer icon = black square
Replies: 22
Views: 292

Re: Getting windows mousepointer icon = black square

I would unselect hbmCanvas from the DC before accessing it. I would also check if DrawIconEx() returns TRUE and dib.IsOk() (no idea about CompatibleBitmap type, nor I am sure if one can even create wxDIB from a DDB) returns true. But firstly, I would check if wxWidgets does not offer a better way to...
by PB
Tue Apr 13, 2021 10:36 am
Forum: Compiler / Linking / IDE Related
Topic: MSW: 3.1.2 + CMake3.19 install link errors (VS2015) (Edited: actually FindwxWidgets.cmake mostly)
Replies: 14
Views: 224

Re: MSW: 3.1.2 + CMake3.19 install link errors (VS2015)

Mick P. wrote:
Tue Apr 13, 2021 9:27 am
I don't know if I've ever heard of WXWIN before (as environment variable).
WXWIN is mentioned all over in the wxWidgets install docs:
https://docs.wxwidgets.org/trunk/plat_msw_install.html