VC++实现的软键盘功能(附源码)

  VC++开发常用功能一系列文章 (欢迎订阅,持续更新...)

 软键盘界面如下:

置于桌面窗口最顶层:

VC++实现的软键盘功能(附源码)_第1张图片

置顶介绍:

		if (hwnd = FindWindow(NULL, szTitle))
		{
			// Bring it to the top of Z order and active it.
			BringWindowToTop (hwnd);
			// Bring key input into this window.
			SetForegroundWindow (hwnd);
			// Display as normal window
			ShowWindow (hwnd, nCmdShow);
		}

采用mouse hook

    // Mouse hook.
    if (!(hhkMouse = SetWindowsHookEx(WH_MOUSE, (HOOKPROC)MouseProc, g_hinstance, 0)))
        return FALSE;

点击鼠标响应对应键盘消息,实现软键盘功能...

上源码:

 
 

你可能感兴趣的:(VC++常用功能封装代码,VC++实现的软键盘功能,MFC实现的软键盘功能,VC++软键盘附源码)