Hey RedGeneral,
I used the following windows dll's
load dll "Shell32.dll" ,_DLL_SHELL32
load dll "User32.dll" ,_DLL_USER32
load dll "Gdi32.dll" ,_DLL_GDI32
load dll "Kernel32.dll" ,_DLL_KERNEL32
Shell32:
launching webbrowser links
CALL DLL _DLL_SHELL32,"ShellExecuteA",0,"Open",Url$,"","",1
CALL DLL _DLL_SHELL32,"ShellExecuteA",0,"Open","mailto:" + FriendsEmail$ + "?Subject=" + Message$(_MSG_EM4) +"&body=" + BodyText$,"","",1
Used for preparing a form email and then calling the default email client
User_32:
Dialog Boxes (with extended messages and various button configs) - see attached source, I've included the dialog box function
Used for Quit, HiScores, Nag Screen, About, Level results, Shuffle Options and every other dialog in the game
call dll(_DLL_USER32,"GetSystemMetrics",0)
Used for returning the desktop res
call dll _DLL_USER32,"SetForegroundWindow",hWnd
Used to force dialogs to the foreground to prevent them being hidden before they are returned
hWnd = call dll(_DLL_USER32,"FindWindowA",0,Message$(_MSG_EM4) + " - Message - Microsoft Word")
Return the handle of a specific app that is also running.
call dll _DLL_USER32,"SetWindowPos",App_hWnd,Z_Order,0,0,0,0,SWP_NOSIZE + SWP_NOMOVE
Used to set the window position on screen (I used it to auto centre the game regardless of game res or desktop res)
GDI32:
call dll(_DLL_GDI32, "GetDeviceCaps", hdc, 12)
used for returning the desktop display depth
Kernel32:
LangId = Call Dll(_DLL_KERNEL32,"GetUserDefaultLangID")
Used to return the language ID that the user has set in windows. I use a lookup table with all the LCID codes to determine which language file to launch. The game is fully localized with all game text refering to language files(including the helpfile) It defaults to English if it can't find the other language files. All of these messages ahave hooks in the game since I intend to release spanish and french version as soon as I can.
I have a stack of other functions and calls for doing all sorts of other stuff - Too much to list here, and much of this is for use in the shell which is a stand alone app for pluging my games in to so i don't have to do all this every time i make a new game. hoepfully it will make for a more rapid development.
I hope this answers some of your questions.
- AsylumHunter
still falling out of my binary tree most evenings (hicup!)