Search found 481 matches

by breeze4me
Thu Jun 05, 2025 12:11 pm
Forum: Coding Questions
Topic: Can I delete an image after adding it to the ImageGadget?
Replies: 5
Views: 509

Re: Can I delete an image after adding it to the ImageGadget?

It seems that an image should not be removed on Windows.
Instead of using RedrawWindow, you can move the window to an offscreen area and then move it back and see that both images have been erased.
If OpenWindow(0, 0, 0, 245, 105, "ImageGadget", #PB_Window_SystemMenu | #PB_Window_ScreenCentered ...
by breeze4me
Tue May 13, 2025 1:49 pm
Forum: Coding Questions
Topic: [Solved] How to catch language change in EditorGadget
Replies: 10
Views: 1097

Re: How to catch language change in EditorGadget


P.S. There is probably a system event for changing the language that I just don't know about. This is what I need to catch, not set the hook. It should be simpler and more versatile.

There seem to be two ways to do it. A very complicated way, and a simple way.
https://stackoverflow.com/questions ...
by breeze4me
Sat May 10, 2025 12:12 pm
Forum: Announcement
Topic: PureBasic 6.21 is out !
Replies: 169
Views: 31857

Re: PureBasic 6.21 beta 9 is out !


It works now, but I still cannot ALT-F4 my game. My events are the same, and it works in 6.20.

I use BindEvent(#PB_Event_CloseWindow, @CloseTerminal(), #WINDOW_MAIN) , but it never goes in CloseTerminal().

In PB 6.21, Alt+F4 does not work properly when a canvas gadget is focused. You need to ...
by breeze4me
Wed May 07, 2025 11:27 am
Forum: Coding Questions
Topic: Error Building a PureLibrary on x86 system
Replies: 1
Views: 927

Re: Error Building a PureLibrary on x86 system

In 6.20 x86 I get an error like you said, but in 6.21 b8 x86 it runs fine. The bug seems to have been fixed.
by breeze4me
Mon May 05, 2025 2:51 pm
Forum: Coding Questions
Topic: Enumerate the addresses of all labels in the DataSection
Replies: 10
Views: 861

Re: Enumerate the addresses of all labels in the DataSection




DataSection
IncludePath "images" + #PS$
IncludeBinary "1.png","2.png","3.png","4.png","5.png","6.png","7.png","8.png","9.png","10.png","11.png","12.png","13.png","14.png","15.png","16.png"
EndDataSection

Global A to Z

ForEach IncludeBinary
CatchImage(img, IncludeBinary)
Next




Or even ...
by breeze4me
Mon May 05, 2025 2:41 pm
Forum: Coding Questions
Topic: EditorGadget() clears the clipboard when the program ends
Replies: 23
Views: 1257

Re: EditorGadget() clears the clipboard when the program ends

Windows 10 Korean 22h2 has this issue, too.
After analyzing it, it seems that the format copied from the RichEdit is "DataObject", which Notepad doesn't seem to recognize.
On my PC, I can paste it into PB IDE or other editor programs. But I just can't paste it into Notepad.
I'm not sure about ...
by breeze4me
Sun May 04, 2025 1:12 pm
Forum: Coding Questions
Topic: Enumerate the addresses of all labels in the DataSection
Replies: 10
Views: 861

Re: Enumerate the addresses of all labels in the DataSection

In the asm backend (fasm x86, x64), similar to enumerating all of the labels, you could do something like this.
Taking AZJIO's code as an example, it could be modified to look like this.
Just make sure that the filename part is a consecutive number starting with 1. In the example below, 1 through 41 ...
by breeze4me
Sun May 04, 2025 12:50 pm
Forum: Coding Questions
Topic: Counting Items in the DataSection?
Replies: 30
Views: 2688

Re: Counting Items in the DataSection?

I don't actually like this, but you can do it like this. It's just an example to show that it can be done this way too.

Requirement:
1. The DataSection must be before the part where you want to get the number of item strings.
2. Have a fixed number of strings per line. In the example below, 2.
3 ...
by breeze4me
Tue Apr 22, 2025 6:12 pm
Forum: Bugs - Windows
Topic: 5.46 LTS B1 ImageGadget transparency issues
Replies: 8
Views: 4389

Re: [5.46 LTS B1] ImageGadget transparency issues

It doesn't seem to be fixed properly. (PB 6.21 b6 x64, x86)
The ImageGadget is bordered to distinguish it.
......
logo.i = DialogGadget(d.i, "logo")
SetWindowLong_(GadgetID(logo), #GWL_STYLE, GetWindowLong_(GadgetID(logo), #GWL_STYLE) | #WS_BORDER)
......

The animated GIF image below shows the ...
by breeze4me
Wed Apr 16, 2025 3:11 pm
Forum: Feature Requests and Wishlists
Topic: InterfaceCpp to support thiscall win x86
Replies: 3
Views: 2228

Re: InterfaceCpp to support thiscall win x86

+1

https://www.purebasic.fr/english/viewtopic.php?t=86741
As I showed in the example in the post above, it seems to be natively supported in GCC as well. Maybe Clang has something similar.
! int __attribute__ ((thiscall)) (*func)(int, int, int) = v_func;
! v_result = func(v_txtsrv, 2048, 0);
Or ...
by breeze4me
Wed Apr 16, 2025 3:00 pm
Forum: Windows
Topic: #PB_ListView_MultiSelect causes screen readers to repeat list items when at the beginning/end
Replies: 6
Views: 2105

Re: #PB_ListView_MultiSelect causes screen readers to repeat list items when at the beginning/end

https://learn.microsoft.com/en-us/windows/win32/controls/lbn-selchange
For a multiple-selection list box, the LBN_SELCHANGE notification code is sent whenever the user presses an arrow key, even if the selection does not change.
In a multi-select listview gadget, holding down the arrow keys on the ...
by breeze4me
Tue Apr 15, 2025 10:05 am
Forum: Windows
Topic: IMA error when dynamically loading a DLL
Replies: 6
Views: 1662

Re: [6.21 b4] IMA error when dynamically loading a DLL


I fixed the crash when the DLL is dynamically loaded and auto-freed at end in 6.21 beta 5 (ie: CloseLibrary() not called). But if you close the DLL before exiting, there is still some callbacks registered from the DLL in the main process and it will crash because the window will try to call the ...
by breeze4me
Tue Apr 15, 2025 9:04 am
Forum: Coding Questions
Topic: Disabling message beeps in EditorGadget() on Windows?
Replies: 9
Views: 438

Re: Disabling message beeps in EditorGadget() on Windows?

After analyzing it, it seems that the interface uses the "thiscall" calling convention, which causes an error when compiling in PB x86.
Therefore, to make it work properly, the method must be called with a series of assembly instructions, as shown in the code below.
I don't know how to call it in ...
by breeze4me
Mon Apr 14, 2025 5:59 pm
Forum: Coding Questions
Topic: Disabling message beeps in EditorGadget() on Windows?
Replies: 9
Views: 438

Re: Disabling message beeps in EditorGadget() on Windows?

The converted code.
Interface ITextServices Extends IUnknown
; //@cmember Generic Send Message interface
TxSendMessage.l(msg.l, wparam, lparam, *plresult)
;
; //@cmember Rendering
TxDraw.l(dwDrawAspect.l, lindex.l, *pvAspect, *ptd, hdcDraw, hicTargetDev, *lprcBounds, *lprcWBounds, *lprcUpdate ...
by breeze4me
Mon Apr 14, 2025 4:22 pm
Forum: Coding Questions
Topic: emojis in webgadget showing without colors
Replies: 8
Views: 1619

Re: emojis in webgadget showing without colors

@Little John

The common controls in Windows don't support emoji colors, regardless of font, because the GDI string output functions don't support them. As far as I know, to output the colors of emoji characters, you have to draw a string using DirectWrite.

For example:
https://gist.github.com ...