Tuesday, January 12, 2016
In smartphone2003 used to dynamically create EDIT control
There use to dynamically create multiple EDIT controls smartphone2003, and then switch the focus in different controls, how to achieve? You know of a reminder, thank you
Reply:
Do not understand think Zuosa, I want to do a painting out of the edit? Or want to be a generation of the program is running in edit? That I do not know, and relatively simple approach, in which all the load to be generated eidt generates out, as long as their visible = false on the line, and then to Zuosha ?
A edit loses focus, another edit displayed simultaneously receive focus? Comparison of benzene way to move the focus to other controls on a small, visible in the lostfocus edit1 own message = false, the next true, then setfocus to the next.
Reply:
If that is really going to be dynamically created, that seems to be not supported, the specific ominous do not want to mislead people, there is to know about claiming
Reply:
private TextBox Tb;
public Form1 ()
{
InitializeComponent ();
Tb = new TextBox ();
Tb.Text = "fanronghua";
Tb.Parent = this;
Tb.Left = 0;
Tb.Top = 0;
}
Reply:
Is that, in WinMain in CreateWindow (TEXT ("edit"), ...) the two EDIT, now switch focus to do, but there is a problem and input methods, in the alphabet, the back key VK_TBACK not catch the news
Reply:
Now solve the SendMessage (mbi.hwndMB, SHCMBM_OVERRIDEKEY, VK_TBACK,
MAKELPARAM (SHMBOF_NODEFAULT | SHMBOF_NOTIFY,
SHMBOF_NODEFAULT | SHMBOF_NOTIFY)); can handle TBACK, but must MENU, MENU can solve the problem there is not the way?
Reply:
Will switch the focus is how to do it?
Reply:
Try this and see!
MESSAGE_HANDLER (WM_KEYDOWN, OnKEYup)
LRESULT OnKEYup (UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL & amp; bHandled)
{
if (uMsg == 256)
{
SHSendBackToFocusWindow (WM_HOTKEY, 2, MAKELPARAM (MOD_KEYUP, VK_TBACK));
return 0;
}
return 0;
}
Reply:
Thank ren54, you can not use this method, this is my Win32 program, only with the original point of practice
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment