home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / os / mswindo / programm / misc / 5274 < prev    next >
Encoding:
Text File  |  1993-01-22  |  1.2 KB  |  36 lines

  1. Newsgroups: comp.os.ms-windows.programmer.misc
  2. Path: sparky!uunet!cs.utexas.edu!wotan.compaq.com!twisto.eng.hou.compaq.com!twisto!edm
  3. From: edm@gocart.twisto.compaq.com (Ed McCreary)
  4. Subject: Re: Bitmap dimensions
  5. In-Reply-To: martijn@cs.vu.nl's message of Fri, 22 Jan 1993 12: 00:14 GMT
  6. Message-ID: <EDM.93Jan22094455@gocart.twisto.compaq.com>
  7. Sender: news@twisto.eng.hou.compaq.com (Netnews Account)
  8. Organization: Compaq Computer Corp
  9. References: <C1980F.HEz@cs.vu.nl>
  10. Date: Fri, 22 Jan 1993 14:44:55 GMT
  11. Lines: 23
  12.  
  13. >>>>> On Fri, 22 Jan 1993 12:00:14 GMT, martijn@cs.vu.nl (Lemmens ML) said:
  14.  
  15.  
  16. LM> Is it possible to retrieve the dimensions of a bitmap in a windows
  17. LM> resource file. I can use constants because I draw the bitmap myself,
  18. LM> but I want my program to work independent of the drawings. I know how
  19. LM> to load the resource and how to display it.
  20.  
  21. try this...
  22.  
  23. BITMAP    Bitmap;
  24. HBITMAP hBitmap;
  25.  
  26. hBitmap = LoadBitmap(hInst,(LPSTR)"bitmap_id");
  27. GetObject (hBitmap, sizeof (Bitmap), (LPSTR) &Bitmap);
  28.  
  29.  
  30. your width and height are Bitmap.bmWidth and Bitmap.bmHeight.
  31.  
  32. --
  33. Ed McCreary                                               ,__o
  34. edm@gocart.eng.hou.compaq.com                           _-\_<,
  35. "If it were not for laughter, there would be no Tao."  (*)/'(*)
  36.