12-08-2006, 12:28 PM
I have created a new macro containing this code:
int+ g_tbkb_aw=win
int tb=win("TOOLBAR19" "QM_Toolbar")
if(!tb) tb=mac("Toolbar19")
act id(9999 tb)
I have replaced Toolbar19 with the name of my virtual keyboard, that is a QM toolbar.
I have created a new function named tbkb_hook:
;/
function# hWnd message wParam lParam
int+ g_tbkb_aw
sel message
,case WM_COMMAND
,if(g_tbkb_aw and hWnd=win)
,,act g_tbkb_aw; err
,g_tbkb_aw=0
,
,case WM_ACTIVATE
,if(wParam=0) g_tbkb_aw=0
Now, when I execute the macro, the virtual keyboard appears and I see that the arrow keys allow me to move around the virtual buttons. Then I have tried to type some keys in Windows Notepad, but when I press the space bar, my virtual keyboard disappears, having written nothing in Notepad. I have noticed that now the virtual keyboard takes the focus, so that when it appears the Notepad window is no more active.
I think that perhaps the problem is that I have not understood your last phrase:
"assign it to the toolbar (in Properties)"
How shall I do it?
int+ g_tbkb_aw=win
int tb=win("TOOLBAR19" "QM_Toolbar")
if(!tb) tb=mac("Toolbar19")
act id(9999 tb)
I have replaced Toolbar19 with the name of my virtual keyboard, that is a QM toolbar.
I have created a new function named tbkb_hook:
;/
function# hWnd message wParam lParam
int+ g_tbkb_aw
sel message
,case WM_COMMAND
,if(g_tbkb_aw and hWnd=win)
,,act g_tbkb_aw; err
,g_tbkb_aw=0
,
,case WM_ACTIVATE
,if(wParam=0) g_tbkb_aw=0
Now, when I execute the macro, the virtual keyboard appears and I see that the arrow keys allow me to move around the virtual buttons. Then I have tried to type some keys in Windows Notepad, but when I press the space bar, my virtual keyboard disappears, having written nothing in Notepad. I have noticed that now the virtual keyboard takes the focus, so that when it appears the Notepad window is no more active.
I think that perhaps the problem is that I have not understood your last phrase:
"assign it to the toolbar (in Properties)"
How shall I do it?