Solved

Pressed Button

Posted on 1998-08-31
1
330 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
Comment Utility
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
not able to insert into temp table 68 150
bigDiff challenge 17 74
centeredAverage challenge 8 120
lucky13 challenge 11 111
Introduction: The undo support, implementing a stack. Continuing from the eigth article about sudoku.   We need a mechanism to keep track of the digits entered so as to implement an undo mechanism.  This should be a ‘Last In First Out’ collec…
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.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

771 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