Changeset 122


Ignore:
Timestamp:
Sep 10, 2012, 2:03:55 PM (9 years ago)
Author:
roman
Message:

Added bitmap static

Location:
trunk/Utilities/AtlDialogSample
Files:
1 added
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/Utilities/AtlDialogSample/AtlDialogSample.cpp

    r71 r122  
    2323BEGIN_MSG_MAP(CMainDialog)
    2424        MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog)
     25        MESSAGE_HANDLER(WM_DESTROY, OnDestroy)
    2526        COMMAND_ID_HANDLER(IDCANCEL, OnCommand)
    2627        COMMAND_ID_HANDLER(IDOK, OnCommand)
    2728END_MSG_MAP()
     29
     30private:
     31        CWindow m_PictureStatic;
     32        HBITMAP m_hPictureBitmap;
    2833
    2934public:
     
    3338        LRESULT OnInitDialog(UINT nMessage, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
    3439        {
     40                m_PictureStatic = GetDlgItem(IDC_PICTURE);
     41                m_hPictureBitmap = LoadBitmap(_AtlBaseModule.GetResourceInstance(), MAKEINTRESOURCE(IDB_PICTURE));
     42                ATLASSERT(m_hPictureBitmap);
     43                m_PictureStatic.SendMessage(STM_SETIMAGE, IMAGE_BITMAP, (LPARAM) m_hPictureBitmap);
    3544                ATLVERIFY(CenterWindow());
     45                return 0;
     46        }
     47        LRESULT OnDestroy(UINT nMessage, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
     48        {
     49                ATLVERIFY(DeleteObject(m_hPictureBitmap));
    3650                return 0;
    3751        }
  • trunk/Utilities/AtlDialogSample/AtlDialogSample.vcxproj

    r71 r122  
    141141  </ItemGroup>
    142142  <ItemGroup>
     143    <None Include="6uvaguzj.bmp" />
    143144    <None Include="AtlDialogSample.rgs" />
    144145    <None Include="ReadMe.txt" />
  • trunk/Utilities/AtlDialogSample/AtlDialogSample.vcxproj.filters

    r71 r122  
    5454      <Filter>Resource Files</Filter>
    5555    </None>
     56    <None Include="6uvaguzj.bmp">
     57      <Filter>Resource Files</Filter>
     58    </None>
    5659  </ItemGroup>
    5760  <ItemGroup>
  • trunk/Utilities/AtlDialogSample/AtlDialogSample_i.c

    r71 r122  
    77
    88 /* File created by MIDL compiler version 7.00.0555 */
    9 /* at Mon Jun 25 21:16:17 2012
     9/* at Mon Sep 10 23:56:05 2012
    1010 */
    1111/* Compiler settings for AtlDialogSample.idl:
  • trunk/Utilities/AtlDialogSample/AtlDialogSample_i.h

    r71 r122  
    55
    66 /* File created by MIDL compiler version 7.00.0555 */
    7 /* at Mon Jun 25 21:16:17 2012
     7/* at Mon Sep 10 23:56:05 2012
    88 */
    99/* Compiler settings for AtlDialogSample.idl:
Note: See TracChangeset for help on using the changeset viewer.