![]() lpClassName - Printable Version -Shoutbox (https://shoutbox.menthix.net) +-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58) +--- Forum: Messenger Plus! for Live Messenger (/forumdisplay.php?fid=4) +---- Forum: Scripting (/forumdisplay.php?fid=39) +----- Thread: lpClassName (/showthread.php?tid=74487) lpClassName by saralk on 05-18-2007 at 12:24 PM How do you find out the ClassName of an application? RE: lpClassName by Matti on 05-18-2007 at 04:27 PM
You might want to take a look at this page in the MSDN library. quote:That means:
WARNING: UNTESTED CODE. Mattike was too bored to actually test this, since he would have no idea what to test it on. code:Why don't you try it, and tell us if it worked? ![]() RE: lpClassName by CookieRevised on 05-18-2007 at 04:45 PM
quote:It depends on what you mean by 'application'... An application can contain many windows, and each window can have its own classname. Also classnames are rarely unique. Many windows have the same classname (just pointing it out as this is sometimes a mistake made when searching for windows with Windows APIs like FindWindow)... quote:Not really, a classname has a maximum length of 256 characters, incl. null character (iirc). This means your buffer must always be at least 256 characters big. Also the Windows API GetClassName comes in two modes, ascii and wide. So you need to specify this too (best to use the wide/unicode version): Interop.Call("user32", "GetClassNameW", ... RE: lpClassName by saralk on 05-18-2007 at 05:06 PM
ok, i'll tell you what I want to do and maybe you can help me more RE: lpClassName by Matti on 05-19-2007 at 01:18 PM Well, you can use Shell_NotifyIconW to create a tray icon and it uses a NOTIFYICONDATA structure for the information, but I can't seem to find a function to retrieve such structure from a tray icon... |