Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


[VC++]Default Push Button for a Tab

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
zile
Advanced Cheater
Reputation: 0

Joined: 11 Jul 2009
Posts: 75

PostPosted: Tue Sep 27, 2011 6:50 am    Post subject: [VC++]Default Push Button for a Tab Reply with quote

I have a main dialogbox with a tab control, and i created a tab ( as child window ) in the tab's window. i have a button and an edit control in the tab to send messages(texts). how do i enable it to auto push the send button when i press enter after entering text in the edit control?

i tried setting the button as DEFPUSHBUTTON but it doesnt work

- i tried setting a button on the Main dialogbox(not tab) as default push button and it works fine, but somehow if its in the tab it doesnt work. any way to get this working?
Back to top
View user's profile Send private message
Josheh
Expert Cheater
Reputation: 1

Joined: 28 Aug 2011
Posts: 155

PostPosted: Tue Sep 27, 2011 2:11 pm    Post subject: Reply with quote

I'n not sure what you're asking exactly, but you could hook the keyboard to see if certain keys are pressed, then invoke the button? I dunno I'm sorry. I'm a Java boy Embarassed

EDIT: Or if you can get which key is pressed in the TextBox (IDK I guess a KeyCode?) to see if it's the Enter key then invoke the button?
Back to top
View user's profile Send private message
NoMercy
Master Cheater
Reputation: 1

Joined: 09 Feb 2009
Posts: 289

PostPosted: Tue Sep 27, 2011 2:46 pm    Post subject: Reply with quote

I'm not sure buy I guess that the owner of the button is not the main window but the tapWindow? Guess you should set that window as reciever or something. I'm not sure just guessing? Perhaps SS_OWERDRAW could help you here?
Back to top
View user's profile Send private message
zile
Advanced Cheater
Reputation: 0

Joined: 11 Jul 2009
Posts: 75

PostPosted: Tue Sep 27, 2011 9:48 pm    Post subject: Reply with quote

I mean i have a tab ( child dialogbox ) in a parent dialogbox. when i set a default button on the tabwindow, it doesnt work. only the parent dialogbox's default button works

im guessing it only checks for the parent's default button not the tab's.

i checked ss_ownerdraw, is it only for painting the button?
josheh's suggestion seems like the way to do it..ill try looking into that
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites