Hi all,
I am developing in Native C++ in a Win32 API environment using Visual Studio 2008. I need to determine if and when the Tab or Esc key is pressed when a listView is in Edit Mode within the LVN_ENDLABELEDIT notification.
I have tried sub-classing the system generated control without success. I can trap any other key but not the tab or escape keys. The excerpt from the sub-classed proc is:
switch(message)
{
case WM_CHAR:
switch(wParam)
{
case 0x09: // Tab
// Program lines
break;
case 0x1B: // Esc
// Program lines
break;
}
}
I have also tried to use the method as found in the Code Project example and can’t get it to work, excerpt as follows:
tchar = (TCHAR)msg.wParam;
if(tchar == 0x1b) escKey=1;
I would prefer to use the Code Project’s suggestion, if I can get it to work. Or. perhaps there is a better way. Any suggestions, comments etc would be appreciated.
Regards,
Richard