Solved

Pressed Button

Posted on 1998-08-31
1
331 Views
Last Modified: 2013-11-19
In one of the dialogs of my program I want to implement a button that keeps being in pressed state until I press it again. I know how to set the "pressed state" but when the button loses the focus it is not pressed anymore, why ? What can I do to change this. By the way, I used CButton::SetState(). Please help.
0
Comment
Question by:_punisher
1 Comment
 
LVL 2

Accepted Solution

by:
prasanth earned 50 total points
ID: 1321519
Instead of using a regular button, try using a CheckBox. Then in it's Properties:Styles, set the Push-like style. It'll look like a button but act like a checkbox. And since both checkboxes and buttons are of the same window class, any code you have to process BN_CLICKED will still work.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Detect CR LF to each line 12 153
sumDigits challenge 9 124
firstChar challenge 13 110
wordmultiple challenge 12 119
Introduction: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.

895 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now