text viewport

New to FreeBASIC? Post your questions here.
Post Reply
ivory348
Posts: 49
Joined: Dec 14, 2019 12:07
Location: Groningen, Netherlands

text viewport

Post by ivory348 »

I understand that it is possible to create a smaller output frame withing the larger frame that the program is already projecting onto the console. I do have an example but the code is being crowded out by a lot of extra stuff. How is it done, might you have a reference, or an example?

Is this the essential code? But how is the background code of the smaller window differentiated from that of the larger window?

Code: Select all

fbgfxHwnd = GetConsoleWindow()
ws = GetWindowLongPtr( fbgfxHwnd, GWL_STYLE )
SetWindowLongPtr( fbgfxHwnd, GWL_STYLE, ws xor (WS_MAXIMIZEBOX or WS_MINIMIZEBOX) )
fxm
Moderator
Posts: 12107
Joined: Apr 22, 2009 12:46
Location: Paris suburbs, FRANCE

Re: text viewport

Post by fxm »

Is your question about the paragraph "Creating a Text View Port" at page 213 of the "A Beginner’s Guide to FreeBasic" book ?
If yes, see also VIEW PRINT.
MrSwiss
Posts: 3910
Joined: Jun 02, 2013 9:27
Location: Switzerland

Re: text viewport

Post by MrSwiss »

For diferent window coordinates (grapics mode) you'll want to look at: Window command.

The code you've posted uses WIN-API, which means: it's no longer OS independent.
(FB only code is OS independent, for all by FB supported platforms.)
Post Reply