Print Page | Close Window

Vista: CXTPTaskDialog::PreTranslateMessage problem

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Toolkit Pro
Forum Description: Topics Related to Codejock Toolkit Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=12373
Printed Date: 24 June 2025 at 12:36am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Vista: CXTPTaskDialog::PreTranslateMessage problem
Posted By: znakeeye
Subject: Vista: CXTPTaskDialog::PreTranslateMessage problem
Date Posted: 08 October 2008 at 11:31am
CMyTaskDialog dlg;
dlg.DoModal(FALSE);
 
In XP, the code below works. In Vista, it does not. What could be wrong?!
 
BOOL CMyTaskDialog::PreTranslateMessage(MSG* pMsg)
{
 if (pMsg->message == WM_KEYDOWN)
 {
  if (GetKeyState(VK_CONTROL) & 0x8000)
  {
   // Ctrl+C and Ctrl+Insert should copy the message text to the Clipboard.
   if (pMsg->wParam == 'C' || pMsg->wParam == VK_INSERT)
   {
    CopyToClipboard();
   }
  }
 }

 return CXTPTaskDialog::PreTranslateMessage(pMsg);
}




Replies:
Posted By: Oleg
Date Posted: 09 October 2008 at 1:26am
If you set Breakpoint inside first 'If' its executed ? if outside ?
replace
 
if (GetKeyState(VK_CONTROL) & 0x8000)
to
if (GetKeyState(VK_CONTROL) < 0)


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: znakeeye
Date Posted: 10 October 2008 at 3:29am
Thanks for your reply. The problem was on our side (I had no access to a Vista machine so I could not debug this immediately).
 
Anyway, you should not rely on the return value from GlobalUnlock() in Vista =)


Posted By: Oleg
Date Posted: 10 October 2008 at 6:28am
:) ok

-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net