Hi,
I've got a big problem: I designed an app with 4 forms and a lot of commandbuttons. I copied the buttons so they look identically. They are named all different (no array). But now, when FF generates the code, they get all the same value for the IDC_ variable. So if I press a button, they do all the same (and all things what is in all click-functions). Here is a snipped of the generated code:
//FF_VARIABLES//
IDC_NEW_UPDALLED = 1
IDC_NEW_UPDMINDIR = 1
IDC_NEW_UPDMINFILE = 1
IDC_NEW_UPDDTXT = 1003
IDC_NEW_UPDADDDIR = 1
IDC_NEW_UPDADDFILE = 1
IDC_NEW_SELUPDVERZ = 1
IDC_NEW_UPDVERZTXT = 1007
IDC_NEW_LISTECFGFADD = 1008
IDC_NEW_LISTEUPDD = 1009
IDC_NEW_LISTEUPDF = 1010
IDC_NEW_LISTECFGDADD = 1011
IDC_NEW_UPDFTXT = 1012
IDC_NEW_UPDVERZ = 1013
//FF_VARIABLES//
All the IDC with value 1 are the different buttons. The IDC with TXT in the name are copied too, there is no problem.
What can I do? I haven't found a workaraound. It would be very bad, do make the buttons all extra and not to copy them. :o
Regards Rainer
Hi Rainer,
It looks like that the original command button that you are copying has the BS_DEFPUSHBUTTON window style set. That style always generates an IDC = 1. You should be able to simply go into the WindowStyles of each button and uncheck that style and then recompile the project. Once you recompile, FireFly will generate new values for you other than "1".
Hi Paul,
great - this was the reason, thanks a lot! :D I think I would never have found this. ;)