home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / os / mswindo / programm / misc / 3338 < prev    next >
Encoding:
Internet Message Format  |  1992-11-09  |  1.1 KB

  1. Path: sparky!uunet!anagld!sammy
  2. From: sammy@anagld.analytics.com (Sam Blackburn)
  3. Newsgroups: comp.os.ms-windows.programmer.misc
  4. Subject: Re: Dialog instance data...
  5. Message-ID: <1689@anagld.analytics.com>
  6. Date: 10 Nov 92 01:15:37 GMT
  7. References: <1992Nov9.161604.2770@ists.ists.ca>
  8. Distribution: na
  9. Organization: Computer Sciences Corporation - Systems Engineering Division
  10. Lines: 23
  11.  
  12. carty@ists.ists.ca (Ed Carty) writes:
  13.  
  14.  
  15. >9 Nov. 1992
  16.  
  17. >Anyone walked this road before...
  18. >I'd like to encapsulate instance data with a modeless dialog.  I'm creating
  19. >the dialog with CreateDialogParam(), passing initialization data via the
  20. >lParam.
  21.  
  22. Are you passing a handle to a data structure?  If so you can simply put a
  23. property on the dialogbox window.
  24.  
  25. SetProp( dialog_box_handle, "Instance Data", instance_data_handle );
  26. and to retrieve it:
  27. instance_data_handle = GetProp( dialog_box_handle, "Instance Data" );
  28.  
  29. Properties are a great (and portable) way of holding per-instance or global
  30. data.  They work especially well with data striuctures that are GlobalAlloc'd.
  31.  
  32. Hope This Helps . . .
  33.  
  34. sammy@sed.csc.com
  35.