Programming with Microsoft Visual C++.NET 6ed [Electronic resources] نسخه متنی

اینجــــا یک کتابخانه دیجیتالی است

با بیش از 100000 منبع الکترونیکی رایگان به زبان فارسی ، عربی و انگلیسی

Programming with Microsoft Visual C++.NET 6ed [Electronic resources] - نسخه متنی

George Shepherd, David Kruglinski

| نمايش فراداده ، افزودن یک نقد و بررسی
افزودن به کتابخانه شخصی
ارسال به دوستان
جستجو در متن کتاب
بیشتر
تنظیمات قلم

فونت

اندازه قلم

+ - پیش فرض

حالت نمایش

روز نیمروز شب
جستجو در لغت نامه
بیشتر
توضیحات
افزودن یادداشت جدید








Picture Properties


Some ActiveX controls support picture properties, which can accommodate bitmaps, metafiles, and icons. If an ActiveX control has at least one picture property, Visual Studio .NET will generate a CPicture class in your project during the control's installation. You don't need to use this CPicture class, but you must use the MFC class CPictureHolder. To access the CPictureHolder class declaration and code, you need the following line in

StdAfx.h :

#include <afxctl.h>

Suppose you have an ActiveX control with a picture property named Picture. Here's how you set the Picture property to a bitmap in your program's resources:

CPictureHolder pict;
pict.CreateFromBitmap(IDB_MYBITMAP); // from project's resources
m_control.SetPicture(pict.GetPictureDispatch());





Note

If you include the AfxCtl.h file, you can't statically link your program with the MFC library. If you need a standalone program that supports picture properties, you'll have to borrow code from the CPictureHolder class, located in the \Program Files\Microsoft Visual Studio .NET\VC7\atlmfc\src\mfc\ctlpict.cpp file.



/ 319