home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / os / mswindo / programm / misc / 1870 < prev    next >
Encoding:
Text File  |  1992-09-15  |  1.0 KB  |  30 lines

  1. Newsgroups: comp.os.ms-windows.programmer.misc
  2. Path: sparky!uunet!utcsri!torn!cunews!nrcnet0!emr1!jagrant
  3. From: jagrant@emr1.emr.ca (John Grant)
  4. Subject: PDRAWITEMSTRUCT vs LPDRAWITEMSTRUCT
  5. Message-ID: <1992Sep16.043204.4822@emr1.emr.ca>
  6. Organization: Energy, Mines, and Resources, Ottawa
  7. References: <1992Sep16.042818.4073@emr1.emr.ca>
  8. Date: Wed, 16 Sep 1992 04:32:04 GMT
  9. Lines: 19
  10.  
  11. I am confused over the use of LPDRAWITEMSTRUCT & PDRAWITEMSTRUCT.
  12. Help for LPDRAWITEMSTRUCT says this is a 32-bit pointer and says I 
  13. should use PDRAWITEMSTRUCT instead and let the memory model decide 
  14. on the size of the pointer.
  15.  
  16. But, in help for WM_DRAWITEM, the example is something like:
  17.    LPDRAWITEMSTRUCT lpdis;
  18.    ...
  19.    lpdis=(DRAWITEMSTRUCT FAR *)lparam;
  20.    ...
  21.  
  22. So...
  23.    1. why didn't they just say:
  24.         lpdis=(LPDRAWITEMSTRUCT)lparam;
  25.     since it is already defined for them
  26.    
  27.    2. why didn't they just use PDRAWITEMSTRUCT and let the memory
  28.     model take care of the pointer size?  How did they know it
  29.     had to be FAR (i.e. LPDRAWITEMSTRUCT)?
  30.