-
August 22nd, 2013, 02:14 AM
#1
Keyboard event handling on List view
Hi all,
In my win 32 application,I have adilaog box and inside that one list view control to display some records.I want to use Find dialogue box for this List view.
1.How can i identify Cntrl+f event under LVN_KEYDOWN
2.I registered the FINDMESSAGESTRING in Win main function.and written the handler for FR_FINDNXT on default case of DialogProc.But control is not going to this handler.
Code:
//Dialog procedure
extern UINT uFindReplaceMsg; // message identifier FINDMSGSTRING decared and registerd in main file
HWND HdlgFindOrReplce = NULL; // handle to Find dialog box
LRESULT CALLBACK DlgtProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
switch (uMsg)
{
case WM_INITDIALOG://setting the items & subitem values
break;
case WM_NOTIFY:
switch(LOWORD(wParam))
{
case IDC_LISTVIEW:
switch(((LPNMHDR)lParam)->code)
{
case LVN_KEYDOWN:
//wat condition i have to write for Cntrl+F??
//creating the find dialog box
break;
}
break;
}
break;
default:
{
LPFINDREPLACE lpfr;
if ( uMsg == uFindReplaceMsg)
{
// Get pointer to FINDREPLACE structure from lParam.
lpfr = (LPFINDREPLACE)lParam;
// If the FR_DIALOGTERM flag is set,
// invalidate the handle identifying the dialog box.
if (lpfr->Flags & FR_DIALOGTERM)
{
HdlgFindOrReplce = NULL;
return 0;
}
// If the FR_FINDNEXT flag is set,
// call the application-defined search routine
// to search for the requested string.
if ((lpfr->Flags & FR_FINDNEXT))
{//Handler of find next
}
}
}
}
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|