quote:
Originally posted by SmokingCookie
Well, I've double-checked the EM_SETSEL, it is properly defined. I've just tried EM_GETSEL, starting and ending positions are both 0.
And thanks for adding a new word to my vocab
Seen your bump, reading now
Seen
I've been messing around with those macros, but can barely read them, due to all those casts Thanks for making it clear now
Well you got me at least one step further: now all text is selected, and I know why:
JScript code:
Number.prototype.LOWORD = function() {
return this & 0xFFFF;
}
Number.prototype.HIWORD = function() {
return (this >> 16) & 0xFFFF;
}
var MAKEWORD = function (a,b) {
return a | (b << 8);
}
var D = MAKEWORD(4,12);
Debug.Trace((4).toString(2));
Debug.Trace((12).toString(2));
Debug.Trace(D.toString(2));
Debug.Trace(D.LOWORD());
Debug.Trace(D.HIWORD());
Output:
Are you perhaps confusing MAKEWORD with MAKELONG ?
BYTE = 8-bit
WORD = 16-bit
DWORD/long = 32-bit
MAKEWORD takes two BYTEs and turns it into a WORD
MAKELONG takes two WORDs and turns it into a DWORD/LONG
LOWORD gets a WORD from a DWORD/LONG (first one passed to MAKELONG)
HIWORD " " " second one
I think in your code you intended to use MAKELONG instead of MAKEWORD, MAKELONG would be:
var MAKELONG = function(a,b) { return a|(b<<16); };