Search found 36 matches

by Pierre Bellisle
Nov 11, 2018 16:56
Forum: Windows
Topic: how to add system icon into resouce file?
Replies: 2
Views: 375

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: 382

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: 382

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: 5897

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: 5897

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: 5897

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: 5897

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: 5897

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: 5897

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: 5897

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: 1869

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: 1869

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: 1716

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...
by Pierre Bellisle
Jul 21, 2018 2:54
Forum: Windows
Topic: How to determine is string is UTF-8 encoded
Replies: 19
Views: 1716

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

Just for the fun of it... What if we use MultiByteToWideChar in a way that it will return an error when thanslating an invalid UTF-8 string to unicode. The unicode result is not of importance but if the function fail then the UTF-8 string was invalid. #define JumpCompiler "<D:\Free\64\fbc.exe>&...
by Pierre Bellisle
Jul 20, 2018 20:52
Forum: Windows
Topic: How to determine is string is UTF-8 encoded
Replies: 19
Views: 1716

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

>> " that function only indicates that a string is unicode " Hey Paul, Yep, in fact, "try to indicates" would be even more appropriate. I posted it because several ideas may be extracted from it to help testing a string for the unicode side. And sometime doing some eliminations a...

Go to advanced search