PlanetSquires Forums

Support Forums => Other Software and Code => Topic started by: Rick McNeely on January 06, 2011, 02:05:33 AM

Title: Sendmessage for command buttons
Post by: Rick McNeely on January 06, 2011, 02:05:33 AM
I'm having some issues with buttons.  I have an array of buttons that (depending on the situation) might need to be 'regular' buttons or buttons that toggle state with each push.  I've been trying to change the buttons from a normal push button to a state-toggling button using the following lines, or variations thereof:


            SendMessage HWND_FRMREMOTE_COMMAND1(i), %BM_SETSTYLE, %BS_CHECKBOX , %true
            SendMessage HWND_FRMREMOTE_COMMAND1(i), %BM_SETSTYLE, %BS_PUSHLIKE ,     %true


I can get it to change to a checkbox, but the 'pushlike' never seems to have any effect.  I'm following details I found on:

http://msdn.microsoft.com/en-us/library/bb775951(v=vs.85).aspx

I should mention that the buttons are arrayed.  Am I missing something?

Rick
Title: Re: Sendmessage for command buttons
Post by: Rick McNeely on January 06, 2011, 11:15:06 PM
Nevermind.  Reading further ( http://msdn.microsoft.com/en-us/library/bb775941(v=vs.85).aspx#messages_to_buttons ) I found that an application shouldn't try to change button types.
Title: Re: Sendmessage for command buttons
Post by: Pete Totushek on January 07, 2011, 11:14:30 AM
Look at Jose's XP Themed Button.  I'm pretty sure you can do what you are looking for with that.  Go to his forum for the instructions.
Title: Re: Sendmessage for command buttons
Post by: Rick McNeely on January 07, 2011, 04:45:24 PM
Thanks Pete,  I will do that.