<?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 Displaying Image in Dialog Box in Software Archive</title>
    <link>https://community.intel.com/t5/Software-Archive/Displaying-Image-in-Dialog-Box/m-p/942287#M17307</link>
    <description>Hi,  &lt;BR /&gt; &lt;BR /&gt;I am learning Quick Win and am trying to display a Text and Image using the following commands: &lt;BR /&gt; &lt;BR /&gt;retlog = DlgSet(dig, DC_EDIT1, Test' ) &lt;BR /&gt;retlog = DlgSet(dig, DC_STATIC1, IDB_BITMAP2) &lt;BR /&gt; &lt;BR /&gt;The text works fine, but not the static image.  I thought of trying DLGSENDCTRLMESSAGE, but not sure what T_MSG in documentation refers to: &lt;BR /&gt; &lt;BR /&gt;retint = DLGSENDCTRLMESSAGE (dlg, IDC_STATIC1, T_MSG???,0,IDB_BITMAP2) &lt;BR /&gt; &lt;BR /&gt;I would appreciate any help on this. &lt;BR /&gt; &lt;BR /&gt;Thanks &lt;BR /&gt;Rajesh</description>
    <pubDate>Tue, 13 Mar 2001 08:41:37 GMT</pubDate>
    <dc:creator>Intel_C_Intel</dc:creator>
    <dc:date>2001-03-13T08:41:37Z</dc:date>
    <item>
      <title>Displaying Image in Dialog Box</title>
      <link>https://community.intel.com/t5/Software-Archive/Displaying-Image-in-Dialog-Box/m-p/942287#M17307</link>
      <description>Hi,  &lt;BR /&gt; &lt;BR /&gt;I am learning Quick Win and am trying to display a Text and Image using the following commands: &lt;BR /&gt; &lt;BR /&gt;retlog = DlgSet(dig, DC_EDIT1, Test' ) &lt;BR /&gt;retlog = DlgSet(dig, DC_STATIC1, IDB_BITMAP2) &lt;BR /&gt; &lt;BR /&gt;The text works fine, but not the static image.  I thought of trying DLGSENDCTRLMESSAGE, but not sure what T_MSG in documentation refers to: &lt;BR /&gt; &lt;BR /&gt;retint = DLGSENDCTRLMESSAGE (dlg, IDC_STATIC1, T_MSG???,0,IDB_BITMAP2) &lt;BR /&gt; &lt;BR /&gt;I would appreciate any help on this. &lt;BR /&gt; &lt;BR /&gt;Thanks &lt;BR /&gt;Rajesh</description>
      <pubDate>Tue, 13 Mar 2001 08:41:37 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Displaying-Image-in-Dialog-Box/m-p/942287#M17307</guid>
      <dc:creator>Intel_C_Intel</dc:creator>
      <dc:date>2001-03-13T08:41:37Z</dc:date>
    </item>
    <item>
      <title>Re: Displaying Image in Dialog Box</title>
      <link>https://community.intel.com/t5/Software-Archive/Displaying-Image-in-Dialog-Box/m-p/942288#M17308</link>
      <description>Hi Rajesh, &lt;BR /&gt;The message you're looking for is STM_SETIMAGE, with arguments IMAGE_BITMAP and hImage; hImage, however, is Windows &lt;B&gt;handle&lt;/B&gt; of the bitmap. You can load a bitmap from resource  &lt;BR /&gt;using  &lt;BR /&gt;&lt;PRE&gt; 
USE DFWIN 
... 
hImage=LoadBitmap(GetModuleHandle(NULL), MAKEINTRESOURCE(IDB_BITMAP2)) 
&lt;/PRE&gt; &lt;BR /&gt; &lt;BR /&gt;However, this makes sense only if you want to &lt;B&gt;change&lt;/B&gt; the bitmap at run-time; you can add a bitmap into the dialog at design-time, from resource editor -- just add a "Picture" control from the "Controls" toolbar, &lt;BR /&gt;select "Type: Bitmap" in its "Properties" dialog, and then select bitmap's ID from the "Image" combo. Even if you use DlgSendCtrlMessage, the control you want to assign the bitmap must be of type "Picture" as described above. &lt;BR /&gt; &lt;BR /&gt;Jugoslav</description>
      <pubDate>Tue, 13 Mar 2001 20:53:02 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Displaying-Image-in-Dialog-Box/m-p/942288#M17308</guid>
      <dc:creator>Jugoslav_Dujic</dc:creator>
      <dc:date>2001-03-13T20:53:02Z</dc:date>
    </item>
    <item>
      <title>Re: Displaying Image in Dialog Box</title>
      <link>https://community.intel.com/t5/Software-Archive/Displaying-Image-in-Dialog-Box/m-p/942289#M17309</link>
      <description>Jugoslav,  &lt;BR /&gt; &lt;BR /&gt;Thanks.  Yes, I want to change the image during run time.  And so I tried: &lt;BR /&gt; &lt;BR /&gt;hImage=LoadBitmap(GetModuleHandle(Null), MAKEINTRESOURCE(IDB_BITMAP2))   &lt;BR /&gt; &lt;BR /&gt;n = DLGSENDCTRLMESSAGE(dlg,idc_static1, STM_SETIMAGE,  &lt;BR /&gt;IMAGE_BITMAP,hImage) &lt;BR /&gt; &lt;BR /&gt;n = DlgModal(dlg) &lt;BR /&gt; &lt;BR /&gt;But I get a message to the effect that STM_SETIMAGE and IMAGE_BITMAP are not defined.  Should I be declaring them as some type, or did I interpret your instructions incorrectly? &lt;BR /&gt; &lt;BR /&gt;Thanks &lt;BR /&gt;Rajesh</description>
      <pubDate>Fri, 16 Mar 2001 11:20:52 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Displaying-Image-in-Dialog-Box/m-p/942289#M17309</guid>
      <dc:creator>Intel_C_Intel</dc:creator>
      <dc:date>2001-03-16T11:20:52Z</dc:date>
    </item>
    <item>
      <title>Re: Displaying Image in Dialog Box</title>
      <link>https://community.intel.com/t5/Software-Archive/Displaying-Image-in-Dialog-Box/m-p/942290#M17310</link>
      <description>You did interpret them correctly; however, the "compilability" of the code depends on version of CVF you have: older versions (up to 6.0 AFAIK) don't have complete declarations in DFWIN module. Here are the correct declarations for names in question which you may include in a separate module or declare them directly in the code: &lt;BR /&gt;&lt;BR /&gt;&lt;FONT size="+1"&gt;&lt;BR /&gt;&lt;PRE&gt; 
INTEGER,PARAMETER:: STM_SETIMAGE        =#0172 
INTEGER,PARAMETER:: STM_GETIMAGE        =#0173 
 
INTEGER,PARAMETER:: IMAGE_BITMAP            =0 
INTEGER,PARAMETER:: IMAGE_ICON              =1 
INTEGER,PARAMETER:: IMAGE_CURSOR            =2 
INTEGER,PARAMETER:: IMAGE_ENHMETAFILE       =3 
 
INTEGER,PARAMETER:: LR_DEFAULTCOLOR         =#0000 
INTEGER,PARAMETER:: LR_MONOCHROME           =#0001 
INTEGER,PARAMETER:: LR_COLOR                =#0002 
INTEGER,PARAMETER:: LR_COPYRETURNORG        =#0004 
INTEGER,PARAMETER:: LR_COPYDELETEORG        =#0008 
INTEGER,PARAMETER:: LR_LOADFROMFILE         =#0010 
INTEGER,PARAMETER:: LR_LOADTRANSPARENT      =#0020 
INTEGER,PARAMETER:: LR_DEFAULTSIZE          =#0040 
INTEGER,PARAMETER:: LR_LOADMAP3DCOLORS      =#1000 
INTEGER,PARAMETER:: LR_CREATEDIBSECTION     =#2000 
INTEGER,PARAMETER:: LR_COPYFROMRESOURCE     =#4000 
INTEGER,PARAMETER:: LR_SHARED               =#8000     
 
!DEC$OBJCOMMENT LIB: 'User32.lib'  
INTERFACE 
      INTEGER(4) FUNCTION  LoadImageA(hInst,lpszName,uType,cxDesired,    &amp;amp; 
                                     cyDesired,fuLoad) 
      !MS$ATTRIBUTES STDCALL, ALIAS : '_LoadImageA@24' :: LoadImageA 
      INTEGER                 hInst 
      INTEGER                 lpszName 
      INTEGER                 uType 
      INTEGER                 cxDesired 
      INTEGER                 cyDesired 
      INTEGER                 fuLoad 
      END FUNCTION LoadImageA 
END INTERFACE 
 
&lt;/PRE&gt; &lt;BR /&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;With declarations above, replace LoadImage with LoadImageA in the code. &lt;BR /&gt;(uh, it's difficult to explain why renaming is necessary).  &lt;BR /&gt; &lt;BR /&gt;One more note: be aware that DlgSendCtrlMessage (as far as I know) works only from callback functions (the ones you register with DlgSetSub); &lt;BR /&gt;it won't work in the same routine where you call DlgInit...DlgModal. If you &lt;BR /&gt;want to set the bitmap initially in the dialog, make a dialog "startup" routine, in the following way: &lt;BR /&gt;&lt;BR /&gt;&lt;FONT size="+1"&gt;&lt;BR /&gt;&lt;PRE&gt; 
iSt=DlgInit(... 
iSt=DlgSetSub(Dlg, IDD_DIALOG_1, OnDlgInit) 
... 
 
SUBROUTINE OnDlgInit(Dlg, ID, iAction) 
... 
iSt=DlgSendCtrlMessage(... 
 
END SUBROUTINE 
&lt;/PRE&gt; &lt;BR /&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;Regards &lt;BR /&gt; &lt;BR /&gt;Jugoslav</description>
      <pubDate>Fri, 16 Mar 2001 20:55:33 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Displaying-Image-in-Dialog-Box/m-p/942290#M17310</guid>
      <dc:creator>Jugoslav_Dujic</dc:creator>
      <dc:date>2001-03-16T20:55:33Z</dc:date>
    </item>
  </channel>
</rss>

