Dynamic Buttons in Dialog Box
-
Hi, In my application, MDI, I have to read an output file in one of the dialog boxes. According to the output file, lets say 6 is read in the file. I then have to make 6 Buttons in that Dialog box. the number 6 could change, so I would like to know how to make it dynamic. Any ideas? Ehsan Behboudi
-
Hi, In my application, MDI, I have to read an output file in one of the dialog boxes. According to the output file, lets say 6 is read in the file. I then have to make 6 Buttons in that Dialog box. the number 6 could change, so I would like to know how to make it dynamic. Any ideas? Ehsan Behboudi
CButton:Create()
would be a great start :) Just call this function inside a for loop or something and space the buttons accordingly. You'll probably have to handle button clicks insideOnCommand()
though instead of MFC message map function. Cheers I'm drinking triples, seeing double and acting single :cool: