?
Solved

Pressed Button

Posted on 1998-08-31
1
Medium Priority
?
336 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 2

Accepted Solution

by:
prasanth earned 200 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

Will your db performance match your db growth?

In Percona’s white paper “Performance at Scale: Keeping Your Database on Its Toes,” we take a high-level approach to what you need to think about when planning for database scalability.

Question has a verified solution.

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

Introduction: Load and Save to file, Document-View interaction inside the SDI. Continuing from the second article about sudoku.   Open the project in visual studio. From the class view select CSudokuDoc and double click to open the header …
Introduction: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
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.
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…

770 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