News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

High Resolution DC?

Started by sudoku, May 20, 2024, 03:02:22 AM

Previous topic - Next topic

sudoku

Has anyone done work using a much higher resolution DC than their screen dimensions?
I am working on a sudoku GUI and scaling up screen captures to 4K results in crappy quality for YouTube video uploads.
I envision creating a DC (and memory bitmap) at a couple times my screen dimensions (or there about) solely for the purpose of such captures (and not for the GUI display, which will use normal size). That means larger font size, etc. Does that even sound plausible? Just a theory so far btw.

:azn:

jj2007

Quote from: sudoku on May 20, 2024, 03:02:22 AMDoes that even sound plausible?

Yes. Just study anything printer DCs - same problem, as printers have a much higher resolution than a monitor.

sudoku

Quote from: jj2007 on May 20, 2024, 03:13:35 AM
Quote from: sudoku on May 20, 2024, 03:02:22 AMDoes that even sound plausible?

Yes. Just study anything printer DCs - same problem, as printers have a much higher resolution than a monitor.

Ah okay. I hadnt thought about printer DC's.  I had never done any printer related coding. Some more research needed before trying to code it up.  :biggrin:
btw wrong thread for your attachment? :tongue:


:azn:

jj2007

Quote from: sudoku on May 20, 2024, 03:16:19 AMwrong thread for your attachment?

It seems I unvoluntarily added this attachment, which belongs to this post. Perhaps I was distracted for a moment. Weird.

daydreamer

Literary thinking outside the box?
Code backbuffer
,but use really big backbuffer and stretch BLT ?
I only done bigger backbuffer than screen size in dos to "scroll" thru earlier
my none asm creations
https://masm32.com/board/index.php?topic=6937.msg74303#msg74303
I am an Invoker
"An Invoker is a mage who specializes in the manipulation of raw and elemental energies."
Like SIMD coding

jj2007

Quote from: daydreamer on May 20, 2024, 03:39:54 AMuse really big backbuffer and stretch BLT ?

No, that won't work. StretchBlt just blows up the low resolution to a pixelated "high" resolution.

NoCforMe

Interesting question.
So how does one go about creating such a "high-resolution" (i.e., large memory buffer) DC?

One guess: rather than using a printer DC, which might work but would be fairly clunky to implement, how 'bout
1. Creating a window of the desired size (doesn't have to be visible)
2. Getting a DC to that window, which should also be that same size

Would that work? You could paint into that window's DC to your heart's content, then either save it to a file or transfer it (or parts of it) to a display window.

BTW, shouldn't this really be in the Windows API forum since it deals with device contexts, which after all are a Windows GUI thing?
Assembly language programming should be fun. That's why I do it.

sudoku

Quote from: NoCforMe on May 20, 2024, 04:20:18 AMrather than using a printer DC, which might work but would be fairly clunky to implement, how 'bout
1. Creating a window of the desired size (doesn't have to be visible)
2. Getting a DC to that window, which should also be that same size
Thats another option that seems viable.
QuoteBTW, shouldn't this really be in the Windows API forum since it deals with device contexts, which after all are a Windows GUI thing?
As I was not yet implementing this, it was just a simple question. The Campus is appropriate.  :smiley:

Quote from: Campus DescriptionA protected forum where programmers learning assembler can ask questions in a sensible and safe atmosphere without being harassed or insulted.
We are all still learning, since no one knows everything. :tongue:
:azn:

sudoku

Quote from: jj2007 on May 20, 2024, 04:11:33 AM
Quote from: daydreamer on May 20, 2024, 03:39:54 AM... stretch BLT ?
No, that won't work. StretchBlt just blows up the low resolution to a pixelated "high" resolution.
Yes, exactly. Hence my search for other methods than stretching or scaling a lower resolution.  :azn:
:azn:

NoCforMe

Quote from: sudoku on May 20, 2024, 04:32:00 AMAs I was not yet implementing this, it was just a simple question. The Campus seemed appropriate.
It's not a question of implementation, it's a question of subject matter.
Assembly language programming should be fun. That's why I do it.

NoCforMe

$dcWinW EQU 2000
$dcWinH EQU 1600
$dcWinID EQU 1234

INVOKE CreateWindowEx,
0, ;EXstyles
OFFSET MyClassName, ;Need to register this class first
NULL, ;window title/text
WS_CHILD, ;Notice no WS_VISIBLE
0, ;X-pos
0, ;Y-pos
$dcWinW, ;width
$dcWinH, ;height
MainWinHandle, ;parent
$dcWinID, ;menu/ID
InstanceHandle,
0 ;param
MOV DCwindowHandle, EAX
INVOKE GetDC, EAX
MOV DCwindowHDC, EAX

You might have to use CreateCompatibleDC() instead of GetDC(). More research needed.
Assembly language programming should be fun. That's why I do it.