Click here to Skip to main content
15,918,808 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: How to make transparent CProgress in CDialog ? Pin
Prakash Nadar19-Feb-04 2:20
Prakash Nadar19-Feb-04 2:20 
GeneralRe: How to make transparent CProgress in CDialog ? Pin
vgrigor19-Feb-04 4:19
vgrigor19-Feb-04 4:19 
QuestionChange the bitmap in a Toolbar? Pin
LittleYellowBird19-Feb-04 0:07
LittleYellowBird19-Feb-04 0:07 
AnswerRe: Change the bitmap in a Toolbar? Pin
Robert A. T. Káldy19-Feb-04 3:16
Robert A. T. Káldy19-Feb-04 3:16 
GeneralRe: Change the bitmap in a Toolbar? Pin
LittleYellowBird19-Feb-04 4:41
LittleYellowBird19-Feb-04 4:41 
GeneralRe: Change the bitmap in a Toolbar? Pin
l a u r e n19-Feb-04 8:39
l a u r e n19-Feb-04 8:39 
GeneralShellExecuteEx multiple selection Pin
Aviv Halperin18-Feb-04 23:04
Aviv Halperin18-Feb-04 23:04 
GeneralPush Buttons Pin
ffazly18-Feb-04 21:31
ffazly18-Feb-04 21:31 
I'm trying to create a push button such that when it's clicked on the text on the button changes and the button is depressed. If the button is clicked on again then it gets back to its original state.
Here's the code that I've written:

if(BM_CLICK)
{
//if button depressed return to original state
if(SendMessage(hwnd[ID_BUTTON_START], BM_GETSTATE, 0, 0) == BST_PUSHED)
{
SendMessage(hwnd[ID_BUTTON_START], BM_SETSTATE, 0, 0);
SetWindowText(hwnd[ID_BUTTON_START], TEXT("start"));
}
//else depress button and change button text
else
{
SendMessage(hwnd[ID_BUTTON_START], BM_SETSTATE,1 , 0);
SetWindowText(hwnd[ID_BUTTON_START], TEXT("Pause"));
}
}
My problem is that I can't get the button to get to it's original state. What am I doing wrong here?


GeneralRe: Push Buttons Pin
P-Rex18-Feb-04 22:30
P-Rex18-Feb-04 22:30 
GeneralRe: Push Buttons Pin
ffazly19-Feb-04 19:25
ffazly19-Feb-04 19:25 
GeneralRtf editor in a dialog based app Pin
Filomela18-Feb-04 21:15
Filomela18-Feb-04 21:15 
GeneralSerial Communication - Laptop and PDA Pin
Deepa Gopal18-Feb-04 20:47
Deepa Gopal18-Feb-04 20:47 
GeneralRe: Serial Communication - Laptop and PDA Pin
J.B.19-Feb-04 3:39
J.B.19-Feb-04 3:39 
GeneralCalculate file size while creating avi video Pin
oliverlin18-Feb-04 20:31
oliverlin18-Feb-04 20:31 
GeneralCan anyone help me ? Pin
oliverlin19-Feb-04 15:30
oliverlin19-Feb-04 15:30 
GeneralNeed help with C++ vs C# resource problem Pin
Matt Philmon18-Feb-04 19:32
Matt Philmon18-Feb-04 19:32 
GeneralApplication Priority - when minimized Pin
krithika_Ramanujam18-Feb-04 19:21
krithika_Ramanujam18-Feb-04 19:21 
Questionneed sql query? Pin
murali_utr18-Feb-04 18:48
murali_utr18-Feb-04 18:48 
AnswerRe: need sql query? Pin
22491719-Feb-04 0:49
22491719-Feb-04 0:49 
GeneralEdit Control - Word Wrap Pin
monrobot1318-Feb-04 17:53
monrobot1318-Feb-04 17:53 
GeneralRe: Edit Control - Word Wrap Pin
Paul Hooper18-Feb-04 21:38
Paul Hooper18-Feb-04 21:38 
GeneralRe: Edit Control - Word Wrap Pin
monrobot1320-Feb-04 7:03
monrobot1320-Feb-04 7:03 
GeneralCommunication with Splitters Pin
telstar18-Feb-04 17:30
telstar18-Feb-04 17:30 
Generalclistbox greying Pin
SVPG18-Feb-04 17:02
SVPG18-Feb-04 17:02 
GeneralRe: clistbox greying Pin
sps-itsec4619-Feb-04 3:20
sps-itsec4619-Feb-04 3:20 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.