PreTranslateMessage and Ctrl + A

Hello NG,

how can I check in PreTranslateMessage, if the user has pressed Ctrl and A?

  if(pMsg->message==WM_KEYDOWN)
   {
      pMsg->wParam;  //??  Ctrl+A ?
      pMsg->lParam;  //??   Ctrl+A ?
   }

Thanks for help,
Guido



0
guidof73 (128)
7/25/2007 4:42:17 PM
vc.mfc 33608 articles. 0 followers. Follow

11 Replies
2637 Views

Similar Articles

[PageSpeed] 45

On Wed, 25 Jul 2007 18:42:17 +0200, "Guido Franzke" <guidof73@yahoo.de>
wrote:

>Hello NG,
>
>how can I check in PreTranslateMessage, if the user has pressed Ctrl and A?
>
>  if(pMsg->message==WM_KEYDOWN)
>   {
>      pMsg->wParam;  //??  Ctrl+A ?
>      pMsg->lParam;  //??   Ctrl+A ?
>   }
>
>Thanks for help,
>Guido

The wParam will contain 'A', and you can check the state of the Ctrl key
(at the time the WM_KEYDOWN message was generated; this is important!) by
using GetKeyState.

-- 
Doug Harrison
Visual C++ MVP
0
dsh (2498)
7/25/2007 4:57:29 PM
Thanks, but this does not work:

   if(pMsg->message==WM_KEYDOWN)
   {
      if (GetKeyState(VK_CONTROL)==1)
      {
         if (pMsg->wParam=='a')
         {
            MessageBox("Ctrl+A");
            return TRUE;
         }
      }
   }

I never run in the GetKeyState==1 clause.
What's wrong?



"Doug Harrison [MVP]" <dsh@mvps.org> schrieb im Newsbeitrag
news:s00fa3tp8eddermqnbnp1cqkb2sj721la1@4ax.com...
> On Wed, 25 Jul 2007 18:42:17 +0200, "Guido Franzke" <guidof73@yahoo.de>
> wrote:
>
> >Hello NG,
> >
> >how can I check in PreTranslateMessage, if the user has pressed Ctrl and
A?
> >
> >  if(pMsg->message==WM_KEYDOWN)
> >   {
> >      pMsg->wParam;  //??  Ctrl+A ?
> >      pMsg->lParam;  //??   Ctrl+A ?
> >   }
> >
> >Thanks for help,
> >Guido
>
> The wParam will contain 'A', and you can check the state of the Ctrl key
> (at the time the WM_KEYDOWN message was generated; this is important!) by
> using GetKeyState.
>
> -- 
> Doug Harrison
> Visual C++ MVP


0
guidof73 (128)
7/25/2007 5:05:39 PM
On Wed, 25 Jul 2007 19:05:39 +0200, "Guido Franzke" <guidof73@yahoo.de>
wrote:

>Thanks, but this does not work:
>
>   if(pMsg->message==WM_KEYDOWN)
>   {
>      if (GetKeyState(VK_CONTROL)==1)
>      {
>         if (pMsg->wParam=='a')
>         {
>            MessageBox("Ctrl+A");
>            return TRUE;
>         }
>      }
>   }
>
>I never run in the GetKeyState==1 clause.
>What's wrong?

GetKeyState
http://msdn2.microsoft.com/en-us/library/ms646301.aspx
<q>
If the high-order bit is 1, the key is down; otherwise, it is up.
</q>

Since GetKeyState returns SHORT, which is a signed 16-bit integer, you can
use either:

   if (GetKeyState() & 0x8000) ...
   if (GetKeyState() < 0) ...

Also, I'm pretty sure you need to compare wParam to 'A', as I stated in my
last message.

-- 
Doug Harrison
Visual C++ MVP
0
dsh (2498)
7/25/2007 5:43:41 PM
Yes, it must be 'A' not 'a'.  The value 'a', 0x61, is actually VK_NUMPAD1.

But why not check for WM_CHAR and ask if it is 0x0001, the value of control-A as a
character.
					joe

On Wed, 25 Jul 2007 12:43:41 -0500, "Doug Harrison [MVP]" <dsh@mvps.org> wrote:

>On Wed, 25 Jul 2007 19:05:39 +0200, "Guido Franzke" <guidof73@yahoo.de>
>wrote:
>
>>Thanks, but this does not work:
>>
>>   if(pMsg->message==WM_KEYDOWN)
>>   {
>>      if (GetKeyState(VK_CONTROL)==1)
>>      {
>>         if (pMsg->wParam=='a')
>>         {
>>            MessageBox("Ctrl+A");
>>            return TRUE;
>>         }
>>      }
>>   }
>>
>>I never run in the GetKeyState==1 clause.
>>What's wrong?
>
>GetKeyState
>http://msdn2.microsoft.com/en-us/library/ms646301.aspx
><q>
>If the high-order bit is 1, the key is down; otherwise, it is up.
></q>
>
>Since GetKeyState returns SHORT, which is a signed 16-bit integer, you can
>use either:
>
>   if (GetKeyState() & 0x8000) ...
>   if (GetKeyState() < 0) ...
>
>Also, I'm pretty sure you need to compare wParam to 'A', as I stated in my
>last message.
Joseph M. Newcomer [MVP]
email: newcomer@flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
0
newcomer (15974)
7/25/2007 7:53:39 PM
On Wed, 25 Jul 2007 15:53:39 -0400, Joseph M. Newcomer
<newcomer@flounder.com> wrote:

>Yes, it must be 'A' not 'a'.  The value 'a', 0x61, is actually VK_NUMPAD1.
>
>But why not check for WM_CHAR and ask if it is 0x0001, the value of control-A as a
>character.

The question is, why wait that long? :) Seriously, two reasons:

1. Ctrl+A might be bound to an accelerator, in which case, you won't get a
WM_CHAR.

2. I don't know the numeric value of Ctrl+A and don't want to know. :) Is
it even the same for every keyboard and every localized Windows?

-- 
Doug Harrison
Visual C++ MVP
0
dsh (2498)
7/25/2007 8:33:05 PM
Oops.  1. is a good point.  

Point 2 deals with whether or not the program is looking for Ctrl + A (as a key
combination) or is looking for the shortcut key for "Select All", for example.  How would
it be possible to look for an 'A' key on, say Korean, Hebrew, Japanese, or Arabic
keyboards, that as far as I can tell have no letter 'A' on them.  So looking for the Ctrl
key plus the VK_A code is itself a culturally-biased test...if the purpose was to simulate
an accelerator, it would be more culturally-neutral to actually use an accelerator key, so
it can be localized to the appropriate key combination used.  So perhaps the correct
question is whether or not it would actually be more appropriate to use an accelerator
table, thus eliminating issue 1, because in that case it would mean that an accelerator
*should* be used.

(Perhaps someone who is familiar with these keyboards can suggest how select-all, copy,
cut, and paste commands are described; are the numeric codes the same as for
roman-alphabet keyboards?).  

So perhaps the question was, like many questions, far too narrow; instead of asking how to
solve a problem, it asked about how to implement a solution, which is not necessarily the
solution to the problem, but is just an implementation of something which may or may not
be related to solving whatever the problem is.
					joe

On Wed, 25 Jul 2007 15:33:05 -0500, "Doug Harrison [MVP]" <dsh@mvps.org> wrote:

>On Wed, 25 Jul 2007 15:53:39 -0400, Joseph M. Newcomer
><newcomer@flounder.com> wrote:
>
>>Yes, it must be 'A' not 'a'.  The value 'a', 0x61, is actually VK_NUMPAD1.
>>
>>But why not check for WM_CHAR and ask if it is 0x0001, the value of control-A as a
>>character.
>
>The question is, why wait that long? :) Seriously, two reasons:
>
>1. Ctrl+A might be bound to an accelerator, in which case, you won't get a
>WM_CHAR.
>
>2. I don't know the numeric value of Ctrl+A and don't want to know. :) Is
>it even the same for every keyboard and every localized Windows?
Joseph M. Newcomer [MVP]
email: newcomer@flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
0
newcomer (15974)
7/25/2007 9:22:10 PM
Ok, GetKeyState is < 0. I think I misunderstood the documentation.
VK_A does not exist, I regret. So I compared wParam with 'a', did not work,
with 'A', didn't work either. Other chars didn't work either.
The value is 65 that I must compare with. But I don't know why because 'a'
is ASCII 65.  Do you know why?

Now this works well:

   if(pMsg->message==WM_KEYDOWN)
   {
      if (pMsg->wParam==65 && GetKeyState(VK_CONTROL)<0)
      {
             MessageBox("yippie!");
             return TRUE;
       }
    }
    return CPropertyPage::PreTranslateMessage(pMsg);

Just another question. Is it ok to return TRUE instead of calling the base
class function?

Thanks for your help,
Guido



0
guidof73 (128)
7/26/2007 11:14:58 AM
On Thu, 26 Jul 2007 13:14:58 +0200, "Guido Franzke" <guidof73@yahoo.de>
wrote:

>Ok, GetKeyState is < 0. I think I misunderstood the documentation.
>VK_A does not exist, I regret. So I compared wParam with 'a', did not work,
>with 'A', didn't work either. Other chars didn't work either.
>The value is 65 that I must compare with. But I don't know why because 'a'
>is ASCII 65.  Do you know why?

No, I don't, because 'A' is the correct value to compare to. The value of
'A' is 65. The value of 'a' is 65+32 or 97.

>Now this works well:
>
>   if(pMsg->message==WM_KEYDOWN)
>   {
>      if (pMsg->wParam==65 && GetKeyState(VK_CONTROL)<0)

Replace the 65 with 'A'. You must have done something else wrong if it
wasn't working before. And spaces are cheap! Use them:

      if (pMsg->wParam == 'A' && GetKeyState(VK_CONTROL) < 0)

>      {
>             MessageBox("yippie!");
>             return TRUE;
>       }
>    }
>    return CPropertyPage::PreTranslateMessage(pMsg);
>
>Just another question. Is it ok to return TRUE instead of calling the base
>class function?

If you don't want the base class to have any say in processing the message,
don't call it. For this function, it's perfectly reasonable not to call the
base class version.

-- 
Doug Harrison
Visual C++ MVP
0
dsh (2498)
7/26/2007 12:47:23 PM
Ok, thank you. Everything is working fine now :-)


0
guidof73 (128)
7/26/2007 1:22:16 PM
There is a disclaimer somewhere that says VK_A through VK_Z have no symbolic names but are
represented by 'A' through 'Z'

Why write 65 when you can write 'A' which has the same effect but is readable?
				joe

On Thu, 26 Jul 2007 13:14:58 +0200, "Guido Franzke" <guidof73@yahoo.de> wrote:

>Ok, GetKeyState is < 0. I think I misunderstood the documentation.
>VK_A does not exist, I regret. So I compared wParam with 'a', did not work,
>with 'A', didn't work either. Other chars didn't work either.
>The value is 65 that I must compare with. But I don't know why because 'a'
>is ASCII 65.  Do you know why?
>
>Now this works well:
>
>   if(pMsg->message==WM_KEYDOWN)
>   {
>      if (pMsg->wParam==65 && GetKeyState(VK_CONTROL)<0)
>      {
>             MessageBox("yippie!");
>             return TRUE;
>       }
>    }
>    return CPropertyPage::PreTranslateMessage(pMsg);
>
>Just another question. Is it ok to return TRUE instead of calling the base
>class function?
>
>Thanks for your help,
>Guido
>
>
Joseph M. Newcomer [MVP]
email: newcomer@flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
0
newcomer (15974)
7/26/2007 2:12:50 PM
You're right. I already write 'A' instead. I only thought I should use 'a'
because when you press Ctrl+A you actually press the Ctrl key and the 'a'.
Then I rememberd the ASCII table in a wrong way (because of 65)...
Thanks for your help.
Regards, Guido


0
guidof73 (128)
7/26/2007 2:41:28 PM
Reply:

Similar Artilces:

How to trap PreTranslateMessage in Win32 (non-MFC) app?
How do you trap PreTranslateMessage in a Win32 (non-MFC) app? I have an existing MFC class called CCustomEditCtrl that I have to convert to pure Win32. I am doing some processing in it's PreTranslateMessage event. Can someone tell me where to put this code in the Win32 version? Do I hvae to trap some WM_ event ? Thanks. Jeff, You would just handle the messages in the control window function. If you want to do something before all other messages, take care of it towards the top of the window function. In pseudo-code: control_function() { // You can, for example, add your proces...

Owner draw CListCtrl, EnsureVisible, PreTranslateMessage
There is Owner draw CListCtrl with overriden DrawItem. This class has subitems arbitrary controls (CEdit, CButton...). It should be fine to detect arrows keys in controls to jump with caret in CEdit boxes in one column by pressed arrow key. I tried to catch it in CEdit -> PreTranslateMessage() in block if(pMsg->wParam == VK_UP) then to call EnsureVisible() to parent CListCtrl to be caret always visible and CListCtrl scrolls if needed. Problem is when first time it scrolls up, some infinite loop begins and CPU 100% . It seems that something wrong with this... Can be EnsureVisible(...

pretranslatemessage behaviour
Hi, I have a problem when I press CTRL+ALT+D keys the PreTranslateMessage function is not fired for WM_KEYDOWN, only for WM_KEYUP. Any suggestions? Thanks! Hey Luis, check out this article and see it if helps (talks about disabling that key combination by setting up a hotkey so you get the message instead of the OS) http://www.codeguru.com/Cpp/misc/misc/keyboard/article.php/c433 "Luis Porras" <luis.porras@dakotaimaging.com> wrote in message news:OiUM1tkVFHA.2960@TK2MSFTNGP15.phx.gbl... > Hi, > > I have a problem when I press CTRL+ALT+D keys the PreTranslateM...

Ctrl + Home
I am used to the "ctrl + home" key combination taking me to the cell A1 of sheet A. In Excel, it only takes you to the cell A1 of the sheet you are in at the time. Is there another key combination that takes the place of Ctrl + Home in QPW and takes you to Cell A1 in the Sheet A or do I need to program that into a macro and stick it on a toolbar somewhere? Thanks, Bruce There is no built-in shortcut to take you to the first worksheet's cell A1. You could, of course, press Ctrl-PgUp a number of times to get to the first worksheet, and then press Ctrl-Home. The code for ...

PreTranslateMessage
Hi I'm trying to catch a CTRL+V event in my PreTranslateMessage function. Now when V is pressed pMsg->wParam == 86 but what is it when CTRL+V is pressed. Or is there some other way of catching the CTRL+V key press Thanks. If there's another way, we'll hear about it. Here's what I do: When you get a WM_KEYDOWN and a VK_SHIFT, set m_shiftdown=1. When you get a 'V', check if m_shifdown==1 When you get a WM_KEYUP and a VK_SHIFT, set m_shiftdown=0. Tom, > Hi I'm trying to catch a CTRL+V event in my PreTranslateMessage function. > Now when V is pressed p...

Strange PreTranslateMessage Behavior
Hi: I have a vc++ 6.0 dialog-based application where I'm using PreTranslateMessage to send keyboard characters out the serial port with the following code: BOOL CMyDlg::PreTranslateMessage(MSG* pMsg) { if (pMsg->message == WM_CHAR ) { WPARAM wp = pMsg->wParam; char by = (char) wp; char *p_cs; p_cs = &by; pSPort->WriteData( p_cs, 1 ); } return CDialog::PreTranslateMessage(pMsg); } I also have a couple of buttons that perform some functions and are enabled and/or disabled after the functions are complete. Stripped of all irrelevant code these functions are: v...

no more PreTranslateMessage
All my Dialogs are derived from AbstractDialog. This AbstractDialog overrides PreTanslateMessage so I can catch keystrokes in all my Dialogs. BOOL AbstractDialog::PreTranslateMessage(MSG* pMsg) { if(pMsg->message==WM_KEYDOWN) { DEBUG(_T("WM_KEYDOWN")); ... OnKey(); ... } return CDialog::PreTranslateMessage(pMsg); } Now in a particular Dialog I override the virtual OnKey() function and execute whatever should happen in that Dialog on a particular keystroke. Works like charm! Now I have also a CButton handler which creates a w...

My Ctrl+D doesn't work, how can I reset?
In excel my fill down shortcut does not work. Ctrl+D. Where are these shortcut viewed and possibly reset? There are only two ways I can think of that can prevent Ctrl-d from acting to do a fill down. One is if an external program intercepts that keystroke before it gets to Excel. The other is if, within Excel, that keystroke has been assigned to a macro. One way to check the latter possibility quickly is to start Excel in safe mode. From Start->Run enter "excel.exe /s" (without quotes, there is s pace before the slash). If Ctrl-d works then you know it is a macro lo...

Ctrl+PgUp and Ctrl+PgDn
I have a workbook in Excel 97 with two windows. One is PipeBook.xls:1 and the other is PipeBook.xls:2. I would like to disable the function of Ctrl+PgUp and Ctrl+PgDn in the window PipeBook.xls:2, however leave the function available for window PipeBook.xls:1. Is that possible? take a look at SCROLLAREA in vba help.Put your code in the ThisWorkbook module in the Open_Workbook macro. -- Don Guillett SalesAid Software Granite Shoals, TX donaldb@281.com "Keith Hueston" <kahueston@sgvwater.com> wrote in message news:6af001c35850$f204e1a0$a001280a@phx.gbl... > I have a work...

PreTranslateMessage and Ctrl + A
Hello NG, how can I check in PreTranslateMessage, if the user has pressed Ctrl and A? if(pMsg->message==WM_KEYDOWN) { pMsg->wParam; //?? Ctrl+A ? pMsg->lParam; //?? Ctrl+A ? } Thanks for help, Guido On Wed, 25 Jul 2007 18:42:17 +0200, "Guido Franzke" <guidof73@yahoo.de> wrote: >Hello NG, > >how can I check in PreTranslateMessage, if the user has pressed Ctrl and A? > > if(pMsg->message==WM_KEYDOWN) > { > pMsg->wParam; //?? Ctrl+A ? > pMsg->lParam; //?? Ctrl+A ? > } > >Thanks ...

SendKeys command for Ctrl-Shift-v?
Hi, I'm trying to send the Ctrl-Shift-v combination to MS Word, with no luck. So far SendKeys "^+(v)" isn't doing it. Is this possible? Thanks, Paul -- Using Office 2003 sp3 on Windows XP Home Behold, I will allure her, I will lead her into the wilderness and speak tenderly to her - Ho. 2.14. http://onfollowingchrist.wordpress.com/ Does Selection.PasteAndFormat do what you need or use SendKeys "^+v" without the () -- Hope this helps. Please reply to the newsgroup unless you wish to avail yourself of my services on a paid consult...

PreTranslateMessage question
I have an MFC application which is based on a modal CDialog. It contains a Picture control which is resized if the parent dialog size changes - this keeps the picture control occupying the full width of the CDialog's client area. The Picture Control is used to display video, but when the dialog box size is stretched it causes a lot of flickering because the Picture Control repeatedly redraws its background while also displaying the video. According to the documentation, I just have to trap WM_ERASEBKGND messages for the Picture Control to prevent it drawing its background. So I created ...

Ctrl+Quote copy
Hi! This is not a report question, but maybe you can help. I always use the short cut Ctrl+Brk to copy from the previous line. When I change the keyboard mode to Hebrew by pressing Alt+Shift, and then pressing Ctrl+" the form opens in design mode. Acc97 was no problem. Is there another alternative to copy from previous line? Thanks in advance You are all good people ...

Macro's with Ctrl or Ctrl-Shift?
When you record a new macro it asks you what Ctrl key you want to access it with. If you Edit the Properties of a Macro it asks you what Ctrl-Shift key you want to use to access a macro. How can you have more control over this to assign the proper key to a macro? Thanks. Al, I don't know what you mean by "edit the properties of a macro." You can assign a Ctrl or Ctrl-Shift combination (excluding number keys) to macros either when about to record a macro, or later with Tools - Macro - Macros - Options. If by "have more control," you mean keys other than C...

preTranslateMessage error
I'm learning how to use pretranslateMessage in c++ for an mfc app. but it keeps giving me two errors and I can't find a good tutorial on it. it says: PhysicsMath error LNK2005: "public: virtual int __thiscall CPhysicsMathDlg::PreTranslateMessage(struct tagMSG *)" (?PreTranslateMessage@CPhysicsMathDlg@@UAEHPAUtagMSG@@@Z) already defined in PhysicsMath.obj and PhysicsMath fatal error LNK1169: one or more multiply defined symbols found anyone know what it means? dave "Deej" <davidhere40@hotmail.com> wrote in message news:7sednROg4_wLPmmiRVn-jg@comcast.com.....

PreTranslateMessage and controls
I have a member function in my project that is in place to prevent the dialog box from closing when ENTER or ESCAPE is pressed inside an edit box. However, in the process, the push buttons are (expectedly) no longer triggered when they have input focus and the user pressed ENTER. I want the program to tab only from edit boxes if enter is pressed, otherwise perform the default windows action. How do I test for the current selected Dialog item? The block in question has the C-Style comments. BOOL CMainDlg::PreTranslateMessage(MSG* pMsg) { if( pMsg->message == WM_KEYDOWN ) { ...

Outlook 2007: No copy and paste with CTRL+INS
Hi! As a left handed user I always use CTRL+INS and SHIFT+INS for copy and paste. MS seems to have deactivated this shortcut in Outlook 2007 (which is very annoying if you are left handed). Is there a way to enable this shortcut again? Regards, Achim Achim Becker, you wrote on Wed, 08 Apr 2009 11:21:07 +0200: > CTRL+INS and SHIFT+INS What does "INS" mean? The shortcuts are CTRL+C (copy) and CTRL+V (paste). Or I do not understand? X'Posted to: microsoft.public.outlook,microsoft.public.outlook.general -- Best Regards Christian Goeller MVP - MS Outlook http://www.o...

CTRL C & CTRL V doesnot work whereby I cannot copy and paste.
CTRL C & CTRL V doesnot work whereby I cannot copy and paste. Are you saying that you can copy and paste by other means (for example via right-click menus)? -- Stefan Blom Microsoft Word MVP "binoy" <binoy@discussions.microsoft.com> wrote in message news:CEE90586-3362-48A9-8A28-DE9B392BDC69@microsoft.com... > CTRL C & CTRL V doesnot work whereby I cannot copy and paste. ...

CFileDialog and PreTranslateMessage
Hello, I have a CFileDialog derived class. I want to handle the backspace key down in my derived class. I added PreTranslateMessage handler to my class but it never gets in there (Why?). What can I do in order to handle the Back_Space key down in my derived class? Thanks, Janiv Ratson. First of all you did not mention what control you want to receive notification when del key was pressed. Secondly you should not use PreTranslateMessage in this manner; it was not designed for that and it is a source of many problems that usually are not foreseen. You have to provide more detailed infor...

CTRL+TAB!!!!!!
I know I can jump between workbooks by using 'CTRL+TAB' to go FORWARD. Well if I want to go bacwards it will be CTRL+SHIFT+TAB. The Problemo... While im in a writing function mode (In the middle of writing a formula) I can jump to the next workbook "UP" to reference something for a vlookup but not "Back" to another....why? Please note that I can have up to 20 workbooks open at one time for the purpose of linking thus if i need to reference the 19th workbook i need to CTRL+TAB 19 time to get there rather than do a CTRL+SHIFT+TAB 2 times. Is it somethint...

Keyboard Messages not intercepted when PreTranslateMessage is used
Hi Mine is a MFC ActiveX Ctrl. I am using PreTranslateMessage as follows so that keystrokes like backspace can be detected in IE, but though SendMessage gets called, the Keystrokes like Arrow keys, delete backspace don't function at all in ActiveX container as well as IE. Am I missing something or do I need to explicitly write WM_KEYDOWN (KEYUP) message handlers? Please let me know. BOOL CMegafleetPluginCtrl::PreTranslateMessage(MSG* pMsg) { switch (pMsg->message) { case WM_KEYDOWN: case WM_KEYUP: switch (pMsg->wParam) { c...

Interrupting long calculations in Excel? Hi all, I am having a very long calculation in Excel using VBA. Of course I know I can hit ESC or CTRL+BREAK to interrupt the VBA program. But I found du
Interrupting long calculations in Excel? Hi all, I am having a very long calculation in Excel using VBA. Of course I know I can hit ESC or CTRL+BREAK to interrupt the VBA program. But I found due to too long running process, the Excel window stop to respond for very long time, besically it's like "not responding" situation with "not responding" on the windows title bar... It doesn't seem to accept any more key strokes, not to say ESC or CTRL +BREAK. What can I do to rein/stop my program? Thanks Try this to speed up execution Application.ScreenUpdating = FA...

Highlight cells with ctrl-click but only un-highlight one cell
When highlighting a number of cells using ctrl-click, and accidentally highlighting one incorrectly, how can I un-highlight it without losing my other selections and starting over? Hagan, have a look here for some code to do it, http://www.google.com/groups?threadm=%23yUSqTuADHA.2296%40TK2MSFTNGP10.phx.gbl -- Paul B Always backup your data before trying something new Please post any response to the newsgroups so others can benefit from it Feedback on answers is always appreciated! Using Excel 2002 & 2003 "hagan" <hagan@discussions.microsoft.com> wrote in message ne...

PreTranslateMessage in the DLL is not called
Hi there. I have a strange thing in my code. I have a class which is derived from CEdit. In that class there is a PreTranslateMessage method. It is called when I compile this class in the Exe. But it is not never called when I compile this class as a DLL and load it dynamically by LoadLibrary and use the class. Please do you have any ideas what is wrong there? What is the difference of using derived class as a exe or as a dll? Thanks! German Koninin Is it a Regular DLL? Is the CEdit derived object in a modeless dialog? --- Ajay German Koninin wrote: > Hi there. > I have a stra...

About ctrl-enter
When typing the name of the web address in the address bar and then press Crtl-Enter. IE automatically shows the full URL address, however, it always finishes the address with .com.tw How to change the setting to finishing with .com.hk ? My OS is Windows Vista Business & IE 8 in Trad Chinese. Hi, In Internet Options> General> Languages> Specify the suffix. (Not where you would think to look.) Hope this helps, Don [MS MVP- IE] "yclhk" <yclhk@discussions.microsoft.com> wrote in message news:4CFDA8F5-C099-42CF-96D1-C86E4E5D24AC@microsoft.com... ...