Can I, daddy?
Moderator: Moderators
Can I, daddy?
Is it possible to add commands to the menu
you get when you rightclick on a user's name?
And please forgive me if this has been asked
before... At least I didn't find it with the search.
Thanks in advance! (Yea yea, I'll thank you
afterwards, too )
you get when you rightclick on a user's name?
And please forgive me if this has been asked
before... At least I didn't find it with the search.
Thanks in advance! (Yea yea, I'll thank you
afterwards, too )
"Make love, if you want. Just make sure you have enough time for making war, too."
-Anonymous
-Anonymous
Spoke too soon. I'm in the process of doing the same thing myself.
Now that I've done that much, finding what information to put where is being a bit difficult on me. I notice where the onGrantSlot and similar functions are defined (in UsersFrame.cpp), but getting the menu item (which now appears on my menu) to actually do anything is a bit more difficult...any assistance on this stage would be much appreciated!
- Gratch
Now that I've done that much, finding what information to put where is being a bit difficult on me. I notice where the onGrantSlot and similar functions are defined (in UsersFrame.cpp), but getting the menu item (which now appears on my menu) to actually do anything is a bit more difficult...any assistance on this stage would be much appreciated!
- Gratch
Have any of you nice fellas checked out the Custom user commands in Settings / Advanced ?
Gratch, when you add a command to the menu you need to add a #define IDC_WHATEVER_YOU_WANT SOMENUMBERHERE to resource.h as well as adding a command id handler such as this :... and finally you need to add the following to the public portion of the HubFrame class :Hope this helps.
Sarf
---
Join the Cthulhu Corps; it's not just a job, it's a higher position under an elder god.
Gratch, when you add a command to the menu you need to add a #define IDC_WHATEVER_YOU_WANT SOMENUMBERHERE to resource.h as well as adding a command id handler such as this :
Code: Select all
COMMAND_ID_HANDLER(IDC_WHATEVER_YOU_WANT, onWhateverYouWant)
Code: Select all
LRESULT onWhateverYouWant(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/)
{
// your code here
return 0;
}
Sarf
---
Join the Cthulhu Corps; it's not just a job, it's a higher position under an elder god.
Okay... The User Commands (also known as User Menu) is available in all recent DC++ versions in the Advanced pane in the Settings window.
You need to do the changes in the HubFrame.h - not HubFrame.cpp.
For further info, please ask more specific questions.
Sarf
---
"If debugging is the act of removing bugs from code, programming must be the act of putting them in." - Dykstra Sr.
You need to do the changes in the HubFrame.h - not HubFrame.cpp.
For further info, please ask more specific questions.
Sarf
---
"If debugging is the act of removing bugs from code, programming must be the act of putting them in." - Dykstra Sr.
-
- DC++ Contributor
- Posts: 3212
- Joined: 2003-01-07 21:46
- Location: .pa.us