|
PLZ HELP ME IN UNDERSTANDING THE CODE OF ONSCREEN KEY BOARD IF U HAVE ANY DOCUMENTATION OF THIS CODE PLZ SEND ME.
|
|
|
|
|
The code seems pretty straight forward to me. What exactly is that you do not understand?
"Hmmm, I wonder if this guy knows about the VCF?
That's what all the cool programmers are using according to Jenna Jameson." - Jim Crafton.
|
|
|
|
|
Is there a way to change the initial size so that it is about twice the size upon loading? Also, I noticed the mouse cursor hides because of MA_NOACTIVATE but is there a way to change the color of the key pressed so the user can know what key they are on? Thanks for any help.
|
|
|
|
|
ya i also was wondering how to write the code so tat we would know which key we r pressing.Maybe by hilighting the keys when the moouse cursor is move over the keys...i know by using OnMouseMove can solve this problem...but i dunno how to make it got color on the key....
|
|
|
|
|
check this site, its a great onscreen virtual keyboard, in all languages
http://www.gate2home.com
|
|
|
|
|
|
But rather useless in this articles context...
|
|
|
|
|
Hi and Greetings,
In observing the spirit of holidays,
I just added an enhancement to this interesting program.
First, I don't know where is the proper place to upload it.
For now, please check:
http://home.netcom.com/~chiuliang_chang/id4.html[^]
This enhancement including:
. Hot key to fill in login and password
. Hot key to exit the keyboard
. Moving the keyboard
. Colorized the keyboard
. English/Chinese mode
My thanks go to the original author, his framework,
and posters' suggestions. Happy holidays all!
-Richard
|
|
|
|
|
Dear Richard:
I have reviewed about your codes and found you has solved the problem about flash. Can you tell me how to do?
Thanks....
|
|
|
|
|
Hello JYCiou,
It seems that you had the chance to get at Richard's page before it went unavailable.
Do you know where can it be located now?
Thanks in advance,
Homero De la Garza
|
|
|
|
|
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
|
|
|
|