-
NOt REALLY UnDERstand!
Thanks,nvoight for last help.i think i can solve the previous problem already.in this question,i am not understand that much,so i would like to need urs help again. :)) Create a line editor where the left,right,home,end,delete,backspace keys function perfectly. how do that? give me specific on this problem,
generally,i know how to create a window first.But after that,
how is it going to start!! HELP >>> ###
-
read your help files or refer to msdn for examples on creating a window. Store lines in a linked list. Again refer to msdn for information on trapping keyboard messages. See what you can come up with some research. Post some code of your own if you want further help.
-
>Create a line editor where the left,right,home,end,delete,backspace keys function perfectly.
hm... you could just place a CEdit element on the window.
You wouldn't have to do anything yourself.
It's very hard for us to guess what you already know, or
how you want to do this, as there are many different ways.
So if you could provide us with an example of what you did
so far, I'm sure we can show you how to proceed.
-
I don't quite get what you want, but you could try the following:
you can poll any key (check if it's pressed or not) using the following fuction:
SHORT GetKeyState(int nVirtKey);
where nVirtKey is the virtual key code of the key you want to poll, you can replace it with
VK_LEFT
VK_RIGHT
VK_UP
VK_DOWN
VK_BACK_SPACE
VK_HOME
VK_END
VK_DELETE
check the high order bit, if it's 1, the key is pressed.
if you don't know how to check the high order bit, you can do it with a function like this:
int CheckHighBit(SHORT c)
{
SHORT mask=(0 ¦ (1<<(sizeof(SHORT)-1)));
if(c & mask)
{
return 1; //The high bit is on (The key is pressed)
}
else
{
return 0;
}
}
good luck
Oskilian