How can I create a Menu Interface Using DirectDraw?
A Mouse-over button just checks whether the current cursor is over the menu rectangle and if so it displays the Highlighted MenuBitmap to show selection.Then it checks whether the user has also pressed the MouseButton and if so it takes appropriate action. In the following sample "Menu.zip" the 'Exit' menu gets highlighted when the user moves the cursor over it. And the application quits when the user presses the 'Exit' MenuButton.
The following code can be used to check whether Mouse is in the menu Rectangle
if ( (m_CursorPoint.x > MenuLeft && m_CursorPoint.x < MenuRight) && (m_CursorPoint.y > MenuTop && m_CursorPoint.y < MenuBottom) )
FAQ Menu
Sponsored links
Build IT Knowledge with Current & Trusted Content
Helps Employees Develop & Hone New Technical Programming Skills. Sign Up & Get Full Access.
Helps Employees Develop & Hone New Technical Programming Skills. Sign Up & Get Full Access.
Check Out IT Certification Preparation Materials
Sign Up With SkillSoft & Get Access to Training Materials for Over 50 Professional Certifications.
Sign Up With SkillSoft & Get Access to Training Materials for Over 50 Professional Certifications.
Six Sigma Certification
100% Online-Six Sigma Certificate from Villanova - Find Out More Now.
100% Online-Six Sigma Certificate from Villanova - Find Out More Now.
SSH and SFTP support for .NET
Add complete SSH and SFTP support to your .NET framework application
Add complete SSH and SFTP support to your .NET framework application
ASP.NET 3.5 Hosting on Windows 2008!
ASP.NET 3.5/2.0 Hosting on Windows 2008 & 2003! AJAX, LINQ, & Silverlight Ready! 3 Mo. Free!!
ASP.NET 3.5/2.0 Hosting on Windows 2008 & 2003! AJAX, LINQ, & Silverlight Ready! 3 Mo. Free!!
