Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Program Announcements / Get Desktop Resolutions Plugin - Avoid Blurry GFX

Author
Message
Rob K
Retired Moderator
22
Years of Service
User Offline
Joined: 10th Sep 2002
Location: Surrey, United Kingdom
Posted: 21st May 2003 21:29
The reason why DBP apps look blurry in most cases is because your desktop resolution is 800x600 for example but the DBP app is only 640x480 pixels (by default, obviously you can change this)

DBP doesn't have any built in commands to get your desktop resolution so I produced one.

Commands: GET DESKTOP WIDTH() and GET DESKTOP HEIGHT()

To set DBP screen width/height to your desktop resolution, put this at the top of your code:

SET DISPLAY MODE Get Desktop Width(),Get Desktop Height(),Screen Width()

Full readme and installation instructions in the zip, DLL is 9KB in size:

http://snow.prohosting.com/~clone99/downloads/deskres.zip (you MUST left-click on this link and the one after. Right-click > Save As will not work)
Do you want Windows menus in your DBP apps? - Get my plugin: http://snow.prohosting.com/~clone99/downloads/tpc_menus_102.zip
Shadow Robert
22
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 21st May 2003 22:03
yes it does run the backbuffer in window mode and you can tell the desktop resolution...



throw that into an include file, and hey presto

Within the Epic battle of the fates the Shadow and the Angel will meet. With it will harbinger the very fight of good vs evil!
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 21st May 2003 22:42
That doesn't get you the desktop resolution - for me, it just reports the window size I set it to.

The commands I included in my utility plugin, and the old-style dll stuff I've released all work correctly

I assume that Rob's will work - if the download screen didn't take me in circles!
Rob K
Retired Moderator
22
Years of Service
User Offline
Joined: 10th Sep 2002
Location: Surrey, United Kingdom
Posted: 21st May 2003 22:56
The download screen (which I cannot control) works perfectly, but you must use left-click all the time.

@Raven

I tried your method just to make sure - it doesn't work

@IanM

I hadn't realised that you had already released a plugin for this - sorry.

Do you want Windows menus in your DBP apps? - Get my plugin: http://snow.prohosting.com/~clone99/downloads/tpc_menus_102.zip
Rob K
Retired Moderator
22
Years of Service
User Offline
Joined: 10th Sep 2002
Location: Surrey, United Kingdom
Posted: 21st May 2003 23:06
Edit:

Alternate download -

http://www.realgametools.net/forums/attachments/deskres.zip

Do you want Windows menus in your DBP apps? - Get my plugin: http://snow.prohosting.com/~clone99/downloads/tpc_menus_102.zip
Shadow Robert
22
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 21st May 2003 23:15
interesting... its what i used in DB - kinda assumed it worked fine in pro too - weird it doesn't as it should be using the exact same intilisation

Within the Epic battle of the fates the Shadow and the Angel will meet. With it will harbinger the very fight of good vs evil!
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 21st May 2003 23:20
We aren't working in a monopoly

Is this developed in Delphi? - it seems to produce pretty tight code.
Rob K
Retired Moderator
22
Years of Service
User Offline
Joined: 10th Sep 2002
Location: Surrey, United Kingdom
Posted: 21st May 2003 23:23 Edited at: 21st May 2003 23:25
This is Delphi indeed. It is capable of producing some very tight code - but you have to strip the GUI libs out first. The moment you add the Dialogs or Forms units for example, the output size skyrockets by 300+ KB. But after that, you can add hundreds of libs and the size will barely increase at all. Most of my large scale apps are about 600-700KB in size, and compress to 400KB.

To keep size down, I sometimes use the Windows API functions instead of Delphi's GUI objects.

Do you want Windows menus in your DBP apps? - Get my plugin: http://snow.prohosting.com/~clone99/downloads/tpc_menus_102.zip
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 21st May 2003 23:30
Well, seeing as PCPlus gave away Delphi 7 a few months ago, I might just have a little play with it and see it we can't get along. It could even lead to a Delphi edition of the interface library.
Rob K
Retired Moderator
22
Years of Service
User Offline
Joined: 10th Sep 2002
Location: Surrey, United Kingdom
Posted: 22nd May 2003 00:19
I would love to see that

Pascal is not that hard to learn, I am not sure if you are familiar with it or not, if you are then apologies for this. If not, quick crash course:

variables: Generally same names as C, lpstr is "string", long is "int64".

Variable assignments:

If data is being moved:



if data is not being moved (eg and if statement)



Replace all {s / }s from C with begin / end:

eg:


if you DON't include the begin / end, then the first line after the statement is run only:

ie:



is the same as




Procedures are defined like so:



(cdecl is essential as I recently found out)

Functions are like so:




You specify the libs to use via the uses clause at the top of the unit

eg:



exports for a DLL are like this (at end of code):

exports
functiona,
functionb,
functionc;

Each unit (like a .cpp file, only ending in .pas) must end with

"end."

Basic structures:



To help you going, I have included the source code to my menus DLL, it is pretty short but it took a while to research.

The only problem is that I have not been able to figure out how to get resource strings working properly. So I create/test the dll using the LOAD DLL / CALL DLL functions, then I use a tool called PE Explorer (written in Delphi) to delete all other resource strings and add my own.

Do you want Windows menus in your DBP apps? - Get my plugin: http://snow.prohosting.com/~clone99/downloads/tpc_menus_102.zip
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 22nd May 2003 10:33
That's mostly as I remember.

Do you have a pascal version of the GlobStruct? Or do I have to generate it myself? - Or maybe I can sweat-talk GuyS into giving me a copy of what he uses ... in fact, I do have some emails from him somewhere with example code in

The good news is that as far as the library is concerned, the code generator will handle almost everything already - I just made some assumptions about C++ types that I'll have to convert to soft-code... Although it's probably far too early to talk about that!
Rob K
Retired Moderator
22
Years of Service
User Offline
Joined: 10th Sep 2002
Location: Surrey, United Kingdom
Posted: 22nd May 2003 13:58
Sorry, I don't have a pascal version of GlobStruct.

Do you want Windows menus in your DBP apps? - Get my plugin: http://snow.prohosting.com/~clone99/downloads/tpc_menus_102.zip
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 22nd May 2003 22:25
I've been looking at creating a resource string table in Delphi. These is apparently an editor, but this doesn't come with the personal edition, so I worked out this method.

Create a shortcut on your desktop called 'Resource Compiler' and link it to the brcc32.exe in your Borland bin folder.

Create a file called Project.rc in you project folder, and put something like the following inside:

STRINGTABLE
{
1, "MY TEST COMMAND%0%MyTest%"
}

Now just drag this file onto the shortcut and release the mouse button. This will compile the resource into a Project.res file.

To include this in your project, just add the following line:

{$R Project.res}

Give it a go
Rob K
Retired Moderator
22
Years of Service
User Offline
Joined: 10th Sep 2002
Location: Surrey, United Kingdom
Posted: 23rd May 2003 05:12
Thanks IanM

Do you want Windows menus in your DBP apps? - Get my plugin: http://snow.prohosting.com/~clone99/downloads/tpc_menus_102.zip

Login to post a reply

Server time is: 2024-11-21 13:38:31
Your offset time is: 2024-11-21 13:38:31