hi,
Do anyone know the difinitions of "DM_BITSPERPEL" in Masm32 ?
Which include file is lost in my code?
-------------------------------------------------
my include headers:
this is the procedure to change Display settings
this is Radasm compiler message
From MSDN ,it said the constant difinitions of "DM_BITSPERPEL" and "DM_DISPLAYFREQUENCY " are defined in :
Header: Declared in Winuser.h; include Windows.h.
Library: Use User32.lib.
so,where do I get to know these two definitions in MASM32 ?
---
Thanks in advance!
RGS!
Do anyone know the difinitions of "DM_BITSPERPEL" in Masm32 ?
Which include file is lost in my code?
-------------------------------------------------
my include headers:
include \masm32\include\windows.inc
include \masm32\include\masm32.inc
include \masm32\include\gdi32.inc
include \masm32\include\user32.inc
include \masm32\include\kernel32.inc
include \masm32\include\Comctl32.inc
include \masm32\include\comdlg32.inc
include \masm32\include\shell32.inc
include \masm32\include\oleaut32.inc
include \masm32\include\dialogs.inc
include \masm32\macros\macros.asm
include \masm32\include\debug.inc
this is the procedure to change Display settings
SetDisplayMode proc dwNewWidth,dwNewHeight,dwNewColor,dwNewFreq
local NewDM:DEVMODE
mov NewDM.dmSize,sizeof DEVMODE ;size of DEVMODE structure
mov NewDM.dmDriverExtra,0 ;private driver data
push dwNewWidth
pop NewDM.dmPelsWidth
push dwNewHeight
pop NewDM.dmPelsHeight
push dwNewColor
pop NewDM.dmBitsPerPel
push dwNewFreq
pop NewDM.dmDisplayFrequency
mov ebx,DM_BITSPERPEL or DM_PELSWIDTH or DM_PELSHEIGHT
.if dwNewFreq != 0
or ebx,DM_DISPLAYFREQUENCY
.endif
mov NewDM.dmFields,ebx
invoke ChangeDisplaySettings,addr NewDM,CDS_UPDATEREGISTRY
ret
SetDisplayMode endp
this is Radasm compiler message
C:\RADASM\Masm32\Bin\ML.EXE /c /coff /Cp /nologo /I"C:\RADASM\Masm32\Include,C:\Program Files\Microsoft Visual Studio\VC98\Lib" "CHECKER.asm"
Assembling: CHECKER.asm
OsInfo.asm(84) : error A2006: undefined symbol : DM_BITSPERPEL
OsInfo.asm(87) : error A2006: undefined symbol : DM_DISPLAYFREQUENCY
From MSDN ,it said the constant difinitions of "DM_BITSPERPEL" and "DM_DISPLAYFREQUENCY " are defined in :
Header: Declared in Winuser.h; include Windows.h.
Library: Use User32.lib.
so,where do I get to know these two definitions in MASM32 ?
---
Thanks in advance!
RGS!
wingdi.h
/* field selection bits */
#define DM_ORIENTATION 0x00000001L
#define DM_PAPERSIZE 0x00000002L
#define DM_PAPERLENGTH 0x00000004L
#define DM_PAPERWIDTH 0x00000008L
#define DM_SCALE 0x00000010L
#if(WINVER >= 0x0500)
#define DM_POSITION 0x00000020L
#define DM_NUP 0x00000040L
#endif /* WINVER >= 0x0500 */
#if(WINVER >= 0x0501)
#define DM_DISPLAYORIENTATION 0x00000080L
#endif /* WINVER >= 0x0501 */
#define DM_COPIES 0x00000100L
#define DM_DEFAULTSOURCE 0x00000200L
#define DM_PRINTQUALITY 0x00000400L
#define DM_COLOR 0x00000800L
#define DM_DUPLEX 0x00001000L
#define DM_YRESOLUTION 0x00002000L
#define DM_TTOPTION 0x00004000L
#define DM_COLLATE 0x00008000L
#define DM_FORMNAME 0x00010000L
#define DM_LOGPIXELS 0x00020000L
#define DM_BITSPERPEL 0x00040000L
#define DM_PELSWIDTH 0x00080000L
#define DM_PELSHEIGHT 0x00100000L
#define DM_DISPLAYFLAGS 0x00200000L
#define DM_DISPLAYFREQUENCY 0x00400000L
#if(WINVER >= 0x0400)
#define DM_ICMMETHOD 0x00800000L
#define DM_ICMINTENT 0x01000000L
#define DM_MEDIATYPE 0x02000000L
#define DM_DITHERTYPE 0x04000000L
#define DM_PANNINGWIDTH 0x08000000L
#define DM_PANNINGHEIGHT 0x10000000L
#endif /* WINVER >= 0x0400 */
#if(WINVER >= 0x0501)
#define DM_DISPLAYFIXEDOUTPUT 0x20000000L
#endif /* WINVER >= 0x0501 */
Hi,ti_mo_n
Thanks for your kindness.
Now only add two difinitions in my app ,and that's O.K.
BTW,why MASM32 include headers are not so standardized?and if there is a manual about the MASM include files?(May be I should ask Mr.Hutch... :P)
---
Thanks again.
RGS!
Thanks for your kindness.
Now only add two difinitions in my app ,and that's O.K.
BTW,why MASM32 include headers are not so standardized?and if there is a manual about the MASM include files?(May be I should ask Mr.Hutch... :P)
---
Thanks again.
RGS!
Luckrock,
Both of those values are in windows.inc, at least in the latest one.
Searching for: DM_BITSPERPEL
windows.inc(15726): DM_BITSPERPEL equ 00040000h
Found 1 occurrence(s) in 1 file(s)
Searching for: DM_DISPLAYFREQUENCY
windows.inc(15730): DM_DISPLAYFREQUENCY equ 00400000h
Found 1 occurrence(s) in 1 file(s)
Use a search program to look for them in the MASM32 include files . If you don't find them, search the C header files for them. If you don't have the C headers get the Platform SDK.
Both of those values are in windows.inc, at least in the latest one.
Searching for: DM_BITSPERPEL
windows.inc(15726): DM_BITSPERPEL equ 00040000h
Found 1 occurrence(s) in 1 file(s)
Searching for: DM_DISPLAYFREQUENCY
windows.inc(15730): DM_DISPLAYFREQUENCY equ 00400000h
Found 1 occurrence(s) in 1 file(s)
Use a search program to look for them in the MASM32 include files . If you don't find them, search the C header files for them. If you don't have the C headers get the Platform SDK.
Hi,greg
Thanks , U are correct.
Any time do I need to search different INC files?
RGS!
Thanks , U are correct.
Any time do I need to search different INC files?
RGS!
Luckrock,
Just the ones in '\masm32\include'. If you don't find them in the MASM32 include files, you can get the values from C header (.h) files for Windows and create your own equates. If you don't have the bandwidth to get the Platform SDK, a good C compiler like Pelles C has the C header (.h) files for Windows.
Any time do I need to search different INC files?
Just the ones in '\masm32\include'. If you don't find them in the MASM32 include files, you can get the values from C header (.h) files for Windows and create your own equates. If you don't have the bandwidth to get the Platform SDK, a good C compiler like Pelles C has the C header (.h) files for Windows.
Here are all the header files if you need (Compressed from 68MB to 9MB).