![]() [?] API Help. - 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: [?] API Help. (/showthread.php?tid=75610) [?] API Help. by roflmao456 on 06-25-2007 at 03:23 AM how do i check if a window is not focussed and if it's not focussed it will flash? RE: [?] API Help. by CookieRevised on 06-25-2007 at 03:49 AM
Search the msdn library for "focus window" and "flash window". RE: [?] API Help. by matty on 06-25-2007 at 04:40 AM
quote:Look at the API calls for GetForegroundWindow and FlashWindow or FlashWindowEx. RE: [?] API Help. by roflmao456 on 06-25-2007 at 10:51 PM
err.. code: is it used correctly? RE: [?] API Help. by matty on 06-26-2007 at 01:17 AM
quote:Because you posted code and attempted it I will help you. However I am going to break down the MSDN article regarding this API Call. We first look at the syntax itself: quote: Now looking at the syntax we see that the function name is GetForegroundWindow and the parameters are VOID which means it does not accept any parameters. This is evident by the fact that there is no Parameters section in the documentation. The next part we look at is the Return Value section quote: This shows that when you call the function the return value will be the handle of the foreground window. With this all said the code you should be writing should call the function then compare it to the handle of the window. If you are still confused here is the code. However I suggest trying to learn to understand this documentation from Microsoft as it helps and provides documentation on all of it's APIs. code: Of course the code can always be shorted like this: code: RE: [?] API Help. by roflmao456 on 06-26-2007 at 02:33 AM
go Matty RE: [?] API Help. by CookieRevised on 06-27-2007 at 11:34 PM
quote:The expression used in the tenary check already returns true or false, therefore no need for putting it into a tenary check in the first place. (and parameter pPlusWnd is missing) =>>>> code: ![]() RE: [?] API Help. by matty on 06-28-2007 at 07:08 PM
quote:Good point I thought this was something you were going to add when I saw you had posted in the thread. I was assuming he had already declared pPlusWnd else where that is why it wasn't passed as a parameter. I hope roflmao456 can figure out the other ones on his own tho. |