Why you put a function to get the hwnd of a control instead of putting his hwnd on a global variable when creating it (Visual mode)?
Hi Eduardo,
For a good style of programming you should not abuse of global variables. In fact, an application should have as litlle global variables as possible. Global variables may cause problems as they can be changed in any part of the code.
Regards,
Ramon
For a good style of programming you should not abuse of global variables. In fact, an application should have as litlle global variables as possible. Global variables may cause problems as they can be changed in any part of the code.
Regards,
Ramon
rsala,
I understand all problems of global variables, the wrong use of them by the programer, etc. But a tool is usefull if it help us not if it limit us, if you put an option to save all the handles in global variables it will help lots of programers, if someone don't use them correctly it isn't your problem,
Is a little strange you don't put global variables to save the handles and the users put a GetWindowItem for each control on the WM_CREATE to save the globals...
I understand all problems of global variables, the wrong use of them by the programer, etc. But a tool is usefull if it help us not if it limit us, if you put an option to save all the handles in global variables it will help lots of programers, if someone don't use them correctly it isn't your problem,
Is a little strange you don't put global variables to save the handles and the users put a GetWindowItem for each control on the WM_CREATE to save the globals...
Eduardo,
Even though I think there is no limitation, as you can have the handles and store them in global variables if you like, I'll study the possibility of adding the feature you propose. Anyway I think it's better to let the programmer to decide whether he wants global variables or not.
Ramon
Even though I think there is no limitation, as you can have the handles and store them in global variables if you like, I'll study the possibility of adding the feature you propose. Anyway I think it's better to let the programmer to decide whether he wants global variables or not.
Ramon