datetimepicker类-具有dts_appcanparse样式-无法跳出 [英] datetimepicker class - with dts_appcanparse style - can't tab out

查看:90
本文介绍了datetimepicker类-具有dts_appcanparse样式-无法跳出的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当用户完成编辑时,我得到了DTN_USERSTRING-请问用户何时完成编辑?输入日期后,TAB似乎不会生成此通知,我也不会得到dtn_keydown或其他任何信息;鼠标或按ALT似乎可以解决问题,但是我需要让TAB完成编辑并移至对话框中的下一个控件,而不会卡在DTP中。.有什么想法吗?

when the user finishes editing, i get the DTN_USERSTRING - begs the question when does the user finish editing? after typing the date, TAB doesn't seem to generate this notification, nor i get dtn_keydown or any other; mouse or pressing ALT seem to do the trick, but i need to make the TAB finish the edit and move to the next control in the dialog and not get stuck in the DTP.. any ideas?

一吨,
srini。

thanks a ton, srini.

引用:
文档:
http://msdn.microsoft.com/zh-CN/library /windows/desktop/bb761745(v=vs.85).aspx [^]
在用户输入完日期后调用该函数

references: documentation: http://msdn.microsoft.com/en-us/library/windows/desktop/bb761745(v=vs.85).aspx [^] the function is called after the user finishes entering the date

类似的问题:
参见 http://www.codeguru.com /forum/showthread.php?p=751286 [^]
(无响应)

similar problem: see http://www.codeguru.com/forum/showthread.php?p=751286 [^] (no response)

推荐答案

似乎当CDateTimeCtrl动态创建CEdit以允许免费编辑时,它在某种程度上失去了接收消息的能力。覆盖PreTranslateMessage()时,它甚至无法捕获VK_TAB。

Seems that when CDateTimeCtrl dynamically creates CEdit to allow free edit, then it some how looses the ability to receive messages. It cannot even catch VK_TAB when overriding PreTranslateMessage().

也许考虑使用与CDateTimeCtrl不同的控件:

Maybe consider to use a different control than CDateTimeCtrl:

http://www.codeproject.com/KB/miscctrl/datetimeeditctrl.aspx

这篇关于datetimepicker类-具有dts_appcanparse样式-无法跳出的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆