Problems compiling? Don't understand the source code? Don't know how to code your feature? Post here.
Moderator: Moderators
-
Daehend
- Posts: 5
- Joined: 2003-05-25 15:21
Post
by Daehend » 2003-05-25 15:32
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

)
"Make love, if you want. Just make sure you have enough time for making war, too."
-Anonymous
-
Gratch06
- Posts: 141
- Joined: 2003-05-25 06:48
- Location: USA
Post
by Gratch06 » 2003-05-25 21:18
Add the menu in the hubframe.cpp file.
- Gratch
-
Gratch06
- Posts: 141
- Joined: 2003-05-25 06:48
- Location: USA
Post
by Gratch06 » 2003-05-25 22:04
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
-
sarf
- Posts: 382
- Joined: 2003-01-24 10:43
- Location: Sweden
Post
by sarf » 2003-05-26 03:42
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 :
Code: Select all
COMMAND_ID_HANDLER(IDC_WHATEVER_YOU_WANT, onWhateverYouWant)
... and finally you need to add the following to the public portion of the HubFrame class :
Code: Select all
LRESULT onWhateverYouWant(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/)
{
// your code here
return 0;
}
Hope this helps.
Sarf
---
Join the Cthulhu Corps; it's not just a job, it's a higher position under an elder god.
-
Daehend
- Posts: 5
- Joined: 2003-05-25 15:21
Post
by Daehend » 2003-05-26 10:44
I can't find any cpp files... Tell me where to look?
And, uh, sarf... Ya know... I didn't understand a thing
after the first line...

Explain?
"Make love, if you want. Just make sure you have enough time for making war, too."
-Anonymous
-
sarf
- Posts: 382
- Joined: 2003-01-24 10:43
- Location: Sweden
Post
by sarf » 2003-05-26 12:32
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.
-
Daehend
- Posts: 5
- Joined: 2003-05-25 15:21
Post
by Daehend » 2003-05-26 13:38
Ok, I got the info I needed. Thank you.
"Make love, if you want. Just make sure you have enough time for making war, too."
-Anonymous
-
Daehend
- Posts: 5
- Joined: 2003-05-25 15:21
Post
by Daehend » 2003-05-26 13:49
One more. Is it possible to, as an op, force a user to
send his/her filelist? Would be, well, useful in many cases...

"Make love, if you want. Just make sure you have enough time for making war, too."
-Anonymous
-
sarf
- Posts: 382
- Joined: 2003-01-24 10:43
- Location: Sweden
Post
by sarf » 2003-05-26 14:22
DC++ already allows OPs to get their filelist no matter how many slots the client have used.
But no, there is no way to force other clients to send you their filelist.
Sarf
---
Computers, like cats, can operate crossdimensionally; the trick is in getting them to do what you want.
-
Daehend
- Posts: 5
- Joined: 2003-05-25 15:21
Post
by Daehend » 2003-05-26 15:27
Ok. Thank you.
"Make love, if you want. Just make sure you have enough time for making war, too."
-Anonymous
-
GargoyleMT
- DC++ Contributor
- Posts: 3212
- Joined: 2003-01-08 02:46
- Location: .pa.us
Post
by GargoyleMT » 2003-05-26 17:19
Hmm, isn't this more of a programming question?
I'll move this with a shadow

Users browsing this forum: Google [Bot] and 0 guests