Xerox -07W & -11W Printer User Manual


 
13-12
Dynamic Data Exchange
Example 3
All key values are defined using key macro identifiers as documented in the Key
Reference Numbers appendix.
Read the keyboard macro assigned to the Shift + F6 key sequence.
Note: The highlighted characters Slave in
hWndSlaveDDE
are
only applicable to TeemTalk for Windows 3.1. They are not
to be included when using Windows 95 or NT.
.
.
char buf(128);
ReadKbdMacro(141, (LPSTR)buf, 127);
.
.
ReadKbdMacro(
int iKeyMacro, /* Key to be redefined */
LPSTR szKbdMacro, /* Pointer to redefinition string */
int iMacroLen /* Max allowed Length of
szMacroString */
)
{
ATOM aMacro;
int iStrLen;
aMacro = (ATOM)GetSetting(
hWnd,
hWndPartner,
IDM_MACROS,
NKEYSTRING,
iKeyIndex
);
if (aMacro == -1)
return - 1;
/* Convert received Atom to string */
iStrLen = GlobalGetAtomName(aMacro, szKbdMacro, iMacroLen);
GlobalDeleteAtom(aMacro);
return iStrLen;
}
GetSetting(HWND hWndSlaveDDE, HWND hWndPartner, int MenuID, int
DataGroup, int iValue)
{
DWORD lSetting;
ATOM aItem;
char buf[16];
int data;