🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.windows.ms.programmer
Article #1510

Re: Accelerator question for the wizards...

#1510
From: Risto Lankinen
Date: Tue, 05 Mar 1991 13:05
25 lines
1733 bytes
dave@wucs1.wustl.edu (David T Mitchell III) writes:

>Is there some way I can make an ACCELERATORTABLE data stucture (based on my
>array) rather than loading a resource?

Hi!

I've once run into a similar problem.  I solved it by defining not just one
but a number of accelerator tables.  You need to have one handle only, and to
use the hAcc = LoadAccelerators( hInst,MAKEINTRESOURCE(wProperParam) ); when
you want the change.

I never really checked it out, but being afraid of possible side effects, I
never changed the value of hAcc while processing the WM_COMMAND (because the
command could have been initiated by pressing an accelerator, in which case
the TranslateAccelerator() would be busy dispatching the message while the
accelerator table is suddenly changed).  Instead, I posted myself a WM_USER
to signal having to handle this later.

Terveisin: Risto Lankinen
-- 
Risto Lankinen / product specialist ***************************************
Nokia Data Systems, Technology Dept *  2                              2   *
THIS SPACE INTENTIONALLY LEFT BLANK * 2 -1 is PRIME!  Now working on 2 +1 *
replies: risto@yj.data.nokia.fi     ***************************************
Technical Details
Message-ID: <1051@tuura.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!zaphod.mps.ohio-state.edu!rpi!uupsi!sunic!news.funet.fi!fuug!tuura!risto
References: <1991Feb28.230407.8337@isis.cs.du.edu> <1991Mar1.030831.19658@rti.rti.org> <1991Mar4.064101.26122@isis.cs.du.edu> <1991Mar4.081

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!zaphod.mps.ohio-state.edu!rpi!uupsi!sunic!news.funet.fi!fuug!tuura!risto
From: risto@tuura.UUCP (Risto Lankinen)
Newsgroups: comp.windows.ms.programmer
Subject: Re: Accelerator question for the wizards...
Message-ID: <1051@tuura.UUCP>
Date: 5 Mar 91 13:05:39 GMT
References: <1991Feb28.230407.8337@isis.cs.du.edu> <1991Mar1.030831.19658@rti.rti.org> <1991Mar4.064101.26122@isis.cs.du.edu> <1991Mar4.081
Organization: Nokia Data Systems Oy
Lines: 25