Windows API is stupid!

For everything that's not in any way related to PureBasic. General chat etc...
User avatar
netmaestro
PureBasic Bullfrog
PureBasic Bullfrog
Posts: 8451
Joined: Wed Jul 06, 2005 5:42 am
Location: Fort Nelson, BC, Canada

Windows API is stupid!

Post by netmaestro »

OK, I'm getting frustrated. I've written what I feel is a vast improvement on the PB ResizeWindow command, mostly based on WinAPI and the friggin' thing is slower than it should be, doesn't work properly and actually ends up damaging the window. I just don't get it. I've made a quick exe for you to test as I can't share the source just yet, so if anyone could a) see if it is working on your system and b) possibly suggest improvements, I'd really appreciate it. When it's finished and working properly I want to submit it to Fred for consideration as a replacement of the current ResizeWindow command.

https://lloydsplace.com/resize.exe

It's not obvious but you can press ESC to quit.

Source code and all program resources can be downloaded at: https://lloydsplace.com/winapistupid.zip
Last edited by netmaestro on Mon Nov 14, 2022 5:02 am, edited 4 times in total.
BERESHEIT
Inf0Byt3
PureBasic Fanatic
PureBasic Fanatic
Posts: 2236
Joined: Fri Dec 09, 2005 12:15 pm
Location: Elbonia

Post by Inf0Byt3 »

:lol:

Brilliant! I want this in PB's command set :).
None are more hopelessly enslaved than those who falsely believe they are free. (Goethe)
AND51
Addict
Addict
Posts: 1040
Joined: Sun Oct 15, 2006 8:56 pm
Location: Germany
Contact:

Post by AND51 »

:lol:

There's 1 mistaken issue: if you click the Bauarbeiter, the Bauarbeiter gets into the foreground; If you click the window, the window get's into the foreground (and overlaps the Bauarbeiter, if the Bauarbeiter walks from the right to the left).

Ansonsten: Well done! :D
PB 4.30

Code: Select all

onErrorGoto(?Fred)
rsts
Addict
Addict
Posts: 2736
Joined: Wed Aug 24, 2005 8:39 am
Location: Southwest OH - USA

Post by rsts »

:D

I'd like to see Fred add it, but it appears you're correct, it does seem to damage the window. Perhaps Sparkie can help?


cheers
Last edited by rsts on Sat Jun 21, 2008 5:28 pm, edited 2 times in total.
User avatar
netmaestro
PureBasic Bullfrog
PureBasic Bullfrog
Posts: 8451
Joined: Wed Jul 06, 2005 5:42 am
Location: Fort Nelson, BC, Canada

Post by netmaestro »

If you click the window, the window get's into the foreground (and overlaps the Bauarbeiter
Fixed, thanks!
BERESHEIT
thefool
Always Here
Always Here
Posts: 5875
Joined: Sat Aug 30, 2003 5:58 pm
Location: Denmark

Post by thefool »

Window resizes like a charm here.
Windows XP pro
AND51
Addict
Addict
Posts: 1040
Joined: Sun Oct 15, 2006 8:56 pm
Location: Germany
Contact:

Post by AND51 »

Not really.
I see, what you've corrected. But when clicking the window now, sometimes, the bauarbeiter flickers. In rare cases, it is still so, that the window overlaps him:
PB 4.30

Code: Select all

onErrorGoto(?Fred)
milan1612
Addict
Addict
Posts: 894
Joined: Thu Apr 05, 2007 12:15 am
Location: Nuremberg, Germany
Contact:

Post by milan1612 »

:lol:
Windows 7 & PureBasic 4.4
User avatar
netmaestro
PureBasic Bullfrog
PureBasic Bullfrog
Posts: 8451
Joined: Wed Jul 06, 2005 5:42 am
Location: Fort Nelson, BC, Canada

Post by netmaestro »

But when clicking the window now, sometimes, the bauarbeiter flickers. In rare cases, it is still so, that the window overlaps him
Fixed. Forgot to include doubleclicks.
Last edited by netmaestro on Sat Jun 21, 2008 5:55 pm, edited 1 time in total.
BERESHEIT
srod
PureBasic Expert
PureBasic Expert
Posts: 10589
Joined: Wed Oct 29, 2003 4:35 pm
Location: Beyond the pale...

Post by srod »

:lol:
I may look like a mule, but I'm not a complete ass.
Fred
Administrator
Administrator
Posts: 18162
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Post by Fred »

Indeed, would be nice to have it fixed, so we can include it ;)
ricardo
Addict
Addict
Posts: 2438
Joined: Fri Apr 25, 2003 7:06 pm
Location: Argentina

Post by ricardo »

Veeeery nice!
Berikco
Administrator
Administrator
Posts: 1326
Joined: Wed Apr 23, 2003 7:57 pm
Location: Belgium
Contact:

Post by Berikco »

Hehe, very cool ResizeWindow replacement 8)
Derek
Addict
Addict
Posts: 2354
Joined: Wed Apr 07, 2004 12:51 am
Location: England

Post by Derek »

Neat, works fine on Vista. :wink:
Sparkie
PureBatMan Forever
PureBatMan Forever
Posts: 2307
Joined: Tue Feb 10, 2004 3:07 am
Location: Ohio, USA

Post by Sparkie »

Works just fine here. Nice work netmaestro 8)
What goes around comes around.

PB 5.21 LTS (x86) - Windows 8.1
Post Reply