🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Accelerator question for the wizards...

#1484
From: David T Mitchell III
Date: Mon, 04 Mar 1991 08:12
24 lines
1384 bytes
Here's a tough one...  I'd like my program to create accelerator keys upon
startup.  I've looked everywhere, but I can't find anyway to make an
accelerator key table that isn't a resource.  What's the deal?  I can hardcode
menus, but not the assocciated accel keys?

Example:

Suppose I've got an array of items (say {"&Alaska", "A&rkansas", "Ari&zona")
that I hook up to a menu.  I'd like the accel keys to be Ctl+A, Ctl+R and
Ctl+Z, respectively.

If my items are a string resource, it's easy to change the & placement
to set different mneumonics (such as {"A&laska", "&Arkansas", A&razona"}).
It seems really silly and tedious to also have to change the related accel,
too.  So...

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

Thanks!

dave	dave@wucs1.wustl.edu
	the mira corporation
	314/434-4343
Technical Details
Message-ID: <1991Mar4.081221.3709@cec1.wustl.edu>
Path: arc1-ca.pugleaf.net!utzoo!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!cec2!news
References: <1991Feb28.230407.8337@isis.cs.du.edu> <1991Mar1.030831.19658@rti.rti.org> <1991Mar4.064101.26122@isis.cs.du.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!cec2!news
From: dave@wucs1.wustl.edu (David T Mitchell III)
Newsgroups: comp.windows.ms.programmer
Subject: Accelerator question for the wizards...
Message-ID: <1991Mar4.081221.3709@cec1.wustl.edu>
Date: 4 Mar 91 08:12:21 GMT
References: <1991Feb28.230407.8337@isis.cs.du.edu> <1991Mar1.030831.19658@rti.rti.org> <1991Mar4.064101.26122@isis.cs.du.edu>
Organization: Washington University, St. Louis MO
Lines: 24