Language: ChineseGermanSpanishFrenchDutchItalianRussian
123 Flash Chat Forums

Go Back   TOPCMM Community > SWFKit > SWFKit Support

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 02-27-2008, 06:04 PM
Junior Member
 
Join Date: Feb 2008
Posts: 2
Default getMousePos + WindowFromPoint with swf kit pro?

Hello! I am brand new to swf kit, and just getting on my feet, but I am very familiar with flash, and I used to be very familiar with win32 api programming using visual basic about a decade ago.

I am trying to recreate a program I created in VB - basically using getMousePos to assign location to a pointer struct, then using that point with WindowFromPoint - finally using SetWindowPos specifying the window just found... then setting a flag to keep that window on top of other windows, using the HWND_TOPMOST flag.

Anyways, is this possible with swf kit, and is this possible for a ffish beginner? :-[
Reply With Quote
  #2 (permalink)  
Old 02-27-2008, 07:48 PM
Senior Member
 
Join Date: Dec 2002
Posts: 2,015
Default Re: getMousePos + WindowFromPoint with swf kit pro?

Yes. The following code shows how to call these functions in ffish script

Code:
struct { 
 long x; 
 long y; 
} POINT;

dllimport "user32.dll" stdcall Boolean GetCursorPos(POINT*);
dllimport "user32.dll" stdcall pointer WindowFromPoint(POINT);

function traceWin() {
	var output = new Object;
	output.value = new Struct(POINT);
	GetCursorPos(output);
	var hwnd = WindowFromPoint(output.value);
	trace((new Window(hwnd)).caption); 
}

Application.setInterval(traceWin, 1000);
Reply With Quote
  #3 (permalink)  
Old 02-27-2008, 08:55 PM
Junior Member
 
Join Date: Feb 2008
Posts: 2
Default Re: getMousePos + WindowFromPoint with swf kit pro?

thanks! This will certainly help me tinker around. I'm so glad my company decided to go with the pro version ;D ;D ;D
Reply With Quote
Reply

Was this information helpful?    Yes No



Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 05:03 AM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0 ©2007, Crawlability, Inc.