PDA

View Full Version : Not able to get controls updation fron frameready



selvanathan
November 13, 2008, 12:49:13
Hello..
Please see the following..

void CListener::frameReady( Grabber& param, smart_ptr<MemBuffer> pBuffer, DWORD FrameNumber)
{
pBuffer->lock();

DrawBuffer(pBuffer);

Mydialog.EdBox();


pBuffer->unlock();
}

----------------
at bottom in dialog functions

CMydialog::EdBox()
{
UpdateData(true); --> this ends in error

m_edbox = "test"; // this is my edit box member variable

UpdateData(true);
}

from above UpdateData(true) ends in error.. plz give me the solution...

thanks in advance...
K.Selvanathan

Stefan Geissler
November 13, 2008, 12:54:19
It is no good idea to call the Update() function from the frameReady.
In order to to set the content of a CStatic, pass the window handle of the CStatic to a member of CListener.
In the frameReady you write m_edboxHWnd->SetWindowText("test");

This worked always fine for me.

selvanathan
November 13, 2008, 13:13:19
Hello Stefan,
Thank u for u r reply.... its working fine now...