A snap to screen border dialog class






3.71/5 (4 votes)
Apr 9, 2000

102022

2141
Dialog class that implement a snap-to-screen-border feature like Winamp
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
- Add SnapDialog.h and SnapDialog.cpp to your project.
- Add #include "SnapDialog.h" in your dialog class.
- Replace all occurrence of CDialog in your dialog class by CSnapDialog.
- Enjoy!
m_nXOffset = 15; m_nYOffset = 15;
That's all!