The following code fragment illustrates how to use this message to disable AutoRun. The message handler should return TRUE to cancel AutoRun and FALSE to enable it. Your application's window must be in the foreground to receive this message. First, register "Quer圜ancelAutoPlay" as a Windows message: uMessage = RegisterWindowMessage(TEXT("Quer圜ancelAutoPlay")) Your application must be running in the foreground window. The following code fragments illustrate how to set up and handle this message. This approach is used by system utilities such as the Open common dialog box to disable AutoRun. Your application can respond to this message to suppress AutoRun. With systems that have Shell version 4.70 and later, Windows sends a "Quer圜ancelAutoPlay" message to the foreground window. However, it is usually preferable to handle this operation programmatically rather than depending on the user. Users can manually suppress AutoRun by holding down the SHIFT key when they insert the CD-ROM. In either case, you will normally not want to launch another application while the original is in progress.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |