Click here to Skip to main content
15,924,367 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: CoInitialize and COM Pin
Stephane Rodriguez.18-Sep-02 9:42
Stephane Rodriguez.18-Sep-02 9:42 
GeneralRe: CoInitialize and COM Pin
Michael Dunn18-Sep-02 9:21
sitebuilderMichael Dunn18-Sep-02 9:21 
QuestionIs it me or PVCS's crappy API? Pin
brianwelsch18-Sep-02 8:15
brianwelsch18-Sep-02 8:15 
AnswerRe: Is it me or PVCS's crappy API? Pin
Tim Smith18-Sep-02 8:36
Tim Smith18-Sep-02 8:36 
GeneralAHHHHHH! * A U T O C O M P L E T E * Pin
Nitron18-Sep-02 8:03
Nitron18-Sep-02 8:03 
GeneralRe: AHHHHHH! * A U T O C O M P L E T E * Pin
Daniel Turini18-Sep-02 8:05
Daniel Turini18-Sep-02 8:05 
GeneralRe: AHHHHHH! * A U T O C O M P L E T E * Pin
Nitron18-Sep-02 9:15
Nitron18-Sep-02 9:15 
QuestionHow to catch VK_LEFT and CTRL, SHIFT, ALT Pin
Ted Christiansen18-Sep-02 7:50
Ted Christiansen18-Sep-02 7:50 
Hello,

How can I properly catch key combinations of VK_LEFT (left arrow) and no keys, CTRL, SHIFT, or ALT? Here is the code I have been trying with no luck. The switch for the cursor key works but if statements for the CTRL, SHIFT, etc do not. What am I missing?

Ted


/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
void CFEvisGLView::OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags)
{
// ALT + arrow keys -> rotate, clockwise/counterclockwise
// SHIFT + arrow keys -> rotate, 90 degree delta
// CTRL + arrow keys -> pan model

switch (nChar) {
case VK_LEFT: // left cursor
if (GetKeyState(VK_CONTROL) == 1) {
// pan left
}
else if (GetKeyState(VK_SHIFT) == 1) {
// rotate horizontally or vertically 90 deg
}
else if (GetKeyState(VK_MENU) == 1) {
// rotate clockwise/counterclockwise
}
else {
// rotate horizontally or vertically
pCamera->Yaw(-10);
}
break;
}
}
AnswerRe: How to catch VK_LEFT and CTRL, SHIFT, ALT Pin
Bill S18-Sep-02 9:23
professionalBill S18-Sep-02 9:23 
GeneralQuestion about recv() in Winsock Pin
nachilau18-Sep-02 7:07
nachilau18-Sep-02 7:07 
GeneralRe: Question about recv() in Winsock Pin
jmkhael18-Sep-02 7:22
jmkhael18-Sep-02 7:22 
GeneralRe: Question about recv() in Winsock Pin
nachilau18-Sep-02 8:35
nachilau18-Sep-02 8:35 
GeneralMTS Pin
Mazdak18-Sep-02 6:54
Mazdak18-Sep-02 6:54 
GeneralRe: MTS Pin
Daniel Turini18-Sep-02 8:26
Daniel Turini18-Sep-02 8:26 
GeneralRe: MTS Pin
Mazdak18-Sep-02 8:49
Mazdak18-Sep-02 8:49 
GeneralCVS and VC++ Pin
Jawache18-Sep-02 5:50
Jawache18-Sep-02 5:50 
GeneralRe: CVS and VC++ Pin
Pavel Klocek18-Sep-02 6:14
Pavel Klocek18-Sep-02 6:14 
GeneralRe: CVS and VC++ Pin
Jawache18-Sep-02 6:20
Jawache18-Sep-02 6:20 
GeneralRe: CVS and VC++ Pin
Pavel Klocek18-Sep-02 6:25
Pavel Klocek18-Sep-02 6:25 
GeneralThese user breakpoints are driving me crazy! Please help. Pin
Redeemer-dk18-Sep-02 5:35
Redeemer-dk18-Sep-02 5:35 
GeneralRe: These user breakpoints are driving me crazy! Please help. Pin
Bart Robeyns18-Sep-02 6:11
Bart Robeyns18-Sep-02 6:11 
GeneralRe: These user breakpoints are driving me crazy! Please help. Pin
Redeemer-dk18-Sep-02 6:35
Redeemer-dk18-Sep-02 6:35 
GeneralComparing a character string to LPWSTR Pin
abhinarulkar18-Sep-02 5:13
abhinarulkar18-Sep-02 5:13 
GeneralRe: Comparing a character string to LPWSTR Pin
Paul M Watt18-Sep-02 5:18
mentorPaul M Watt18-Sep-02 5:18 
GeneralRe: Comparing a character string to LPWSTR Pin
Bart Robeyns18-Sep-02 6:14
Bart Robeyns18-Sep-02 6:14 

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.