One of my QM items calls a dialog (ShowDialog) as well as a number of sub-functions (sub) most of them declared with the "v" attribute. I wonder about the most elegant way to access hDlg in these subfunctions. Up to now, I used two alternatives:
(a) Use a "function int'hDlg" statement in each function.
(b) Declare an variable "int hw" in main, and then set its value in DlgProc, as "hw=hDlg".
They both work. However, my questions are :
(i) Is there a third solution better than these above?
(ii) Which of the above two solutions is better to be used.
Any advice will be most appreciated.
(a) Use a "function int'hDlg" statement in each function.
(b) Declare an variable "int hw" in main, and then set its value in DlgProc, as "hw=hDlg".
They both work. However, my questions are :
(i) Is there a third solution better than these above?
(ii) Which of the above two solutions is better to be used.
Any advice will be most appreciated.