Sendmessage for command buttons

Started by Rick McNeely, January 06, 2011, 02:05:33 AM

Previous topic - Next topic

Rick McNeely

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

Rick McNeely

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.

Pete Totushek

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.
-Pete
www.totusoft.com -- Home of LAN Speed Test

Rick McNeely