mIRC Home    About    Download    Register    News    Help

Print Thread
#229508 08/02/11 12:58 AM
Joined: Jan 2010
Posts: 11
E
Pikka bird
OP Offline
Pikka bird
E
Joined: Jan 2010
Posts: 11
The idea is mainly for my themes. It would be really helpful if you could grab the .hwnd of the nicklist. Perhaps a $window(-4).hwnd.

Or another way to get around my battle with the nicklist menu is make a command to popup menus on command.

Just a thought. Any takers?

Thanks

extremity #229516 08/02/11 04:04 AM
Joined: Apr 2010
Posts: 969
F
Hoopy frood
Offline
Hoopy frood
F
Joined: Apr 2010
Posts: 969
Have u looked into the Nicklist menu and the identifier $submenu

Code:
menu Nicklist {
  $submenu($heyyou($1))
}
alias heyyou {
  if ($1 == being) { return }
  if ($1 == 1) { return this:echo -a do that }
  if ($1 == 2) { return that:echo -a do this }
  if ($1 == end) { return }
}


I am SReject
My Stuff
extremity #229517 08/02/11 06:07 AM
Joined: Oct 2003
Posts: 3,918
A
Hoopy frood
Offline
Hoopy frood
A
Joined: Oct 2003
Posts: 3,918
What exactly would the hwnd of the nicklist get you? There aren't [m]any mIRC commands that operate on hwnds, so accessing hwnds is pretty much a concern for dlls only. If your question is, "how do I get <insert DLL here> to use my nicklist", that sounds like something you should request with the authors of that DLL.

FWIW, a DLL can get the nicklist's window handle by enumerating the parent channel window, so giving it $window(#).hwnd should be enough information to get what you need.


- argv[0] on EFnet #mIRC
- "Life is a pointer to an integer without a cast"
argv0 #229531 08/02/11 07:46 AM
Joined: Jan 2010
Posts: 11
E
Pikka bird
OP Offline
Pikka bird
E
Joined: Jan 2010
Posts: 11
TY for the reply. I did state the feature request is for theming. Several DLLs could use this hWnd. (or as I said the ability to popup the menu manually)

mIRC is also generous enough to provide you hWnds to the parent and other windows. So that is why I am suggesting that if I have this much information, the amount of depth spent on providing one more hWnd could benefit myself and others.

extremity #229535 08/02/11 08:00 AM
Joined: Oct 2003
Posts: 3,918
A
Hoopy frood
Offline
Hoopy frood
A
Joined: Oct 2003
Posts: 3,918
But the HWND of a nicklist can be easily inferred from the HWND of the parent, which is already available. DLLs already *have* this HWND (or can have it), they're just not exposing it.

I'm not convinced by the argument that because one HWND is available, we should just throw them all in. This leads to bloat in the language. The HWND of the parent window is given because there is no other way to reliably access this value other than querying mIRC for the value, and therefore this is the only way to communicate this information to a DLL. The nicklist, however, can be reliably retrieved by a dll, given the parent HWND, and is NOT needed to be sent over by a script.


- argv[0] on EFnet #mIRC
- "Life is a pointer to an integer without a cast"

Link Copied to Clipboard