<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Example of button with bitmap in Software Archive</title>
    <link>https://community.intel.com/t5/Software-Archive/Example-of-button-with-bitmap/m-p/973011#M24419</link>
    <description>Second argument to SendDlgItemMessage is control's ID, not handle ;-). &lt;BR /&gt;Also, don't forget to add BS_BITMAP style to your button. &lt;BR /&gt; &lt;BR /&gt;Jugoslav</description>
    <pubDate>Mon, 12 Nov 2001 20:04:21 GMT</pubDate>
    <dc:creator>Jugoslav_Dujic</dc:creator>
    <dc:date>2001-11-12T20:04:21Z</dc:date>
    <item>
      <title>Example of button with bitmap</title>
      <link>https://community.intel.com/t5/Software-Archive/Example-of-button-with-bitmap/m-p/973009#M24417</link>
      <description>Is there an example of displaying a bitmap in a button for a windows api project?  &lt;BR /&gt;  &lt;BR /&gt;In the button properties - style tab, there is a check box for bitmap.  &lt;BR /&gt;Is there an example, or can anyone tell me how to do it.  &lt;BR /&gt;  &lt;BR /&gt;Thanks,  &lt;BR /&gt;David</description>
      <pubDate>Sat, 10 Nov 2001 02:03:40 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Example-of-button-with-bitmap/m-p/973009#M24417</guid>
      <dc:creator>davidgraham</dc:creator>
      <dc:date>2001-11-10T02:03:40Z</dc:date>
    </item>
    <item>
      <title>Re: Example of button with bitmap</title>
      <link>https://community.intel.com/t5/Software-Archive/Example-of-button-with-bitmap/m-p/973010#M24418</link>
      <description>After some searching I found some code to try, but it doesn't work. &lt;BR /&gt;I'm sure why, there is probably a small error with the code. &lt;BR /&gt; &lt;BR /&gt;On the SendDlgItemMessage, I get an error 1421- "Control ID not found" &lt;BR /&gt;is that hIDDlgItem, or hImagen that it cannot find, they seam to be OK?    &lt;BR /&gt; &lt;BR /&gt;&lt;PRE&gt; 
hIDDlgItem=GetDlgItem(hWnd,IDC_BUTTON1) 
FileName="c:MyBitmap.bmp"//char(0) 
hImagen=LoadImage(hInst,FileName,IMAGE_BITMAP,32,32,LR_DEFAULTSIZE.OR.LR_LOADFROMFILE) 
iret=SendDlgItemMessage(hwnd,hIDDlgItem,BM_SETIMAGE,IMAGE_BITMAP,hImagen) 
iret=GetLastError() 
&lt;/PRE&gt; &lt;BR /&gt; &lt;BR /&gt;Thanks, &lt;BR /&gt;David</description>
      <pubDate>Mon, 12 Nov 2001 19:38:35 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Example-of-button-with-bitmap/m-p/973010#M24418</guid>
      <dc:creator>davidgraham</dc:creator>
      <dc:date>2001-11-12T19:38:35Z</dc:date>
    </item>
    <item>
      <title>Re: Example of button with bitmap</title>
      <link>https://community.intel.com/t5/Software-Archive/Example-of-button-with-bitmap/m-p/973011#M24419</link>
      <description>Second argument to SendDlgItemMessage is control's ID, not handle ;-). &lt;BR /&gt;Also, don't forget to add BS_BITMAP style to your button. &lt;BR /&gt; &lt;BR /&gt;Jugoslav</description>
      <pubDate>Mon, 12 Nov 2001 20:04:21 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Example-of-button-with-bitmap/m-p/973011#M24419</guid>
      <dc:creator>Jugoslav_Dujic</dc:creator>
      <dc:date>2001-11-12T20:04:21Z</dc:date>
    </item>
    <item>
      <title>Re: Example of button with bitmap</title>
      <link>https://community.intel.com/t5/Software-Archive/Example-of-button-with-bitmap/m-p/973012#M24420</link>
      <description>Thanks for the quick response, that fixed it. &lt;BR /&gt;I simplified it a bit more by having the bitmap as a resource rather than specify the file name. &lt;BR /&gt;&lt;PRE&gt; 
hImage=LoadImage(hInst,IDB_MYBITMAP,IMAGE_BITMAP,32,32,LR_DEFAULTSIZE) 
iret=SendDlgItemMessage(hwnd,IDC_BUTTON1,BM_SETIMAGE,IMAGE_BITMAP,hImage) 
&lt;/PRE&gt;</description>
      <pubDate>Mon, 12 Nov 2001 21:15:56 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Example-of-button-with-bitmap/m-p/973012#M24420</guid>
      <dc:creator>davidgraham</dc:creator>
      <dc:date>2001-11-12T21:15:56Z</dc:date>
    </item>
  </channel>
</rss>

