LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to get a windows handle for an edit box on a dialog

我想在程序中做一个软键盘程序,因为windows自带的软键盘太难看也不好用(我是在一个平板触摸屏的工控机上用的)。工作过程是这样的:在一个对话框上有一个编辑框,当点击它时,会自动弹出自制的软键盘。然后通过软键盘向编辑框里发消息SendMessage输入数据。

我发现要找到对话框里编辑框的句柄是一件困难的事,我不能用GetDialogItem来获得,因为我不能象VC一样,根本不知这个编辑框的标识号,况且我也知道这个编辑框在windows下的句柄handler与labview里的引用号refnum是二码事。请指导一二如何做。谢谢

I plan to make a soft keyboard in my program because windows' keyboard is not good enough. The working procudure is : a edit box  is on a dialog, when click the edit box, it pops up a self-made keyboard, then I send message to the edit box to input the digit into it .

I found it difficult to ge the edit box handler in a dialog in labview enviroment. I can not get it by GetDialogItem() function lick VC does because i donot know the ID for edit box. besides, I know it is different between windows handler and labview refnum. please tell me how to get a windows handler for an edit box on a dialog. thanks a lot

0 Kudos
Message 1 of 3
(3,903 Views)

I think you have posted your question in the wrong place. This forum is for LabVIEW - not C.

 

Mike...


Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 2 of 3
(3,816 Views)

I'm not sure I understand you correctly.

If the dialog window is made in LabVIEW, the "edit box" (we called it string control) is not a Windows object, therefore it has no handle.

Alternatively, you can send "tab key" to the dialog window repeatly, until the "edit box" gets focus.  Then send message to the dialog window, instead of the "edit box".

 

Good luck.

 

 

George Zou
0 Kudos
Message 3 of 3
(3,802 Views)