[TC9.0b7] WM_USER+50 with wparam 1011/1012 and no files

The behaviour described in the bug report is either by design, or would be far too complex/time-consuming to be changed

Moderators: white, Hacker, petermad, Stefan2

Post Reply
User avatar
LonerD
Senior Member
Senior Member
Posts: 381
Joined: 2010-06-19, 20:18 UTC
Location: Makeyevka, Russia
Contact:

[TC9.0b7] WM_USER+50 with wparam 1011/1012 and no files

Post by *LonerD »

08.06.16 Added: Send WM_USER+50 with wparam set to 1011/1012 to get index of first file in list (-1 if there are no files) (32/64)

I get 4294967275 if there are no files in panel.
Windows 10 Home Edition SL
TC 9.0 beta 7 both 32 and 64 bits.
Last edited by LonerD on 2016-07-28, 17:38 UTC, edited 1 time in total.
"I used to feel guilty in Cambridge that I spent all day playing games, while I was supposed to be doing mathematics. Then, when I discovered surreal numbers, I realized that playing games IS math." John Horton Conway
User avatar
LonerD
Senior Member
Senior Member
Posts: 381
Joined: 2010-06-19, 20:18 UTC
Location: Makeyevka, Russia
Contact:

Post by *LonerD »

Now I get 4294967275.

I use simple AHK script.
AutoHotKey v1.1.24.00 x32 + Total Commander 9.0 beta 7 both x32 and x64.

Code: Select all

#NoEnv
#NoTrayIcon
  SendMessage, 1074, 1011, 0, , ahk_class TTOTAL_CMD
  MsgBox, % ErrorLevel
ExitApp
All another new WM_USER+50 messages work good except 1011/1012.
"I used to feel guilty in Cambridge that I spent all day playing games, while I was supposed to be doing mathematics. Then, when I discovered surreal numbers, I realized that playing games IS math." John Horton Conway
User avatar
chandragor
Member
Member
Posts: 121
Joined: 2005-06-01, 10:10 UTC
Location: Italy

Post by *chandragor »

Now I get 4294967275.
Maybe because 4294967275 == 0xFFFFFFFF == -1 in 32 bit sized integer math.
Or, put in another way:

0xFFFFFFFF == 4294967275 if considered as an unsigned 32 bits integer

0xFFFFFFFF == -1 if considered as a signed 32 bits integer
Happy owner of license #12422 since 1997
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Yes, the value is DWORD(-1) because 0 can be a valid index in the root of a drive.
Author of Total Commander
https://www.ghisler.com
User avatar
Lefteous
Power Member
Power Member
Posts: 9535
Joined: 2003-02-09, 01:18 UTC
Location: Germany
Contact:

Post by *Lefteous »

Wouldn't that be 4294967295 instead of 4294967275?
User avatar
chandragor
Member
Member
Posts: 121
Joined: 2005-06-01, 10:10 UTC
Location: Italy

Post by *chandragor »

@Lefteous
Yep, you're right, it should be 4294967295. I just cut-and-pasted the number from LonerD message and I didn't notice it was different from what was written on Calculator display.

Now I wonder if LonerD made the same mistake or if he really gets 4294967275, i.e 0xFFFFFFEB == -21 as a signed integer...
Happy owner of license #12422 since 1997
Post Reply