Search found 38 matches

by Pierre Bellisle
Sep 27, 2019 14:56
Forum: Windows
Topic: windows api splitbutton example?
Replies: 5
Views: 865

Re: windows api splitbutton example?

Hi,

Depending on your IDE, be sure to have resource file
with a xml manifest file that ask for Microsoft.Windows.Common-Controls 6.0.
This is necessary for a split button.

Note that I updated the code to add ImageList_Destroy() in WM_DESTROY.

.rc resource and .xml manifest example
by Pierre Bellisle
Sep 27, 2019 3:33
Forum: Windows
Topic: windows api splitbutton example?
Replies: 5
Views: 865

Re: windows api splitbutton example?

Here is one Nastasa... 'Be sure to have resource with a xml manifest 'that ask for Microsoft.Windows.Common-Controls 6.0. #Define JumpCompiler "<D:\Free\64\fbc.exe>" #Define JumpCompilerCmd "<-s gui -w pedantic "D:\Free\bas\~~Default.rc">" #Print Control resize #Print C...
by Pierre Bellisle
Nov 11, 2018 16:56
Forum: Windows
Topic: how to add system icon into resouce file?
Replies: 2
Views: 510

Re: how to add system icon into resouce file?

To elaborate a little... You don't need anything in the resource file. You can load the questionmark icon dynamically by using hIco = LoadImage(NULL, MAKEINTRESOURCE(OIC_QUES), IMAGE_ICON, 0, 0, LR_SHARED) or the older hIco = LoadIcon(NULL, IDI_QUESTION) A MsgBox with the questionmark can be called ...
by Pierre Bellisle
Oct 22, 2018 14:57
Forum: Windows
Topic: How to get notified when mouse enter controls
Replies: 3
Views: 524

Re: How to get notified when mouse enter controls

Great!
I'm glad to help a little. :-)
by Pierre Bellisle
Oct 21, 2018 21:11
Forum: Windows
Topic: How to get notified when mouse enter controls
Replies: 3
Views: 524

Re: How to get notified when mouse enter controls

Hey, This could be one way, using WM_SETCURSOR... #Define JumpCompiler "<D:\Free\64\fbc.exe>" #Define JumpCompilerCmd "<-s gui -w pedantic "D:\Free\bas\~~Default.rc">" #define unicode #Include Once "windows.bi" #Include Once "win\shellapi.bi" #Define...
by Pierre Bellisle
Oct 20, 2018 15:55
Forum: Windows
Topic: please test my crappy owner-draw menu
Replies: 36
Views: 6641

Re: please test my crappy owner-draw menu

José, I did a quick test in PowerBASIC, So to be clear, in fb, rgb() is bgr() and bgr() is rgb(). Yep, having those letters reverse is really a counter intuitive surprise! The kind of thing you cannot forget once you know it... Colour = rgb(&h11,&h22,&h33) ColourRed = GetRValue(Colour) '...
by Pierre Bellisle
Oct 20, 2018 15:30
Forum: Windows
Topic: please test my crappy owner-draw menu
Replies: 36
Views: 6641

Re: please test my crappy owner-draw menu

Hola José, Despite the note about the macro, I based my conclusion on the result of the following code where rgb() and bgr() do not give the same colour order. MessageBox(HWND_DESKTOP, "rgb(&hAA, &hBB, &hCC) = 0x" & HEX(rgb(&hAA, &hBB, &hCC), 8) ...
by Pierre Bellisle
Oct 20, 2018 15:09
Forum: Windows
Topic: please test my crappy owner-draw menu
Replies: 36
Views: 6641

Re: please test my crappy owner-draw menu

Hi David,

Still off topic: Agreed, it might be my imagination
but I feel there is a lot of new peoples now posting
who probably didn't wanted to get involved with him.
Life is good! :-)
by Pierre Bellisle
Oct 19, 2018 20:09
Forum: Windows
Topic: please test my crappy owner-draw menu
Replies: 36
Views: 6641

Re: please test my crappy owner-draw menu

I see, The colors where fine on my side, this is a good thing that yours where not. I was literraly doing a GetSysColor(GetSysColor(Colour)), plus I had many more issues. I did updated the code. Finally, except for the rgba() vs rgb() correction and the "if wParam = NULL" in WM_MEASUREITEM...
by Pierre Bellisle
Oct 19, 2018 17:04
Forum: Windows
Topic: please test my crappy owner-draw menu
Replies: 36
Views: 6641

Re: please test my crappy owner-draw menu

Some quick observation... CreateSolidBrush() ask for RGB, so BGR is to be avoided or the colours won't match. FB's rgb() automatically set the alpha channel to &hFF for opaque. bgr() does not, leaving it to &H00. This is the reason why it worked. With CreateSolidBrush() the high-order byte m...
by Pierre Bellisle
Oct 19, 2018 16:23
Forum: Windows
Topic: please test my crappy owner-draw menu
Replies: 36
Views: 6641

Re: please test my crappy owner-draw menu

kcvinu & jj2007,

"Everything is in black backcolor"
Did you have black menus with the updated code I posted?
by Pierre Bellisle
Oct 19, 2018 2:34
Forum: Windows
Topic: please test my crappy owner-draw menu
Replies: 36
Views: 6641

Re: please test my crappy owner-draw menu

And almost height years later... I had a little something to check with ownerdrawn menu apis, so, while at it, here is a quick code update. #define JumpCompiler "<D:\Free\32\fbc.exe>" #define JumpCompilerCmd "<-s gui -w pedantic>" #Lang "fb" #define WIN_INCLUDEALL #incl...
by Pierre Bellisle
Aug 23, 2018 17:12
Forum: Windows
Topic: After Ctl+Alt+Delete is pressed, continous Alt key is sent
Replies: 25
Views: 2310

Re: After Ctl+Alt+Delete is pressed, continous Alt key is sent

Also, there is GetNativeSystemInfo() available since Windows XP. #include "Windows.bi" Dim SysInfo AS SYSTEM_INFO GetNativeSystemInfo(@SysInfo) 'Available since Windows XP. MessageBox(HWND_DESKTOP, "Windows is " & _ IIf(SysInfo.wProcessorArchitecture = PROCESSOR_ARCHITECTURE_...
by Pierre Bellisle
Aug 17, 2018 5:46
Forum: Windows
Topic: After Ctl+Alt+Delete is pressed, continous Alt key is sent
Replies: 25
Views: 2310

Re: After Ctl+Alt+Delete is pressed, continous Alt key is sent

On my Seven machine, if the MultiKey console window have focus, the LeftMenu(Alt) pushed key down is detected, the going up key release is not always detected, probably because it occur while the ctrl-alt-del screen is active and it's a barrier to MultiKey. If the focus is on another window, the Lef...
by Pierre Bellisle
Jul 21, 2018 18:22
Forum: Windows
Topic: How to determine is string is UTF-8 encoded
Replies: 19
Views: 2147

Re: How to determine is string is UTF-8 encoded

jj2007 >> Good idea but Paul had it a bit earlier Yep, I missed it, maybe my subconscious did not? Useless redundancy. No copyright for me. marcov>> it is only certain if there is a BOM Even there I woudn't say "certain". I'd say mostly certain. It's easy to imagine a text search engine th...

Go to advanced search