![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 | |
|
Programmer
|
Making buttons respond
hello, im posting this cause i got tired of searching. Ive figured out how to make a button, but now i wanna make it like, when you click on it, it responds, like send a messagebox, or something else.
this code will create a button : Quote:
|
|
|
|
|
|
|
#2 |
|
Resident Grouch
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jun 2005
Posts: 6,453
Rep Power: 10
![]() |
Have you read any tutorials at all?
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code. Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers |
|
|
|
|
|
#3 |
|
Programmer
|
yes i did, but none explaine.
I tried adding if BN_CLICKED==TRUE {//execute code } at the end of the CreateWindow function but it doesnt work. And thats what my win32 help files said to use. |
|
|
|
|
|
#4 |
|
Resident Grouch
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jun 2005
Posts: 6,453
Rep Power: 10
![]() |
Are you aware of the message-driven nature of Windows?
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code. Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers |
|
|
|
|
|
#5 |
|
Programmer
|
Im not sure what ur saying but it would be much easier if you could just gimme the answer so i can move on. Cause im kinda stuck now, u see?
|
|
|
|
|
|
#6 |
|
Professional Programmer
|
Gah! Mate, it's not that hard to figure out. You're on the right track with BN_CLICKED. Did you download the tutorial to your hard drive and look at the source codes provided? It will tell you how to make the button work.
__________________
The world's first athletic computer geek! The home of PrProgramsStudios How not to post a question: <-- Please don't reply |
|
|
|
|
|
#7 |
|
Programmer
|
oh ok, ill try that.
|
|
|
|
|
|
#8 | |
|
Resident Grouch
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jun 2005
Posts: 6,453
Rep Power: 10
![]() |
Quote:
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code. Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers |
|
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|