SAMPLE: Code Demonstrates Keeping an Icon Fixed in Place

Last reviewed: February 15, 1996
Article ID: Q84981
The information in this article applies to:
  • Microsoft Windows Software Development Kit (SDK) for Windows versions 3.1 and 3.0

Some applications are designed to place an icon at a fixed location on the screen where the icon must remain. One application of this type is the FIXDICON sample in the Microsoft Software Library. When the user minimizes the application, it draws an icon on the screen. If the user drags the icon with the mouse, the icon "snaps back" to its specified position. If the user chooses the Arrange Icons button in the Task Manager's Task List, the icon appears momentarily at a new position assigned by Windows. Then it returns to the position assigned by the application.

In the FIXDICON sample, the window procedure for the main window processes the WM_MOVE message. If the window is represented as an icon, the application calls the SetWindowPos function to position the icon at its specified position.

Download FIXDICON.EXE, a self-extracting file, from the Microsoft Software Library (MSL) on the following services:

  • Microsoft Download Service (MSDL)

          Dial (206) 936-6735 to connect to MSDL
          Download FIXDICON.EXE (size: 23464 bytes) 
    
  • Internet (anonymous FTP)

          ftp ftp.microsoft.com
          Change to the \SOFTLIB\MSLFILES directory
          Get FIXDICON.EXE (size: 23464 bytes) 
    


Additional reference words: 3.00 3.10 softlib FIXDICON.EXE
KBCategory: kbprg kbfile
KBSubcategory: GdiCurico


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: February 15, 1996
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.