Page 1 of 1

Posted: Sat Dec 21, 2002 1:44 pm
by BackupUser
Restored from previous forum. Originally posted by dmoc.

I am trying to call CreateWindowExA_() as shown below but PB does not recognise it as a valid function. So first question is how do I find out what is/ is not supported? Second question is to do with the way the string parameters are used. In this example from XBasic (my own code, which works) the &"..." is valid and returns the address of the string literal. Can I just replace & with @? I ask rather than try it because I want to avoid crashing my mc. PS - my OS is Win98SE. Thank in advance for any help.

w.l = CreateWindowExA_(#WS_EX_TOPMOST,&"EDIT",&" ",#WS_VISIBLE+#WS_POPUP,0,0,GetSystemMetrics_(#SM_CXSCREEN),GetSystemMetrics_(#SM_CYSCREEN),0,0,0,0)

Posted: Sat Dec 21, 2002 2:00 pm
by BackupUser
Restored from previous forum. Originally posted by Kale.

CreateWindowEx_() is supported, if this is the same thing?

--Kale

New to PureBasic and falling in Love! :)

Posted: Sat Dec 21, 2002 2:18 pm
by BackupUser
Restored from previous forum. Originally posted by dmoc.

Yeah, I eventually used this (see other post). I checked the original c code and it also does not use the "A" version. Maybe something I have fudged when converting it to XBasic. Oh well, it will have to remain a mystery because PB has my full attention at the moment. Question still remains though: where to find out what is/ is not supported? BTW I have discovered "Compilers\PBFunctionListing.txt" which seems to list all valid functions, even from user libraries.

Posted: Sat Dec 21, 2002 3:01 pm
by BackupUser
Restored from previous forum. Originally posted by Hi-Toro.

[...]\PureBasic\PureLibraries\Windows\Libraries\APILIST.TXT seems to show the list of available Win32 function calls (note that it doesn't appear to be totally in alphabetical order -- for example STGMEDIUM_UserUnmarshal comes before SafeArrayAccessData due to the capitalisation, as far as I can see). Interestingly, I've only just discovered this, and there do appear to be lots of commands I didn't know existed!


--
See ya,
James L Boyd.
http://www.hi-toro.com/
--

Posted: Sun Dec 22, 2002 3:05 pm
by BackupUser
Restored from previous forum. Originally posted by dmoc.

Hiya James, nice to see a familiar name from you know where! Thanks for your pointer but I cannot find that file, maybe PBFunctionListing.txt replaces it in the latest version.

Posted: Sun Dec 22, 2002 3:44 pm
by BackupUser
Restored from previous forum. Originally posted by freak.

Hi,

The docs say, all WinAPI Functions are supported. Well, we've found very few ones, that aren't, but basically you can say, that it's all there. If you find one, that isn't supported, you'll get the Error Message: 'SomeApiCall_()' is not a function, an array or a linked list.

But that shouln't happen to much times.

Onething about API Calls like CreateWindowExA_():

There are a lot of API calls where there are three calls for it, like

CreateWindowExA_()
CreateWindowExU_()
CreateWindowEx_()

The ones with the 'A' are to be used with ANSI Strings, and the ones with the 'U' are to be used with UNICODE Strings.

Now the one without 'A' or 'U' is kind of a Shortcut, that calls the
right Function for ANSI/UNICODE Systems.

The Point is, as PureBasic doesn't Support UNICODE, there is no need for a Selection, so PureBAsic only Supports the ones without 'A' and 'U'. In this case, it's only 'CreateWindowEx_()'.

So all these Calls ending with an 'A' and 'U' are not supported, use the one without the Ending instead.


That's it, happy coding...

Timo

Posted: Sun Dec 22, 2002 5:43 pm
by BackupUser
Restored from previous forum. Originally posted by Kale.

Thanks for clearing that one up Timo :)

--Kale

New to PureBasic and falling in Love! :)

Posted: Sun Dec 22, 2002 10:03 pm
by BackupUser
Restored from previous forum. Originally posted by dmoc.

Cheers Timo