|
Your link is dead...any updates ???
|
|
|
|
|
Hi!
I need an on screen keyboard that supports all languages, even Japanese with their IME way of entering charcters. I guess I could buy something but it would be cool to be able to tap into the Japanese IME character lib!?
All ideas appreciated!
|
|
|
|
|
Why did you use the Timer Routine?
|
|
|
|
|
There is an Error in the execute. (start->execute)
When you try to insert an command in the execute dialog and press the abort button, the keyboard stand still and the Windows XP also.
So you can't close the keyboard and so on.
You also can't start a new programm.
Does anyone have a solution for this problem?
|
|
|
|
|
Hello
I need to close the keyboard app from another app. I've assigned a dialog class name to the keyboard and app and have the window pointer. But when I sendmessage to it to close it doesn't. Any help would be great.
|
|
|
|
|
Hello,
when you have the window handle send following command message.
::SendMessage( hWndOnscreenKeboard, WM_COMMAND, IDM_EXIT, 0, 0);
IDM_EXIT is defined as 32773 in resource.h
|
|
|
|
|
This doesn't deal exactly with the question I asked before, but I thought I would post it here in hopes it might help someone else since it held me up for 3 days. I needed a onscreen keyboard that could display 3 different keyboard types. A standard keyboard, a block keyboard, and a numbers only keypad. The block has all the letters in a row I.E. A B C. Its for people that have trouble typing. I wanted the keyboard to be a seperate app, not a control on each form. This way I could use it in other apps. I used the code here and another that is linked in to here in a different message. The other code has the dialogs generated in memory instead of being in a resource file, which helps with the number pad. I needed to assign a class name to the dialog instead of using the default #32770. I needed to do this so I could read the title on the dialog to know which keyboard was being displayed. In this way the user can train the keyboard for each form and the location and keyboard type are stored in a xml file. Assigning a class name was easy with the original code, put a problem with the code that generated the template in memory. I haven't done c++ in years, doing vb.net for the last couple. So it took some time to get back into doing c++. While I found many references to the DLGTEMPLATE I couldn't find clear examples where they assigned the class name. Most had the class name defaulting. The docs said the class name is a sz_or_ord data type. Never found what kind of data type this is. Below is the code assignes the class name.
LPDLGTEMPLATE CKeyboardDialog::BuildDlgTemplate() const
{
USES_CONVERSION;
struct MYDLGTEMPLATE
{
DLGTEMPLATE data;
WORD wMenu;
WORD szWndClass[17];
wchar_t szCaption[1];
};
int len = sizeof(struct MYDLGTEMPLATE) + m_strCaption.GetLength()*sizeof(wchar_t);
struct MYDLGTEMPLATE* dlgtemplate = (struct MYDLGTEMPLATE*)malloc(len);
dlgtemplate->data. x = 0;
dlgtemplate->data. y = 0;
//dlgtemplate->data.cx = m_bNumeric ? 100 : 309;
//dlgtemplate->data.cy = m_bNumeric ? 92 : 88;
dlgtemplate->data.cx = m_bNumeric ? 60 : 278;
dlgtemplate->data.cy = m_bNumeric ? 78 : 64;
dlgtemplate->data.style = DS_SYSMODAL | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME;
dlgtemplate->data.dwExtendedStyle = WS_EX_TOOLWINDOW | WS_EX_CLIENTEDGE | WS_EX_APPWINDOW;
dlgtemplate->data.cdit = 0;
dlgtemplate->wMenu = 0;
MultiByteToWideChar(
CP_ACP,
0,
m_strClassName,
-1,
dlgtemplate->szWndClass,
sizeof(dlgtemplate->szWndClass) );
wcscpy(dlgtemplate->szCaption, T2CW(m_strCaption));
return &dlgtemplate->data;
}
The m_strClassName is OnScreenKBDClass
The docs did keep talking about the fact the the class name needed to be a MultiByteToWideChar so the above might be a no brainer.
Below is code the registor the class it comes from MSDN
BOOL CApp::InitInstance()
{
WNDCLASS wc;
// Get the info for this class.
// #32770 is the default class name for dialogs boxes.
::GetClassInfo(AfxGetInstanceHandle(), "#32770", &wc);
// Change the name of the class.
wc.lpszClassName = "OnScreenKBDClass";
// Register this class so that MFC can use it.
AfxRegisterClass(&wc);
Like I said I hope this helps some one else looking for an example.
Thanks for the creat code.
John
John Barnes
|
|
|
|
|
Hello
I am trying to use the built-in OSK (On-Screen Keyboard) that comes bundled with W2K and Win-XP. I need this inside a STATIC control in my dialog based app.
So, I use
ShellExecute(AfxGetMainWnd()->m_hWnd,_T("open"),_T("osk.exe"), NULL, NULL, SW_SHOWMINIMIZED );
And do a bit of gymnastics to resize it into the static, remove the menu and the caption through using the following:
CMenu* pMenu = cOsk->GetMenu();
if(pMenu) // We don't want the users to 'Play' with any of the functions
{
pMenu->DeleteMenu(3,MF_BYPOSITION);
pMenu->DeleteMenu(2,MF_BYPOSITION);
pMenu->DeleteMenu(1,MF_BYPOSITION);
pMenu->DeleteMenu(0,MF_BYPOSITION);
}
cOsk->ModifyStyle(WS_CAPTION | WS_THICKFRAME ,WS_POPUP, SWP_NOSIZE );
cOsk->DrawMenuBar();
It all works fine as intended, but the initial load of the OSK flickers at the default place on screen, and only after that gets moved through ha call to MoveWindow() to where I need it
If anyone has any idea on how to load the OSK in a “Silent” mode, so that I can do what I want and only then show it to the user – please tell..
Cheers
Alex
|
|
|
|
|
hi.. uhmm i saw ur post in the Onscreen keyboard to be used by applications. I have a winform application and im tryin to call the onscreen keyboard but without the menu. how do u do it? I cant understant the code you posted with the -> and stuff. could u make the code clear or somehow readable? thnx
ej
|
|
|
|
|
oh its c++ lol... thats why i dont have a clue. hope u have a c# format
|
|
|
|
|
I want to send keys to remote desktop logon window, but it does not response, no characters is sent.
The application is launch at "Start->Programs->Accessories->Communications->Remote Desktop Connection", which is a Terminal Service Client. It will popup a logon window for you to input password..., the code is below
>Sleep(2000); // delay for you to SET FOCUS on the application
>keybd_event( 0x30, 0, 0, 0); // key '0'
>keybd_event( 0x30, 0, KEYEVENTF_KEYUP, 0);
Why? Thanks.
|
|
|
|
|
Is there any way to show on the keys of the Onscreen Keyboard
characters belonging to the Czech or Polish languages (I
mean those two-byte encoded letters with strange
accents on them, for example) and of course send them to the
window which has the input focus ?
My purpose is to use the PC hardware keyboard (English layout)
for "normal letters" and the Onscreen Keyboard for "strange"
(accented) ones ...
Thank you in advance for your help.
Duranti Loris.
|
|
|
|
|
Hi all,
Instead of creting the buttons if i drag and drog the buttons and make them ownerdraw on the dialog box and and try to sendthe messages to the background applications the sequence in which the keystroke generate shold be WM_KEYDOWN ->WM_CHAR->WM_KEYUP but its coming as WM_KEYDOWN->WM_KEYUP-> WM_CHAR for me for the following code can any one help me
void MyDialog::GenerateKeyStroke(UINT nVirtualKeyCode)
{
CMainWindow *pView= (CMainWindow*)GetParent();
LPARAM lParam;
lParam = MapVirtualKey(nVirtualKeyCode, 0) ;
//scan code are from 16-23 in lparam
lParam <<= 16;
//since repeat count is one
lParam++;
pView->PostMessage(WM_KEYDOWN , nVirtualKeyCode , lParam ) ;
lParam |= 0xC0000000;
Sleep(0);
pView->PostMessage(WM_KEYUP , nVirtualKeyCode , lParam ) ;
}
and I shold use only PostMessage can any one help adn if press Alt key System keyevents should generate for me what should i do for that
|
|
|
|
|
Hi all,
Instead of creting the buttons if i drag and drog the buttons and make them ownerdraw on the dialog box and and try to sendthe messages to the background applications the sequence in which the keystroke generate shold be WM_KEYDOWN ->WM_CHAR->WM_KEYUP but its coming as WM_KEYDOWN->WM_KEYUP-> WM_CHAR for me for the following code can any one help me
void MyDialog::GenerateKeyStroke(UINT nVirtualKeyCode)
{
CMainWindow *pView= (CMainWindow*)GetParent();
LPARAM lParam;
lParam = MapVirtualKey(nVirtualKeyCode, 0) ;
//scan code are from 16-23 in lparam
lParam <<= 16;
//since repeat count is one
lParam++;
pView->PostMessage(WM_KEYDOWN , nVirtualKeyCode , lParam ) ;
lParam |= 0xC0000000;
Sleep(0);
pView->PostMessage(WM_KEYUP , nVirtualKeyCode , lParam ) ;
}
and I shold use only PostMessage can any one help adn if press Alt key System keyevents should generate for me what should i do for that
|
|
|
|
|
i am trying to compile the source code in visual c++ 6.0 but it has given me four errors please help
|
|
|
|
|
If you get error's like "'argument' : conversion from 'int' to 'char', possible loss of data"
then go to the project settings and uncheck the checkbox that say 'warning as errors'.
or try to solve them
|
|
|
|
|
could anyone please teach me how do i go about in comopiling the virtual keyboard. as i tried to compile it gave 4 errors while trying to link the executable file.
thanks
|
|
|
|
|
i got the same problem..
OnscreenKeyboard.obj : error LNK2001: unresolved external symbol "public: __thiscall COnscreenKeyboardDlg::COnscreenKeyboardDlg(class CWnd *)" (??0COnscreenKeyboardDlg@@QAE@PAVCWnd@@@Z)
OnscreenKeyboard.obj : error LNK2001: unresolved external symbol "public: virtual __thiscall CSystemTray::~CSystemTray(void)" (??1CSystemTray@@UAE@XZ)
msvcrtd.lib(crtexe.obj) : error LNK2001: unresolved external symbol _main
Debug/OnscreenKeyboard.exe : fatal error LNK1120: 3 unresolved externals
|
|
|
|
|
In Visual Studio you set the following setting within the project. The compile should succeed after this.
"Use MFC in a Static Library"
|
|
|
|
|
what program did u use to compile this onscreen keyboard??
|
|
|
|
|
|
hi there, thanks for replying me. i would appreciate if u could answer another of my enquiry. regarding the onscreen keyboard.. how do u approach the allocating of memory resource like how do u link the typing of each letter to the notepad, and how does the clicking of the mouse on a particular letter link it to the correct letter that is to be shown .. and which part of the code is to create the whole keyboard.
thanks if u could help mi here
regards
|
|
|
|
|
;PI don't use code on-screen keyboard because code have debug I can't to edit code
da
|
|
|
|
|
The text appear very slowly when sending to MSN messenger text box.
n e ideas ?
|
|
|
|
|
did you get any help with this as i also have this problem, have uninstalled it messenger cleared temp file and cleared all cache.
And still i have the problem any ideas?
sunnyaaabbb@hotmail.com
|
|
|
|