首页 > 编程知识 正文

cedit最大容量,devc报错窗口没了

时间:2023-05-06 19:55:51 阅读:40410 作者:4631

iamcreatingamfcprogramusingthedocument/view architecture.intheviewicallonacellclassthatextendscedittodrawatextbox.thatworatwor whenitrytocatchalosefocusmessageforthattextboxnothinghappens.itriedtooverwritepretranslatemessagebutthatdidn ' twork。

here ' sthecodeinthecgridview.CPP class :

voidcgridview :3360 on插入文本(

{

CWnd* pParentWnd=this;

zddxrz pEdit=new热月饼(grid,pParentWnd );

Invalidate (;

}

the热月饼. cpp:

{

cedit.create (es _ multiline ) ws _ child|ws _ visible|ws _ tabstop|ws _ border,crect ) pcoordinates10,* ()

cell=p网格- getselectedcell (;

p网格设置(cell,' text ';

网格=p网格;

}

BEGIN_MESSAGE_MAP (热月饼,CEdit ) )。

ON_WM_KILLFOCUS ()

ON_WM_KEYDOWN ()

END_MESSAGE_MAP (

/热月饼消息处理程序

void热月饼:3360 Onkillfocus (cwnd * pnew wnd ) ) )。

{

cedit :3360 onkillfocus (pnew wnd );

网格集热月饼(cell,str );

cedit.DestroyWindow (;

}

(BOOL热月饼: 3360 pretranslatemessage (msg * pmsg ) ) ) ) ) ) ) )。

{

if(pmsg-message==WM_keydown ) )。

{

if(pmsg-wparam==vk_up ) ) )。

{

}

}

return cwnd :3360 pretranslatemessage (pmsg;

}

When I debug,theonkillfocusandpretranslatemessagearen ' tcalledatall。

Thanks,

youhavetohandletheen _ killfocusnotificationcodeintheparentwindow.you shouldn ' thavetoderivefromcedittodothat。

更新:

theparentwindowoftheeditcontrolreceivesthisnotificationcode

through a WM_COMMAND message。

waram : thelowordcontainstheidentifieroftheeditcontrol.the

lparam : -手持设备控制。

版权声明:该文观点仅代表作者本人。处理文章:请发送邮件至 三1五14八八95#扣扣.com 举报,一经查实,本站将立刻删除。