Click here to Skip to main content
15,911,317 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: is is posible to store GIF as resource? Pin
PengFeidu11-Sep-03 1:21
PengFeidu11-Sep-03 1:21 
GeneralRe: is is posible to store GIF as resource? Pin
vgrigor11-Sep-03 1:30
vgrigor11-Sep-03 1:30 
GeneralRe: is is posible to store GIF as resource? Pin
PengFeidu11-Sep-03 1:41
PengFeidu11-Sep-03 1:41 
GeneralRe: is is posible to store GIF as resource? Pin
vgrigor11-Sep-03 1:47
vgrigor11-Sep-03 1:47 
GeneralRe: is is posible to store GIF as resource? Pin
PengFeidu11-Sep-03 2:01
PengFeidu11-Sep-03 2:01 
GeneralRe: is is posible to store GIF as resource? Pin
Dangleberry11-Sep-03 2:45
sussDangleberry11-Sep-03 2:45 
GeneralRe: is is posible to store GIF as resource? Pin
JWood11-Sep-03 14:24
JWood11-Sep-03 14:24 
QuestionHow correctly Deactivate IPictureDisp* based control ? Pin
vgrigor11-Sep-03 0:40
vgrigor11-Sep-03 0:40 
I have control like ATLButton(MSDN) , based
on IPictureDisp* property- to make picture incorporated into
resource,

and if I simply insert such a control into a dialog and
set picture to that property - after closing dialog there is
MEMORY LEAK.

But if I create control by hand as



code:--------------------------------------------------------------------------------
create:
//------------------------------
if(m_pAtlButton ==0)
m_pAtlButton = new CAtlbutton1;

m_pAtlButton->Create("","",WS_VISIBLE | WS_CHILD, CRect(100,100,200,200),this,IDC_ATLBUTTON1);


CDataExchange dx(this,0);

CComPtr<ipicturedisp> p;

USES_CONVERSION;
OleLoadPicturePath( A2W("E:\\CODE\\River 1.1\\Pictures\\recuperator_alarm.jpg"),
0,0,0,
IID_IPictureDisp, (void**)&p);

DDX_Control(&dx, IDC_ATLBUTTON1, *m_pAtlButton);


m_pAtlButton->putref_PictureStatic(p); //call by CDialog
//Or so: //m_pAtlButton->put_PictureStatic(p);

//-------------------
delete
if(m_pAtlButton )
{
m_pAtlButton->DestroyWindow();
m_pAtlButton->InternalRelease();
delete m_pAtlButton;//->DestroyWindow();
m_pAtlButton =0;

this->Invalidate();
this->UpdateWindow();
}

//------------------------------

at control
[propputref, id(8)]
HRESULT PictureSecond([in]IPictureDisp* pPicture);
[propput, id(8)]
HRESULT PictureSecond([in]IPictureDisp* pPicture);
[propget, id(8)]
HRESULT PictureSecond([out, retval]IPictureDisp** ppPicture);


--------------------------------------------------------------------------------


and than delete it - all works correctly. No memory leaks.

What I must do that usual CDialog not cause
memory leak?
And where it happen?

Thanks you.
GeneralRGB <--> YUV Pin
Pawel Olszewski11-Sep-03 0:29
Pawel Olszewski11-Sep-03 0:29 
GeneralRe: RGB &lt;--&gt; YUV Pin
selfk11-Sep-03 1:27
selfk11-Sep-03 1:27 
GeneralRe: RGB &lt;--&gt; YUV Pin
Pawel Olszewski11-Sep-03 2:28
Pawel Olszewski11-Sep-03 2:28 
GeneralQues related to snmp Pin
SatyaDY11-Sep-03 0:19
SatyaDY11-Sep-03 0:19 
QuestionHow to put an icon in .ico file on a toolbar button? Pin
gumber11-Sep-03 0:05
gumber11-Sep-03 0:05 
AnswerRe: How to put an icon in .ico file on a toolbar button? Pin
Dominik Reichl11-Sep-03 0:19
Dominik Reichl11-Sep-03 0:19 
GeneralNo activation of window Pin
Bjarne Jørgensen11-Sep-03 0:03
Bjarne Jørgensen11-Sep-03 0:03 
GeneralRe: No activation of window Pin
Dominik Reichl11-Sep-03 0:23
Dominik Reichl11-Sep-03 0:23 
GeneralRe: No activation of window Pin
Bjarne Jørgensen11-Sep-03 0:59
Bjarne Jørgensen11-Sep-03 0:59 
GeneralLibraries Pin
Zizilamoroso10-Sep-03 23:42
Zizilamoroso10-Sep-03 23:42 
GeneralRe: Libraries Pin
jhwurmbach10-Sep-03 23:52
jhwurmbach10-Sep-03 23:52 
GeneralRe: Libraries Pin
Zizilamoroso11-Sep-03 0:13
Zizilamoroso11-Sep-03 0:13 
GeneralRe: Libraries Pin
jhwurmbach11-Sep-03 1:16
jhwurmbach11-Sep-03 1:16 
GeneralRe: Libraries Pin
Zizilamoroso11-Sep-03 2:08
Zizilamoroso11-Sep-03 2:08 
GeneralRe: Libraries Pin
jhwurmbach11-Sep-03 2:10
jhwurmbach11-Sep-03 2:10 
GeneralDialog Help Pin
10-Sep-03 23:23
suss10-Sep-03 23:23 
GeneralRe: Dialog Help Pin
Iain Clarke, Warrior Programmer10-Sep-03 23:44
Iain Clarke, Warrior Programmer10-Sep-03 23:44 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.