The MASM Forum

General => The Workshop => Topic started by: felipe on August 23, 2018, 02:14:08 AM

Title: Simple abandonware
Post by: felipe on August 23, 2018, 02:14:08 AM
This is a simple abandonware made by me  :idea:. It's abandonware because is pretty useless i think. It was started of course, just as an exercise (not producing comercial software here...). So the program is so simple, it actually tells you just 2 system informations...(was abandoned in the early development... :redface:)
I think it will be better to do something usefull with the information of the user's system than just show it to the user what he already knows... :P

Anyway, source and .exe attached (is a 32 bit program)  ::).
Title: Re: Simple abandonware
Post by: daydreamer on August 23, 2018, 10:12:47 PM
nice codestyle as always Felipe :t
Title: Re: Simple abandonware
Post by: felipe on August 24, 2018, 12:51:53 AM
Well thank you, but i was thinking that maybe it will be a good idea to a similar program create a procedure that's called inbetween the BeginPaint and EndPaint, just to give order to the code a little bit. About that is it a good idea to or is a correct approach or allowable by Microsoft Windows to have a big procedure inbetween this 2 (BeginPaint and EndPaint) or in somehow is not because of performance reasons or similar?????  :idea:

I will be pleased to have some answers to this question, thanks... :icon14:  :idea:
Title: Re: Simple abandonware
Post by: aw27 on August 24, 2018, 07:32:31 PM
Your so-called abandonware gives me 4 mouse buttons. This left me a bit confused, so I checked myself how many buttons were returned by GetSystemMetrics(SM_CMOUSEBUTTONS). It returns 5, but your software limits to 4.

Actually, my mouse has only 3 physical buttons, but  1 of them serves 3 purposes : middle button, scroll middle button, tilt button.
Adding the left and right buttons we have 5.
This is stupid but it is what I get, like it or not.

*I just checked and it happens with another mouse. A Microsoft mouse and an Asus mouse.

Quote
create a procedure that's called inbetween the BeginPaint and EndPaint

You mean inside WndProc. Of course, you can, the application will stay irresponsive during the amount of time taken by the called procedure. If that is a big deal, it depends.
Title: Re: Simple abandonware
Post by: felipe on August 25, 2018, 06:25:31 AM
Thanks for the information about a chunk of code inbetween BeginPaint and EndPaint.  :icon14:

About the program, i did note before posting too, the recognition from this function of the api of microsoft (win api) that takes the scroll as a middle button. As an example i have a simple mouse with 2 buttons and the wheel (that can act as a middle button) and the function tells me that i have 3 buttons. So this is how the function treats this on the mouses.  :idea:

But i think the program should have tell you something like:"you have 4 or more buttons...". Is this correct, or not?  :idea:
Title: Re: Simple abandonware
Post by: felipe on August 25, 2018, 06:32:42 AM
Btw i have readed again your reply and i understand that the case of a mouse button that is considered (by the function of the win api) as 2 or more mouse buttons because can be used in more than one way is a different case.  :idea:
It's good to know, thanks for that info too.  :icon14: