`indows~
`Guide to Programming
`
`Page 1 of 3
`
`SONY EXHIBIT 1018
`
`
`
`- :-- is subject to change without notice and does not represent
`_ .. n of ~1icrosoft Corporation. The software described in this docu(cid:173)
`: .. -~r a license agreement or nondisclosure agreement. The software
`• -..: .. ,.- cotJ.ed only in accordance with the terms of the agreement. It is against
`· copy the software on any medium except as specifically allowed in the license
`_ ..
`- no::disclosure agreement. No part of this manual may be reproduced or transmitted in
`~) form or by any means, electronic or mechanical, including photocopying and record(cid:173)
`ing, for any purpose without the express written permission of Microsoft.
`
`Pl"n~!SHED BY
`-:-.uft Press
`of Micro oft Corporation
`A ~ ·
`O::e M
`WI!). Redmond, Washington 98052-6399
`C Cct'J!o• ~ Microsoft Corporation, 1990. All rights reserved.
`
`L1 ~ry of Congress Cataloging-in-Publication Data
`
`Windows : a guide to programming I Microsoft Corporation.
`:m. -- (M icrosoft Windows programmer's reference library)
`. .. de~ index.
`ISBS 1-55615-308-2
`-! ... rosoft Windows (Computer programs)
`•
`e ~r;e.
`QA - 6.76.W56M53 1990
`.,..5.4 3--dc20
`
`I. Microsoft.
`
`90-6035
`CIP
`
`Pnmed and bound in the United States of America.
`
`234567 89FGFG43210
`
`Distributed to the book trade in Canada by General Publishing Company, Ltd.
`Distributed to the book trade outside the United States and Canada
`... _ ?enguin Books Ltd.
`?e::g-..:in Books Ltd., Harmondsworth, Middlesex, England
`Ptr.6uin Books Australia Ltd., Ringwood, Victoria, Australia
`Penguin Books N.Z. Lyd., 182-190 Wairau Road, Auckland 10, New Zealand
`~~ft. MS. MS-DOS, OW-BASIC, QuickC, Code View, and XENIX are registered trademarks and
`W"~-s. Windows/286, Windows/386, and Press are trademarks of Microsoft Corporation.
`Epsoo is a registered trademark of Epson America, Inc.
`mM and PC/AT are a registered trademarks and PC/XT is a trademark oflntemational Business
`~inesCorporation.
`II:-.d is a registered trademark and 386 is a trademark of Intel Corporation.
`Loms and 1-2-3 are registered trademarks of Lotus Development Corporation.
`Solda is a trademark of Nokia Corporation.
`Paintbrush is a trademark of ZSoft Corporation.
`Document No. SY03146-300-R00-1089
`
`For~
`
`TheM
`
`Page 2 of 3
`
`
`
`-that
`
`>ry; it
`: hlnst
`1ename
`
`,rfunc-
`
`ction to
`sage
`~e to a
`accel-
`
`ey
`
`the
`
`rom the
`
`Jld look
`
`Menus 7·19
`
`whil e <GetMessage< &msg , NULL , NULL, NULL)) I
`«»
`49
`
`if (!Transl ateAccelera tor(hWnd , hAccTabl e, &msg))
`I
`
`TranslateMessa ge( &msg) ;
`Dispat chMes sage<&msg>;
`
`In this example:
`«» This statement checks each message to see whether it is an accelerator-key
`message. The window handle, hWnd, identifies the window whose messages
`are to be translated. The window handle must identify the window that con(cid:173)
`tains the menu with the accelerators. The accelerator handle, hAccTable,
`specifies the accelerator table to use when translating the accelerators.
`
`If the message was generated via an accelerator key, the Translate(cid:173)
`Accelerator function converts the keystroke to a WM_ COMMAND message
`containing the appropriate menu ID, and sends that WM_COMMAND
`message to the window function.
`
`•
`
`If the message is not an accelerator-key message, the application processes it
`as usual, by using the TransJateMessage and DispatchMessage functions.
`7. 6.2 Using Cascading Menus
`
`Windows lets you provide more than one level of pop-up menus. Such multilevel
`pop-up menus are called cascading menus. Such a menu structure can help min(cid:173)
`imize the number of commands on a single pop-up menu, without requiring a
`dialog box to let the user refine his or her choice.
`
`Figure 7.1 shows an example of cascading menus.
`
`Figure 7.1 Cascading Menus
`
`Page 3 of 3
`
`