Click here to Skip to main content
15,914,594 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Chaging Characters; Pin
jhwurmbach15-Dec-03 20:26
jhwurmbach15-Dec-03 20:26 
GeneralGetPrinter return incorrect info about SharedPrinter. Pin
Anonymous15-Dec-03 18:50
Anonymous15-Dec-03 18:50 
Generalregd CList Pin
karteek15-Dec-03 18:49
karteek15-Dec-03 18:49 
GeneralRe: regd CList Pin
Prakash Nadar15-Dec-03 19:41
Prakash Nadar15-Dec-03 19:41 
GeneralRe: regd CList Pin
karteek15-Dec-03 20:40
karteek15-Dec-03 20:40 
GeneralRe: regd CList Pin
Prakash Nadar15-Dec-03 23:06
Prakash Nadar15-Dec-03 23:06 
GeneralRe: regd CList Pin
David Crow16-Dec-03 4:30
David Crow16-Dec-03 4:30 
GeneralHandling keyboard events in CDialog Pin
suneetchandok15-Dec-03 18:44
susssuneetchandok15-Dec-03 18:44 
Hi guys
I have a problem similar to this>
There is class A which is derived from CDialog.
I have no. of other classes which are derived from class A for creating dialog boxes.
I need to handle keyboard events in my dialog boxes.
If I add ON_WM_SYSCOMMAND()message and following functions in class A

void A::DoDataExchange(CDataExchange* pDX)
{
A::DoDataExchange(pDX);
}

and then handle keyboard events in

BOOL A::PreTranslateMessage(MSG* pMsg)
{
QB_ASSERT( pMsg, return FALSE;);

if (pMsg->message == WM_KEYDOWN)
{
if (pMsg->wParam == VK_F1 || pMsg->wParam == VK_ESCAPE)
{
//I will handle my keyboard event here
}
}

return CDialog::PreTranslateMessage(pMsg);
} //A::PreTranslateMessage

Will i be able to handle keyboard events in my classes that are derived from class A. I don;t want to add the redunudant code to my all derived classes.
Help me with your kind suggestions.
Regards
Chandok
GeneralRe: Handling keyboard events in CDialog Pin
Anthony_Yio15-Dec-03 23:15
Anthony_Yio15-Dec-03 23:15 
GeneralCustom error messages in IE Pin
Vermithrax15-Dec-03 11:15
Vermithrax15-Dec-03 11:15 
GeneralJust for sh*ts & giggles... Pin
Shog915-Dec-03 17:21
sitebuilderShog915-Dec-03 17:21 
GeneralRe: Just for sh*ts & giggles... Pin
Vermithrax15-Dec-03 18:14
Vermithrax15-Dec-03 18:14 
GeneralRe: Just for sh*ts & giggles... Pin
Shog915-Dec-03 18:24
sitebuilderShog915-Dec-03 18:24 
GeneralRe: Just for sh*ts & giggles... Pin
Vermithrax15-Dec-03 18:27
Vermithrax15-Dec-03 18:27 
GeneralHaven't tried it myself, but... Pin
Shog915-Dec-03 18:29
sitebuilderShog915-Dec-03 18:29 
GeneralRe: Haven't tried it myself, but... Pin
Vermithrax15-Dec-03 18:34
Vermithrax15-Dec-03 18:34 
GeneralRe: Just for sh*ts & giggles... Pin
Vermithrax15-Dec-03 18:31
Vermithrax15-Dec-03 18:31 
GeneralRe: Just for sh*ts & giggles... Pin
Vermithrax15-Dec-03 18:51
Vermithrax15-Dec-03 18:51 
GeneralRe: Just for sh*ts & giggles... Pin
Shog915-Dec-03 19:23
sitebuilderShog915-Dec-03 19:23 
Generalip address Pin
aroraavinash15-Dec-03 11:10
aroraavinash15-Dec-03 11:10 
GeneralRe: ip address Pin
Ravi Bhavnani15-Dec-03 13:13
professionalRavi Bhavnani15-Dec-03 13:13 
GeneralRe: ip address Pin
aroraavinash15-Dec-03 13:21
aroraavinash15-Dec-03 13:21 
GeneralRe: ip address Pin
Ravi Bhavnani15-Dec-03 13:32
professionalRavi Bhavnani15-Dec-03 13:32 
GeneralRe: ip address Pin
Roger Wright15-Dec-03 20:02
professionalRoger Wright15-Dec-03 20:02 
GeneralRe: ip address Pin
Bob Stanneveld15-Dec-03 21:13
Bob Stanneveld15-Dec-03 21:13 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.