<?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: in ObjectARX Forum</title>
    <link>https://forums.autodesk.com/t5/objectarx-forum/how-to-display-a-dwg-preview-using-mfc-function/m-p/311726#M39647</link>
    <description>How I can get the Bitmap to create a BitmapButton ??&lt;BR /&gt;
Some source there ??&lt;BR /&gt;
&lt;BR /&gt;
Thanks&lt;BR /&gt;
Georg&lt;BR /&gt;
&lt;BR /&gt;
"Tony Tanzillo" &lt;TONY.TANZILLO at="" caddzone="" dot="" com=""&gt; schrieb im Newsbeitrag&lt;BR /&gt;
news:E113F7F83ED7F49F57121BCB615DA347@in.WebX.maYIadrTaRb...&lt;BR /&gt;
&amp;gt; This will work, but it will be erased the first time&lt;BR /&gt;
&amp;gt; your window is repainted.&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; To do this, you either need to call acdbDisplayPreviewFromDwg()&lt;BR /&gt;
&amp;gt; from your OnPaint() handler (ouch!), or better, cache the image&lt;BR /&gt;
&amp;gt; in a memory DC and bitblt to the window DC from OnPaint().&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; So it may be better to get the bitmap directly by calling&lt;BR /&gt;
&amp;gt; acdbGetPreviewBitmapFromDwg() and then display it in your&lt;BR /&gt;
&amp;gt; OnPaint() handler.&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; "Vinicius Pontes" &lt;VINICIUS.PONTES&gt; wrote in message&lt;BR /&gt;
&amp;gt; news:03D2AA9B98590B8F6302180AB78C6E25@in.WebX.maYIadrTaRb...&lt;BR /&gt;
&amp;gt; &amp;gt; I'll give you a sample on how to show the preview image in a dialog&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; -Create a dialog using ClassWizard.&lt;BR /&gt;
&amp;gt; &amp;gt; -Create a Picture object in your dialog. In the properties, set the type&lt;BR /&gt;
&amp;gt; to&lt;BR /&gt;
&amp;gt; &amp;gt; rectangle and the color to black.&lt;BR /&gt;
&amp;gt; &amp;gt; -Change the ID of the picture from IDC_STATIC to IDC_PREVIEW (for&lt;BR /&gt;
example)&lt;BR /&gt;
&amp;gt; &amp;gt; -Using ClassWizard, create a member variable of the type CStatic to this&lt;BR /&gt;
&amp;gt; &amp;gt; control. Name it as m_preview&lt;BR /&gt;
&amp;gt; &amp;gt; -Create a button in your dialog and put the cond below on it:&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt;  CFileDialog fileDlg( TRUE, ".dwg", NULL, OFN_OVERWRITEPROMPT, "AutoCAD&lt;BR /&gt;
&amp;gt; &amp;gt; Drawings (*.dwg)|*.dwg||", this);&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt;  if ( fileDlg.DoModal() == IDOK )&lt;BR /&gt;
&amp;gt; &amp;gt;  {&lt;BR /&gt;
&amp;gt; &amp;gt;   CString szDwg;&lt;BR /&gt;
&amp;gt; &amp;gt;   szDwg = fileDlg.GetPathName();&lt;BR /&gt;
&amp;gt; &amp;gt;   Adesk::UInt32 color = 0;&lt;BR /&gt;
&amp;gt; &amp;gt;   acdbDisplayPreviewFromDwg(szDwg, m_preview.m_hWnd, &amp;amp;color);&lt;BR /&gt;
&amp;gt; &amp;gt;  }&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; -Include stdarx.h in your dialog.&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; I tested it before post here and it worked.&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; Vinicius&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; Georg Erlenhoff &lt;G.ERLENHOFF&gt; escreveu nas notícias&lt;BR /&gt;
de&lt;BR /&gt;
&amp;gt; &amp;gt; mensagem:300A67A26326DB18DAF3EF47A78B39EC@in.WebX.maYIadrTaRb...&lt;BR /&gt;
&amp;gt; &amp;gt; Can't found on article 5298 the downloadfile 5298.zip&lt;BR /&gt;
&amp;gt; &amp;gt; any idear for a example ??&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; Best regards&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; Georg&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt;&lt;/G.ERLENHOFF&gt;&lt;/VINICIUS.PONTES&gt;&lt;/TONY.TANZILLO&gt;</description>
    <pubDate>Tue, 27 Aug 2002 07:53:35 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2002-08-27T07:53:35Z</dc:date>
    <item>
      <title>How to display a DWG preview using MFC function ??</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/how-to-display-a-dwg-preview-using-mfc-function/m-p/311723#M39644</link>
      <description>Can't found on article 5298 the downloadfile 5298.zip&lt;BR /&gt;
any idear for a example ??&lt;BR /&gt;
&lt;BR /&gt;
Best regards&lt;BR /&gt;
&lt;BR /&gt;
Georg</description>
      <pubDate>Mon, 26 Aug 2002 08:08:23 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/how-to-display-a-dwg-preview-using-mfc-function/m-p/311723#M39644</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2002-08-26T08:08:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to display a DWG preview using MFC function ??</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/how-to-display-a-dwg-preview-using-mfc-function/m-p/311724#M39645</link>
      <description>I'll give you a sample on how to show the preview image in a dialog&lt;BR /&gt;
&lt;BR /&gt;
-Create a dialog using ClassWizard.&lt;BR /&gt;
-Create a Picture object in your dialog. In the properties, set the type to&lt;BR /&gt;
rectangle and the color to black.&lt;BR /&gt;
-Change the ID of the picture from IDC_STATIC to IDC_PREVIEW (for example)&lt;BR /&gt;
-Using ClassWizard, create a member variable of the type CStatic to this&lt;BR /&gt;
control. Name it as m_preview&lt;BR /&gt;
-Create a button in your dialog and put the cond below on it:&lt;BR /&gt;
&lt;BR /&gt;
 CFileDialog fileDlg( TRUE, ".dwg", NULL, OFN_OVERWRITEPROMPT, "AutoCAD&lt;BR /&gt;
Drawings (*.dwg)|*.dwg||", this);&lt;BR /&gt;
&lt;BR /&gt;
 if ( fileDlg.DoModal() == IDOK )&lt;BR /&gt;
 {&lt;BR /&gt;
  CString szDwg;&lt;BR /&gt;
  szDwg = fileDlg.GetPathName();&lt;BR /&gt;
  Adesk::UInt32 color = 0;&lt;BR /&gt;
  acdbDisplayPreviewFromDwg(szDwg, m_preview.m_hWnd, &amp;amp;color);&lt;BR /&gt;
 }&lt;BR /&gt;
&lt;BR /&gt;
-Include stdarx.h in your dialog.&lt;BR /&gt;
&lt;BR /&gt;
I tested it before post here and it worked.&lt;BR /&gt;
&lt;BR /&gt;
Vinicius&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Georg Erlenhoff &lt;G.ERLENHOFF&gt; escreveu nas notícias de&lt;BR /&gt;
mensagem:300A67A26326DB18DAF3EF47A78B39EC@in.WebX.maYIadrTaRb...&lt;BR /&gt;
Can't found on article 5298 the downloadfile 5298.zip&lt;BR /&gt;
any idear for a example ??&lt;BR /&gt;
&lt;BR /&gt;
Best regards&lt;BR /&gt;
&lt;BR /&gt;
Georg&lt;/G.ERLENHOFF&gt;</description>
      <pubDate>Mon, 26 Aug 2002 10:24:28 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/how-to-display-a-dwg-preview-using-mfc-function/m-p/311724#M39645</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2002-08-26T10:24:28Z</dc:date>
    </item>
    <item>
      <title>Re:</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/how-to-display-a-dwg-preview-using-mfc-function/m-p/311725#M39646</link>
      <description>This will work, but it will be erased the first time&lt;BR /&gt;
your window is repainted.&lt;BR /&gt;
&lt;BR /&gt;
To do this, you either need to call acdbDisplayPreviewFromDwg()&lt;BR /&gt;
from your OnPaint() handler (ouch!), or better, cache the image&lt;BR /&gt;
in a memory DC and bitblt to the window DC from OnPaint().&lt;BR /&gt;
&lt;BR /&gt;
So it may be better to get the bitmap directly by calling&lt;BR /&gt;
acdbGetPreviewBitmapFromDwg() and then display it in your&lt;BR /&gt;
OnPaint() handler.&lt;BR /&gt;
&lt;BR /&gt;
"Vinicius Pontes" &lt;VINICIUS.PONTES&gt; wrote in message&lt;BR /&gt;
news:03D2AA9B98590B8F6302180AB78C6E25@in.WebX.maYIadrTaRb...&lt;BR /&gt;
&amp;gt; I'll give you a sample on how to show the preview image in a dialog&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; -Create a dialog using ClassWizard.&lt;BR /&gt;
&amp;gt; -Create a Picture object in your dialog. In the properties, set the type&lt;BR /&gt;
to&lt;BR /&gt;
&amp;gt; rectangle and the color to black.&lt;BR /&gt;
&amp;gt; -Change the ID of the picture from IDC_STATIC to IDC_PREVIEW (for example)&lt;BR /&gt;
&amp;gt; -Using ClassWizard, create a member variable of the type CStatic to this&lt;BR /&gt;
&amp;gt; control. Name it as m_preview&lt;BR /&gt;
&amp;gt; -Create a button in your dialog and put the cond below on it:&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt;  CFileDialog fileDlg( TRUE, ".dwg", NULL, OFN_OVERWRITEPROMPT, "AutoCAD&lt;BR /&gt;
&amp;gt; Drawings (*.dwg)|*.dwg||", this);&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt;  if ( fileDlg.DoModal() == IDOK )&lt;BR /&gt;
&amp;gt;  {&lt;BR /&gt;
&amp;gt;   CString szDwg;&lt;BR /&gt;
&amp;gt;   szDwg = fileDlg.GetPathName();&lt;BR /&gt;
&amp;gt;   Adesk::UInt32 color = 0;&lt;BR /&gt;
&amp;gt;   acdbDisplayPreviewFromDwg(szDwg, m_preview.m_hWnd, &amp;amp;color);&lt;BR /&gt;
&amp;gt;  }&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; -Include stdarx.h in your dialog.&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; I tested it before post here and it worked.&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; Vinicius&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; Georg Erlenhoff &lt;G.ERLENHOFF&gt; escreveu nas notícias de&lt;BR /&gt;
&amp;gt; mensagem:300A67A26326DB18DAF3EF47A78B39EC@in.WebX.maYIadrTaRb...&lt;BR /&gt;
&amp;gt; Can't found on article 5298 the downloadfile 5298.zip&lt;BR /&gt;
&amp;gt; any idear for a example ??&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; Best regards&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; Georg&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt;&lt;/G.ERLENHOFF&gt;&lt;/VINICIUS.PONTES&gt;</description>
      <pubDate>Mon, 26 Aug 2002 11:30:44 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/how-to-display-a-dwg-preview-using-mfc-function/m-p/311725#M39646</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2002-08-26T11:30:44Z</dc:date>
    </item>
    <item>
      <title>Re:</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/how-to-display-a-dwg-preview-using-mfc-function/m-p/311726#M39647</link>
      <description>How I can get the Bitmap to create a BitmapButton ??&lt;BR /&gt;
Some source there ??&lt;BR /&gt;
&lt;BR /&gt;
Thanks&lt;BR /&gt;
Georg&lt;BR /&gt;
&lt;BR /&gt;
"Tony Tanzillo" &lt;TONY.TANZILLO at="" caddzone="" dot="" com=""&gt; schrieb im Newsbeitrag&lt;BR /&gt;
news:E113F7F83ED7F49F57121BCB615DA347@in.WebX.maYIadrTaRb...&lt;BR /&gt;
&amp;gt; This will work, but it will be erased the first time&lt;BR /&gt;
&amp;gt; your window is repainted.&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; To do this, you either need to call acdbDisplayPreviewFromDwg()&lt;BR /&gt;
&amp;gt; from your OnPaint() handler (ouch!), or better, cache the image&lt;BR /&gt;
&amp;gt; in a memory DC and bitblt to the window DC from OnPaint().&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; So it may be better to get the bitmap directly by calling&lt;BR /&gt;
&amp;gt; acdbGetPreviewBitmapFromDwg() and then display it in your&lt;BR /&gt;
&amp;gt; OnPaint() handler.&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; "Vinicius Pontes" &lt;VINICIUS.PONTES&gt; wrote in message&lt;BR /&gt;
&amp;gt; news:03D2AA9B98590B8F6302180AB78C6E25@in.WebX.maYIadrTaRb...&lt;BR /&gt;
&amp;gt; &amp;gt; I'll give you a sample on how to show the preview image in a dialog&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; -Create a dialog using ClassWizard.&lt;BR /&gt;
&amp;gt; &amp;gt; -Create a Picture object in your dialog. In the properties, set the type&lt;BR /&gt;
&amp;gt; to&lt;BR /&gt;
&amp;gt; &amp;gt; rectangle and the color to black.&lt;BR /&gt;
&amp;gt; &amp;gt; -Change the ID of the picture from IDC_STATIC to IDC_PREVIEW (for&lt;BR /&gt;
example)&lt;BR /&gt;
&amp;gt; &amp;gt; -Using ClassWizard, create a member variable of the type CStatic to this&lt;BR /&gt;
&amp;gt; &amp;gt; control. Name it as m_preview&lt;BR /&gt;
&amp;gt; &amp;gt; -Create a button in your dialog and put the cond below on it:&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt;  CFileDialog fileDlg( TRUE, ".dwg", NULL, OFN_OVERWRITEPROMPT, "AutoCAD&lt;BR /&gt;
&amp;gt; &amp;gt; Drawings (*.dwg)|*.dwg||", this);&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt;  if ( fileDlg.DoModal() == IDOK )&lt;BR /&gt;
&amp;gt; &amp;gt;  {&lt;BR /&gt;
&amp;gt; &amp;gt;   CString szDwg;&lt;BR /&gt;
&amp;gt; &amp;gt;   szDwg = fileDlg.GetPathName();&lt;BR /&gt;
&amp;gt; &amp;gt;   Adesk::UInt32 color = 0;&lt;BR /&gt;
&amp;gt; &amp;gt;   acdbDisplayPreviewFromDwg(szDwg, m_preview.m_hWnd, &amp;amp;color);&lt;BR /&gt;
&amp;gt; &amp;gt;  }&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; -Include stdarx.h in your dialog.&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; I tested it before post here and it worked.&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; Vinicius&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; Georg Erlenhoff &lt;G.ERLENHOFF&gt; escreveu nas notícias&lt;BR /&gt;
de&lt;BR /&gt;
&amp;gt; &amp;gt; mensagem:300A67A26326DB18DAF3EF47A78B39EC@in.WebX.maYIadrTaRb...&lt;BR /&gt;
&amp;gt; &amp;gt; Can't found on article 5298 the downloadfile 5298.zip&lt;BR /&gt;
&amp;gt; &amp;gt; any idear for a example ??&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; Best regards&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; Georg&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt;&lt;/G.ERLENHOFF&gt;&lt;/VINICIUS.PONTES&gt;&lt;/TONY.TANZILLO&gt;</description>
      <pubDate>Tue, 27 Aug 2002 07:53:35 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/how-to-display-a-dwg-preview-using-mfc-function/m-p/311726#M39647</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2002-08-27T07:53:35Z</dc:date>
    </item>
  </channel>
</rss>

