|
Can you use of WM_KEYDOWN/WM_KEYUP
|
|
|
|
|
Hello,
can be "PretranslateMessage(MSG* pMsg)" solution for this question?
Something like this:
BOOL CMyDialog::PreTranslateMessage(MSG* pMsg)
{
if(pMsg->message == WM_KEYDOWN)
{
if(pMsg->wParam == VK_DELETE)
{
}
}
return CDialog::PreTranslateMessage(pMsg);
}
regards
break;
|
|
|
|
|
Your answer is Yes;),but you must know one thing about WM_KEY*.if you have a control on your forum then you dont get any WM_KEY* because focus send to it control.Test this sibject with a dialog that first it has controls on itself again it doesnt have any control and see retuslt.
|
|
|
|
|
ok,
what is the right way to do this?
do you know some example for this?
tanks
break;
|
|
|
|
|
I found this function here:
ON_WM_KEYDOWN()
to use with:
OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags)
is that maybe te current way to catch key input?
|
|
|
|
|
Hi,
i used the below function on WM_KEYDOWN() message, but donno why it is not working.
It is not even detecting if i press any key. i dont know if ishould add something else.
Note:in the function "dummy" i have a messagebox to see if its working.
void CKeyboard1Dlg::OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags)
{
//char lsChar;
//lsChar=char(nChar);
switch(nChar)
{
case VK_DELETE:
dummy();
break;
default:
CString d1;
d1="ur code not worki";
MessageBox(d1);
}
CDialog::OnKeyDown(nChar, nRepCnt, nFlags);
}
and function prototype i used is in ".h"file is
"afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);"
Harsha
|
|
|
|
|
Hi,
have you add
ON_WM_KEYDOWN()
to your message map!
break;
|
|
|
|
|
Ya .. i have added on_wm_keydown().. its not worki even then.
Harsha
|
|
|
|
|
Do you have any controls on the forum?
|
|
|
|
|
this code is working.. thanks a lot
Harsha
|
|
|
|
|
Hi,
Right now i am able to delete single selected row from the listcontrol. Can you please tell me how to delete all those selected rows if i select more than one row from list control.(selection of rows can be done either by mouse click along with "Ctrl" button on keyboard or with the help of arrow buttons on keyboard along with Shift button)
Harsha
|
|
|
|
|
Use of GetFirstSelectedItemPosition/GetNextSelectedItem
|
|
|
|
|
thanks a lot..
|
|
|
|
|
You're welcome
|
|
|
|
|
Hi everybody, I have a problem with the project generator Wizard in Visual Studio, either in Visual Studio 2005 then in .NET 2003.
The problem is that it generate an empty project every kind of project I select in C/C++ Project (for "Empty Project" type an error occurs).
If I select to generate a VB, J#, C# Project all is OK.
I tried to remove and install a new istance of VS but the problem persist.
I'm going crazy, Can anybody suggets any solution to me?
Thanks.
|
|
|
|
|
Hi everybody, I have a problem with the project generator Wizard in Visual Studio, either in Visual Studio 2005 then in .NET 2003.
The problem is that it generate an empty project every kind of project I select in C/C++ Project (for "Empty Project" type an error occurs).
If I select to generate a VB, J#, C# Project all is OK.
I tried to remove and install a new istance of VS but the problem persist.
I'm going crazy, Can anybody suggets any solution to me?
Thanks.
DanCur
|
|
|
|
|
Can you expalin why you dont use of name for your account two same questions !?
|
|
|
|
|
|
Hi, I work in Visual C++ and if I try to generate an "Empty Project", I got an error that said "It's impossible to complete the operation. It's impossible to found the module requested", but more if I try to generate anyother type of C/C++ Project it's generate an empty project.
P.S. If I create Vb, J# or C# Project all is ok.
|
|
|
|
|
The real problem for me is that I can generate a new "MFC Application Project" or other C++ project. WHY?
|
|
|
|
|
Hello Experts,
I want to store the file structure saved in a CTreeCtrl into an MS Acess database using ODBC. I also want to have cut,copy,paste and delete functionality to manipulate data stored in the Database. Please help...
|
|
|
|
|
Did you see Database[^] section on the codeproject?
|
|
|
|
|
All,
Are there any way to get the source path (file path along with the file name) from MS Script Control ?
Let's assume, I have addded some peiece of code into the script engine. In that piece of code, I also have included few vbinc files by calling as below
include "C:\test\test.vbinc"
The code that i had added into the script engine are as follows:
'---------------------------------------------
option explicit
include "C:\test\test1.vbinc"
include "C:\test\test2.vbinc"
sub test1()
msgbox "hi1"
end sub
sub test2()
msgbox "hi2"
end sub
dim mymsg : mymsg = String(2,"hi")
function test4
if IsNull(mymsg) then
msgbox "hi3"
else
msgbox "hi4"
end if
end function
'---------------------------------------------
Now, if script engine found any error in the added code, i am able to get the source line and text using XActiveScriptSite::OnScriptError() function provided by MS Script Control. But not able to get the file name path i.e if any error or exception occured in the vbinc file as i need to tell the name and absolute path of the vbinc file name along with the line number and source text to the user.
Suggetions are most welcome.
Thanks in advance,
AKS
|
|
|
|
|
Hi, so here's my question:
Let's say I have typical menu with a File POPUP and various other MENUITEM strings specified under that, all of which are hotkeyed with ampersands. If I want the menu items to have little underlines underneath the letters which are used for the hotkeys (i.e. the way it actually looks in the VC++ resource editor), do I need to ownerdraw the menu? Or is there a simpler way to do it?
KR
|
|
|
|
|
KellyR wrote: I want the menu items to have little underlines underneath the letters which are used for the hotkeys
just put '&' before the character that you want underline..
eg :
&File
nave
|
|
|
|