What the...?

There seems to be a problem

We're not sure what, but we have a few guesses.

Problem: UseCache
Ticket: 8209839
Server: Web02

Click here to return to the homepage.

A snap to screen border dialog class - CodeProject Click here to Skip to main content
  Sign out
Click here to Skip to main content
Add your own
alternative version

Tagged as


  • Download demo project - 14 Kb
  • Download source files - 2 Kb
  • Introduction

    This class is used to implement the same feature seen in the popular Winamp player. With this class you are able to snap the dialog to the screen border. If you drag the dialog near the screen border, the dialog will automatically stick on the screen border (like a magnet).

    How to use it

    1. Add SnapDialog.h and SnapDialog.cpp to your project.
    2. Add #include "SnapDialog.h" in your dialog class.
    3. Replace all occurrence of CDialog in your dialog class by CSnapDialog.
    4. Enjoy!

    To change the limit after which the dialog is automatically stickled to the screen border, set these two variables. Default values are 15 pixels.

    m_nXOffset = 15;
    m_nYOffset = 15;

    That's all!



    Comments and Discussions

    link | Advertise | Privacy | Terms of Use | Mobile
    Web02 | 2.8.170713.1 | Last Updated 9 Apr 2000
    Everything else Copyright © CodeProject, 1999-2017
    Layout: fixed | fluid