flat assembler
Message board for the users of flat assembler.

Index > Windows > DEVMODE

Author
Thread Post new topic Reply to topic
keenin



Joined: 25 Aug 2003
Posts: 33
keenin 25 Aug 2003, 17:49
Because nobody answers at Win32Asm, I post the thread to this forum (here, the people are more active and wise Smile ).

http://board.win32asmcommunity.net/showthread.php?s=&threadid=14867

And the text (just if you don't want to follow that link Wink :

I just began to program with FASM and encountered that the inc-files of FASM does not declare the DEVMODE struct and switches of wingdi.h (which I need to change the screen resolution).
Has anyone already done this or do I have overlooked it?

keenin.
Post 25 Aug 2003, 17:49
View user's profile Send private message Reply with quote
scientica
Retired moderator


Joined: 16 Jun 2003
Posts: 689
Location: Linköping, Sweden
scientica 25 Aug 2003, 19:10
I have come across this struc when doing some OpenGL (it was some time - but I found the extra includes -- don't know if I ever posted it (but i think so because the union isn't "fixed" -- I'll see if I can find the fixed version in my archives), so I post it now - it's filled with not just DEVMODE stuff but some more, but feel free to sort out the relevant data Smile)

Code:
struc DEVMODE
{
        .dmDeviceName           rb 32   ;BYTE   CCHDEVICENAME dup(?)
        .dmSpecVersion          dw ?
        .dmDriverVersion        dw ?
        .dmSize                 dw ?
        .dmDriverExtra          dw ?
        .dmFields               dd ?
        ;union
        ;  ;struct
                .dmOrientation  dw ?
                .dmPaperSize    dw ?
                .dmPaperLength  dw ?
                .dmPaperWidth   dw ?
        ;  ;ends
        ;       .dmPosition equ .dmOrientation  ;POINTL <>
        ;ends
        .dmScale                dw ?
        .dmCopies               dw ?
        .dmDefaultSource        dw ?
        .dmPrintQuality         dw ?
        .dmColor                dw ?
        .dmDuplex               dw ?
        .dmYResolution          dw ?
        .dmTTOption             dw ?
        .dmCollate              dw ?
        .dmFormName             rb 32 ;BYTE CCHFORMNAME dup (?)
        .dmLogPixels            dw ?
        .dmBitsPerPel           dd ?
        .dmPelsWidth            dd ?
        .dmPelsHeight           dd ?
        .dmDisplayFlags         dd ?
        .dmDisplayFrequency     dd ?
        .dmICMMethod            dd ?
        .dmICMIntent            dd ?
        .dmMediaType            dd ?
        .dmDitherType           dd ?
        .dmReserved1            dd ?
        .dmReserved2            dd ?
}
struct DEVMODE  
    


Description: Extra Includes For OpenGL applications -- wingdi.h defs.
(--Old--)

Download
Filename: Ext.inc
Filesize: 8.94 KB
Downloaded: 844 Time(s)


_________________
... a professor saying: "use this proprietary software to learn computer science" is the same as English professor handing you a copy of Shakespeare and saying: "use this book to learn Shakespeare without opening the book itself.
- Bradley Kuhn
Post 25 Aug 2003, 19:10
View user's profile Send private message Visit poster's website Reply with quote
keenin



Joined: 25 Aug 2003
Posts: 33
keenin 25 Aug 2003, 20:29
Thanks a lot, it helps me very much (and hopefully other people that need these declarations).

A fixed version will be very welcome, too. Very Happy

keenin.
Post 25 Aug 2003, 20:29
View user's profile Send private message Reply with quote
scientica
Retired moderator


Joined: 16 Jun 2003
Posts: 689
Location: Linköping, Sweden
scientica 25 Aug 2003, 20:52
Sorry, can't find the "fixed" version, It's probably somewhere on my backups - at times like these I wish I'd catalogized them Rolling Eyes

But I found the "union" thing (I thought I'd asked if I did the union right - and I did ask it in the v1.44 thread, and privalov corrected me Smile)
Code:
struc DEVMODE
{
        .dmDeviceName           rb 32   ;BYTE   CCHDEVICENAME dup(?)
        .dmSpecVersion          dw ?
        .dmDriverVersion        dw ?
        .dmSize                 dw ?
        .dmDriverExtra          dw ?
        .dmFields               dd ?
        ;union
        ;  ;struct
                .dmOrientation  dw ?
                .dmPaperSize    dw ?
                .dmPaperLength  dw ?
                .dmPaperWidth   dw ?
        ;  ;ends
        virtual at .dmOrientation
          .dmPosition dw ?
        end virtual
        ;ends
        .dmScale                dw ?
        .dmCopies               dw ?
        .dmDefaultSource        dw ?
        .dmPrintQuality         dw ?
        .dmColor                dw ?
        .dmDuplex               dw ?
        .dmYResolution          dw ?
        .dmTTOption             dw ?
        .dmCollate              dw ?
        .dmFormName             rb 32 ;BYTE CCHFORMNAME dup (?)
        .dmLogPixels            dw ?
        .dmBitsPerPel           dd ?
        .dmPelsWidth            dd ?
        .dmPelsHeight           dd ?
        .dmDisplayFlags         dd ?
        .dmDisplayFrequency     dd ?
        .dmICMMethod            dd ?
        .dmICMIntent            dd ?
        .dmMediaType            dd ?
        .dmDitherType           dd ?
        .dmReserved1            dd ?
        .dmReserved2            dd ?
}
struct DEVMODE  
    

btw, there are some union macros in one of the forums, don't use it any more (haven't needed to). I wonder if the union can utilize "fix".

_________________
... a professor saying: "use this proprietary software to learn computer science" is the same as English professor handing you a copy of Shakespeare and saying: "use this book to learn Shakespeare without opening the book itself.
- Bradley Kuhn
Post 25 Aug 2003, 20:52
View user's profile Send private message Visit poster's website Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.