Click here to Skip to main content
13,043,092 members (58,685 online)
Click here to Skip to main content

Stats

21.2K views
1.5K downloads
16 bookmarked
Posted 13 Aug 2012

Loading keyboard layout (KbdLayerDescriptor) in 32/64-bit environment

, 13 Aug 2012
When loading a keyboard dll as a 32-bit application on a 64-bit system, the keyboard-dll-files does not work as expected, this class fixes that problem
// KeyboardLayoutDlg.h : header file
//

#pragma once
#include "afxcmn.h"
#include "KLL.h"
#include "afxwin.h"
#include "KeyboardScanCode.h"


// CKeyboardLayoutDlg dialog
class CKeyboardLayoutDlg : public CDialogEx
{
// Construction
public:
	CKeyboardLayoutDlg(CWnd* pParent = NULL);	// standard constructor

// Dialog Data
	enum { IDD = IDD_KEYBOARDLAYOUT_DIALOG };

	protected:
	virtual void DoDataExchange(CDataExchange* pDX);	// DDX/DDV support


// Implementation
protected:
	HICON m_hIcon;

	//Sets welcome info and listview columns
	void SetListView();

	// List for showing chars and VK related
	CListCtrl m_list;

	//The Keyboard Layout Loader (KLL) manage 32/64-bit loading between
	CKLL m_kll;

	//Scan code presentation to comparison of the layout in "real life"
	CKeyboardScanCode *pScanCodeDlg;

	// Generated message map functions
	virtual BOOL OnInitDialog();
	afx_msg void OnPaint();
	afx_msg HCURSOR OnQueryDragIcon();
	DECLARE_MESSAGE_MAP()
public:
	afx_msg void OnBnClickedOk();
	afx_msg void OnBnClickedCancel();
	afx_msg void OnBnClickedLoadkbl();
	CStatic m_system;
	CStatic m_dll;
	afx_msg void OnBnClickedShowscancode();
	CButton m_scancodes;
};

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Microsoft Public License (Ms-PL)

Share

About the Author

Lars [Large] Werner
Engineer
Norway Norway
----------------------------------
Visit http://lars.werner.no/ for my blog!
----------------------------------
Retired programmer, Norway never had the jobs I wanted Smile | :)

You may also be interested in...

Pro
Pro
Permalink | Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.170713.1 | Last Updated 13 Aug 2012
Article Copyright 2012 by Lars [Large] Werner
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid