User lib / DLL for a windows Message DLG.
Community Forums/Showcase/User lib / DLL for a windows Message DLG.
| ||
http://www.teamrebellion.co.uk/downloads/msg_dll.zip This is nothing special, Just the first DLL and userlib iv ever done so I wanted to post it. It allows you to call up a windows dialog. like a Warnign or Alert dlg, could be used to send the use alerts or better runtime errors. what ever. decls file the DLL and an example is all in the zip. Enjoy. |
| ||
Does it differ from this command... I have used it to display any "normal" windows message I have needed: http://www.blitzbasic.com/b3ddocs/command.php?name=RuntimeError&ref=2d_cat |
| ||
It apparently also allows you to make warning, error, information, confirmation, and custom alerts with 11 different possible button texts. Cool. thanks yavin. how about supporting more than one button and returning which was hit? |
| ||
@ Mustang .. like bot builder said. :) @ bot .. Yeah m8 im working on it, the problem is that the custom ones are a dif data type so I need to take that into account. Its also my first one ever so Ill work away on it get it working and then re post it. |
| ||
Why do you need a dedicated DLL for this? You could very well have made direct calls to the windows API. No need for a 300 kb DLL for MessageDialog, use some decls like that (not tested): .lib "user32.dll" MessageBox%(hWnd%, lpText$, lpCaption$, uType%):"MessageBopxA" and grab the needed constants from the MSDN doc. Pass 0 for the first parameter. |
| ||
This is nothing special, Just the first DLL and userlib iv ever done so I wanted to post it. Try reading my post first please :P Anyway It seems I got the case statement wrong way round, so at the moment the last two paramaters in my DLL are the wrong way round, ill fix that though. |
| ||
I have read it, no worry :) But I have also read this Cool. thanks yavin. and I think it's worth for bot builder to understand that it's just a try and not the best way of doing it. |
| ||
yeah. You could actually probably give the message box your programs hwnd... if you assume it is active at the time. Yeah, infact you can use GetActiveWindow%() in the user32.decls :) Yeah.. I sorta misunderstood :) well, I didn't know that the messagebox thing in user32 took a type parameter. ohwell. cangratulations on your first decls. |
| ||
You can just send a hwnd of 0 and it will still work. |
| ||
Yep, as I said BTW Pass 0 for the first parameter. :p |
| ||
oh yeah, I wasn't saying that you needed the hwnd- my idea is that it probably does somthing to the window or centers the message on the window if you give it a hwnd. |