|
-
May 24th, 2002, 05:24 AM
#1
CToolbar, CButton Pointer to them
hi there again.
i have a new problem. what have I to do to get Access to the Button of a CToolbar. I need a Pointer on the CButton. Is there a way to do this?
Any help will be rated
-
May 24th, 2002, 05:37 AM
#2
When do you need to get access to them?
your humble savant
-
May 24th, 2002, 05:40 AM
#3
Wait a minute. A toolbar button is not a control (like a dialog button) so you can't attach it to a CButton. Use CToolbarCtrl member function to manipulate buttons.
regards,
MiMec
-
May 24th, 2002, 05:49 AM
#4
to get the CButon try the getDlgItem(...) function
CButton* tp_dlgItem;
tp_dlgItem = GetDlgItem(IDC_BUTTON1);
with the handle you get from there you can manipulate the button. as for toolbar it might be the same but i never tried.
-
May 24th, 2002, 05:51 AM
#5
Thank you for the Post
what i try to do is this: a have a Toolbar with some Button (i think its Button). i want todo Action if the USer click on an Icon. This coud be do Easy, but..
When the User clicks on an Icon and waits for some Time (Time for Doubelclick) and hold this time the Mousebutten i will call a another function. This function is not written by me, and i feel not happy when i think about to change this very very large code.
The Problem is i have to call this function with an pointer of this button. i cant believe that's inpossibel.
-
May 24th, 2002, 05:57 AM
#6
maybe it would be easier for you if you handled the ON_BUTTON_DOWN and ON_BUTTON_UP windows messagesrelated to your button.
Catch them and then implement your function, from there you can still call the "old" function.
-
May 24th, 2002, 07:44 AM
#7
it seems to be true.
it is not possible to catch those things in a Button.
So...
Thanks for all your help.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|