ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

DonationCoder.com Software > T-Clock

T-Clock 2010 (download)

<< < (3/169) > >>

f0dder:
As I'm sure you know, it's quite common in C to store pointers in int variables.  While this might not be a good practice in general there are times when it makes sense, such as for SetWindowLongPtr() where all the API is interested in is storing a small blob of data - it doesn't care what that data is (the user of the API gets to decide what the data means).-mwb1100 (March 03, 2010, 08:05 PM)
--- End quote ---
A void* is a better choice - it's opaque ("don't go around manipulating this like you woudl an int"), you don't run into trouble on platforms where sizeof(int) != sizeof(T*) (16- and 64-bit x86 platforms), et cetera. 8 of the 10 documented indices for Get/SetWindowLongPtr are pointer types.

On the other hand, Microsoft should have made it so that passing a LONG_PTR type (whether by casting or not) to SetWindowLongPtr() should not have caused a warning whether the build was for 32 or 64 bit. That's really where something fell down here.  The whole point of a type like LONG_PTR is so that the conditional code that Stoic Joker ended up using wouldn't be necessary.-mwb1100 (March 03, 2010, 08:05 PM)
--- End quote ---
And, at least on VC2008, there is no warning when doing the single cast. Can't see why there would be with other versions of the compiler, either, really - but mistakingly using SetWindowLong (instead of SetWindowLongPtr) at 4am because you haven't had enough coffee... then yeah :) (or perhaps some flaky old PlatformSDK version - but I kinda doubt that as well).

The PSDK is a big effing mess with some of the worst C coding styles, it's a shame MS has never cleaned it up. Stuff like using enums instead of #defines, inline functions for the ApiNameA/W distinguishing, etc.

AbteriX:
@Stoic Joker
Thanks for your work :Thmbsup:
i second Daleus post in all it aspects   :P
Stoic,

Sorry I can't offer any programming tips, but I did want to chime in and say that TClock has been one of my must have programs for a couple of years now.

Take this as encouragement that I'd love to see your latest version when it becomes available!

-Daleus (March 03, 2010, 11:13 AM)
--- End quote ---

Stoic Joker:
Okay, Just to show that I haven't dropped-the-ball...again... ;) (Here's an update)

Before:


After:


Mouse Tab has been reorganized and I added a ListView of all currently configured mouse click options for clarity. Screen Shots were taken on my 64-bit Server 2003 Domain Controller - No crashes were experienced during testing... :)

Stoic Joker:
T-Clock 2010 alpha download link is (and will be) at the bottom of the first post of this thread.

Go ahead be brutal honest... ;)

ewemoa:
So far it's working fine here in Windows XP SP3 :)

(Ah, what do you know -- looking at T-Clock 2010 reminded me it's Pi day.)

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version