Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Use of hDlg in a sub-function
#1
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.


Messages In This Thread
Use of hDlg in a sub-function - by ssimop - 07-13-2018, 03:26 PM
RE: Use of hDlg in a sub-function - by Gintaras - 07-13-2018, 05:44 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)