PDA

View Full Version : Need help "converting" a API command



Novice Dave
03-15-2002, 08:36 PM
Hi, I hope this is an appropriate forum for this type of question. Keep in mind I don’t have a clue as to what I’m talking about. I am using an Authoring System called “Formula Graphics”. It allegedly has the capability to utilize Dynamic link libraries (DLL's) to extend the features of an application. In other words, Formula Graphics can load a DLL and execute a function within that DLL.

In the following example (Example “A”), Formula Graphics can take the following command I got from a API Viewer and make the cursor go to the upper right hand corner of the screen.

The string from the API Viewer looks like this:

Private Declare Function SetCursor Lib "user32" (ByVal hCursor As Long) As Long

When “converted” to the Formula Graphics “language”, the Formula Graphics script looks like this:

Example A:

handle= new dll “user32.dll”
x=1
y=1
dll handle call “SetCursorPos”: TYPE_LONG x, TYPE_LONG y

Alright, that works just fine. My question is how I would “convert” the following API string into the Formula Graphics “language”. In other words, if the example “A” is true, how would example “B” look?

Example B:

Private Declare Sub SetWindowPos Lib "User32" (ByVal hWnd As Long, ByVal hWndInsertAfter As Long, ByVal X As Long, ByVal Y As Long, ByVal cx As Long, ByVal cy As Long, ByVal wFlags As Long)


According to the API Viewer, the above command can be used to “Set Window Position”, which is what I want to do.

By reading the previous posts here, I realize this Formula Graphics stuff is pretty primitive in comparison to what you guys are working with. But for the time being, it’s all I have to work with. Unfortunately I’ve built the software I have been working on for five years around this technology.

Thanks for taking the time to read this.
Novice Dave
delivertodavid@yahoo.com