Jump to content
  • Advertisement
Sign in to follow this  
Vagos

two issues for borland-turbo pascal: How to create window (win31 unit?) and how to output in desktop overlay

This topic is 2504 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi! I use the old borland pascal ('92) in win xp. Until now I compile in real mode and run with dosbox. How to use the windows mode and create a window?

Also, how to make the output to be sent in the desktop background, like winamp's avs?

Share this post


Link to post
Share on other sites
Advertisement

Hi! I use the old borland pascal ('92) in win xp. Until now I compile in real mode and run with dosbox. How to use the windows mode and create a window?

Also, how to make the output to be sent in the desktop background, like winamp's avs?


Borland Pascal is for DOS, not Windows , you cannot use it to create Windows applications, If you want to make Windows applications using Pascal you need a newer compiler.

Share this post


Link to post
Share on other sites
You are wrong, borland pascal is for windows (3.1 native). I has 3 modes, real, protected and windows app.

Share this post


Link to post
Share on other sites

Hi! I use the old borland pascal ('92) in win xp.


Why? You should post this in the paleocomputing forum. :)

Share this post


Link to post
Share on other sites
Not there, in the obsoletecomputing forum!:P Anyway, dont ask why I use this, just answer if you know what I am asking for!

Share this post


Link to post
Share on other sites
Hidden

How to use the windows mode and create a window?

You would need to link to the Windows 32-bit or 64-bit Win32 library.


Also, how to make the output to be sent in the desktop background, like winamp's avs?
[/quote]
You would need to use the 32-bit or 64-bit Windows DirectX library functionality.


You are wrong, borland pascal is for windows (3.1 native). I has 3 modes, real, protected and windows app.

Yes, but Windows has discontinued support for 16-bit applications since Windows XP.

Share this post


Link to post
According to this MSDN thread, you can render to the desktop by using FindWindow and FindWindowEx to grab the "Program Manager" and "FolderView" handles, and use GetDC and RedrawWindow to begin rendering and to redraw the desktop icons.

These functions are provided by the Win32 library, and can be used in any language that supports linking to C-library interfaces (consult your compiler's documentation). Whether or not this can be done in 16-bit Turbo Pascal is another question...

Share this post


Link to post
Share on other sites
Well, pascal supports these functions. I found the FindWindow, check the image. But I dont know how to create windows through pascal, the initialization and such staff. Any idea?

Also, I am not sure, but are you sure that the icons and folders must be redrawned, because it seems that winamp's avs just updates only the background..

Share this post


Link to post
Share on other sites
Turbo Pascal is for DOS. Windows 3.1 ran as a DOS application, which offer minimal layer of abstractions, including later (3.1 vs 3.0 IIRC) real vs. protected mode. Basically, you'd boot into DOS, then run win.com, which would do a lot of magic. I don't remember if it could run without that. Maybe the 3.1 32-bit version was standalone OS, the 16-bit and 3.0 were the old style.

It wasn't until Windows 95 that roles changed and Win 95 became the OS itself.

To develop a Windows 3.1 application, you need to run Windows 3.1 inside DosBox, if it even runs.

There is no way to break out of DosBox to host desktop - DosBox runs on any OS and is completely oblivious of Windows. There is only basic DOS support, so I have no clue if it's capable of running Win3.1 to a useful extent, let alone how interoperable it is with such applications.

But I dont know how to create windows through pascal, the initialization and such staff. Any idea?[/quote]
Win3.1 API is old.... That was before many of functional changes to structure of application, I remember that even Delphi was quite cumbersome at that time.

General approach is about the same as today, minus the MFC. One could, in theory, try digging out one of such tutorials and backporting it.

Share this post


Link to post
Share on other sites
The 32-bit versions of the Windows OSs maintained backwards compatibility for running Win16 and Win32s applications until at least Vista. If you're running a 64-bit version of the OS you need to do something like run a virtual machine.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!