From: Chris on 12 Jan 2010 20:50 I use MFC 4.2. I need to use CImageList::DrawIndirect but MFC 4.2 does not support this function. Is there any replacement for this function which has the same goal.. Thank you very much.
From: David Ching on 12 Jan 2010 20:58 "Chris" <Chris(a)discussions.microsoft.com> wrote in message news:5239A22A-8B16-4940-8C0F-01A31EDD7613(a)microsoft.com... > I use MFC 4.2. > > I need to use CImageList::DrawIndirect but MFC 4.2 does not support this > function. Is there any replacement for this function which has the same > goal.. > > Thank you very much. I don't know, but what I would do is look at the source code in the MFC version that does have the function and see if you can copy/paste it into the MFC 4.2 one. Or put it in your code (e.g. CMyImageList which derives from CImageList) and not MFC to avoid maintenance issues. -- David
From: Joseph M. Newcomer on 13 Jan 2010 00:00 There is a common misconception that if a function exists, the only way it can be called from MFC is by an MFC method of a class. Of course, these methods are just trivial wrappers on existing objects. So all that is required is to call the ImageList_DrawIndirect method from some earlier version of MFC is to simply call that function, as defined in CommCtrl.h, passing in the image list parameter represented by 'this' directly. As David points out, you can trivially derive a class that implements this feature. Or you can just call it directly, extracting the right parameter from the object. It takes less than five minutes to discover this, including the fact that the m_hImageList member of the CImageList class is the handle to the image list. It does require that you have a version of the header file for CommCtrl.h that defines the interface, and is compatible with VS4.2, so you may have to actually define the extern symbol if you can't find one, but that isn't high tech either, just typing. joe On Tue, 12 Jan 2010 17:58:24 -0800, "David Ching" <dc(a)remove-this.dcsoft.com> wrote: >"Chris" <Chris(a)discussions.microsoft.com> wrote in message >news:5239A22A-8B16-4940-8C0F-01A31EDD7613(a)microsoft.com... >> I use MFC 4.2. >> >> I need to use CImageList::DrawIndirect but MFC 4.2 does not support this >> function. Is there any replacement for this function which has the same >> goal.. >> >> Thank you very much. > >I don't know, but what I would do is look at the source code in the MFC >version that does have the function and see if you can copy/paste it into >the MFC 4.2 one. Or put it in your code (e.g. CMyImageList which derives >from CImageList) and not MFC to avoid maintenance issues. > >-- David Joseph M. Newcomer [MVP] email: newcomer(a)flounder.com Web: http://www.flounder.com MVP Tips: http://www.flounder.com/mvp_tips.htm
|
Pages: 1 Prev: How To Show Drag Image while Dragging Item? Next: Is it a bug in mciSendCommand function? |