Search found 822 matches

by chi
Wed Sep 22, 2021 5:50 pm
Forum: Coding Questions
Topic: [Solved] How to trick the compiler?
Replies: 27
Views: 978

Re: [Solved] How to trick the compiler?

Just one slight inconvenience. The previously opened library will not close automatically? In the code, I have several places with hard End. Writing the same thing every time is bad style. Can a macro be used to close the library? In theory, the OS is freeing the dll when the process terminates ......
by chi
Mon Sep 20, 2021 6:15 pm
Forum: Coding Questions
Topic: [Solved] How to trick the compiler?
Replies: 27
Views: 978

Re: How to trick the compiler?

Following code works on all my VM's (x86/x64, with/without admin privileges) and doesn't crash on XP Procedure _ChangeWindowMessageFilter(msg, flag) : EndProcedure Prototype _ChangeWindowMessageFilter(msg, flag) user32 = OpenLibrary(#PB_Any, "user32") ChangeWindowMessageFilter__._ChangeWin...
by chi
Sun Sep 19, 2021 2:41 pm
Forum: Coding Questions
Topic: [Solved] How to trick the compiler?
Replies: 27
Views: 978

Re: How to trick the compiler?

I have no problems running your XP code (EventDropFiles()) on Win8.1 x64 (VM). Are you sure the crash is related to PB's DragAndDrop functions?
by chi
Sat Sep 18, 2021 11:50 pm
Forum: Coding Questions
Topic: [Solved] How to trick the compiler?
Replies: 27
Views: 978

Re: How to trick the compiler?

Procedure _DwmIsCompositionEnabled(*pfEnabled) : EndProcedure Prototype _DwmIsCompositionEnabled(*pfEnabled) dwmapi = OpenLibrary(#PB_Any, "dwmapi") DwmIsCompositionEnabled__._DwmIsCompositionEnabled = GetFunction(dwmapi, "DwmIsCompositionEnabled") If DwmIsCompositionEnabled__ =...
by chi
Mon Sep 13, 2021 11:21 pm
Forum: Bugs - C backend
Topic: End ExitCode hardcoded to 0
Replies: 1
Views: 663

End ExitCode hardcoded to 0

Code: Select all

exitcode = 1
End exitcode

;;; ASM
; ; exitcode = 1
;   MOV    qword [v_exitcode],1
; ; End exitcode
;   MOV    rax,qword [v_exitcode]
;   MOV    [PB_ExitCode],rax

;;; GCC
; // exitcode = 1
; v_exitcode=1;
; // End exitcode
; PB_ExitCode=0;
by chi
Wed Sep 08, 2021 1:52 pm
Forum: Announcement
Topic: PureBasic 6.00 Alpha 4 released !
Replies: 196
Views: 41676

Re: PureBasic 6.00 Alpha 4 released !

Thanks for Alpha 4. I really like the speed improvement when loading a lot of tabs in the IDE :D
by chi
Tue Sep 07, 2021 4:36 pm
Forum: General Discussion
Topic: Windows 10 defaults to 125% scale? Seriously?
Replies: 13
Views: 908

Re: Windows 10 defaults to 125% scale? Seriously?

Add following line to your manifest (before </assembly>) with e.g. ResourceHacker or write a tool to edit all your applications at once <asmv3:application xmlns:asmv3="urn:schemas-microsoft-com:asm.v3"> <asmv3:windowsSettings xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSetting...
by chi
Tue Sep 07, 2021 3:27 pm
Forum: General Discussion
Topic: Windows 10 defaults to 125% scale? Seriously?
Replies: 13
Views: 908

Re: Windows 10 defaults to 125% scale? Seriously?

Did you check "Enable DPI aware executable (Windows)" under Compiler Options?
by chi
Fri Sep 03, 2021 2:54 pm
Forum: Coding Questions
Topic: [Solved] Get info from a third party window.
Replies: 8
Views: 583

Re: Get info from a third party window.

How about statusbar with multiple fields? 8) Global hWndPB Procedure WinEnum(hWnd, lParam) If hWnd tmp${10} GetWindowText_(hWnd, @tmp$, 10) If tmp$ = "PureBasic" hWndPB = hWnd ProcedureReturn 0 EndIf EndIf ProcedureReturn 1 EndProcedure If EnumWindows_(@WinEnum(), 0)=0 And hWndPB hWnd = F...
by chi
Fri Sep 03, 2021 2:18 am
Forum: Coding Questions
Topic: [Solved] Get info from a third party window.
Replies: 8
Views: 583

Re: Get info from a third party window.

BarryG wrote: Fri Sep 03, 2021 1:58 am What about for non-English PCs? Is there a way to get the hWnd by class or something?
You could try...

Code: Select all

hWnd = FindWindow_("RegEdit_RegEdit", 0)
Only tested on Win7 (english)
by chi
Thu Sep 02, 2021 8:06 pm
Forum: Coding Questions
Topic: [Solved] Get info from a third party window.
Replies: 8
Views: 583

Re: Get info from a third party window.

Hi, do you mean like this?

Code: Select all

hWnd = FindWindow_(0, "Registry Editor")
hWnd = FindWindowEx_(hWnd, 0, "msctls_statusbar32", 0)

txtlen = SendMessage_(hWnd, #WM_GETTEXTLENGTH, 0, 0) + 1
txt$ = Space(txtlen)

SendMessage_(hWnd, #WM_GETTEXT, txtlen, @txt$)
Debug txt$
by chi
Thu Aug 26, 2021 5:44 pm
Forum: Coding Questions
Topic: How do I get the SCALE directly from Windows?
Replies: 17
Views: 1215

Re: How do I get the SCALE directly from Windows?

Code: Select all

hdc = GetDC_(0)
Debug GetDeviceCaps_(hdc, #LOGPIXELSY) / 96.0
ReleaseDC_(0, hdc)
by chi
Mon Aug 23, 2021 5:22 pm
Forum: Announcement
Topic: [GAME] Monster Maze - Updated
Replies: 8
Views: 3899

Re: [GAME] Monster Maze - Updated

Great game... Well done!

Can't help with the problems though (16:9, DPI 100%, HD)
by chi
Mon Aug 23, 2021 4:59 pm
Forum: Applications - Feedback and Discussion
Topic: [IDE Tool] LazyCoder
Replies: 20
Views: 6445

Re: [IDE Tool] LazyCoder

Got it, thanks! 1st post updated...