HRESULT CTxtWinHost::TxNotify(DWORD iNotify, void *pv) { if( iNotify == EN_REQUESTRESIZE ) { RECT rc; REQRESIZE *preqsz = (REQRESIZE *)pv; GetControlRect(&rc); rc.bottom = rc.top + preqsz->rc.bottom + HOST_BORDER; rc.right = rc.left + preqsz->rc.right + HOST_BORDER; rc.top -= HOST_BORDER; rc.left -= HOST_BORDER; SetClientRect(&rc, TRUE); return S_OK; } if(iNotify==EN_CHANGE) { // it shall run here but it don't int a=0 ; sleep(1000); } // Forward this to the container if (pnc) { (*pnc)(iNotify); } if(!cfCallBackFun.isEmpty()) cfCallBackFun(iNotify); if (iNotify==EN_OLEOPFAILED) { return S_FALSE; } return S_OK; }
Quote:Rich Edit: To receive EN_CHANGE notification codes, specify ENM_CHANGE in the mask sent with the EM_SETEVENTMASK message.
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)