flat assembler
Message board for the users of flat assembler.
Index
> Windows > Question about NONCLIENTMETRICS |
Author |
|
Picnic 13 Oct 2013, 09:04
Hello,
I see the NONCLIENTMETRICS structure in MSDN Code: typedef struct tagNONCLIENTMETRICS { UINT cbSize; int iBorderWidth; int iScrollWidth; int iScrollHeight; int iCaptionWidth; int iCaptionHeight; LOGFONT lfCaptionFont; int iSmCaptionWidth; int iSmCaptionHeight; LOGFONT lfSmCaptionFont; int iMenuWidth; int iMenuHeight; LOGFONT lfMenuFont; LOGFONT lfStatusFont; LOGFONT lfMessageFont; #if (WINVER >= 0x0600) ; here int iPaddedBorderWidth; #endif } I want to implement the preprocessor directive in fasm. Code: if defined WINVER if WINVER >= 0x600 iPaddedBorderWidth dd ? end if end if That means i have to define WINVER manually and replace it's value depending the Windows version i compile for each time? Thank you. |
|||
13 Oct 2013, 09:04 |
|
Picnic 13 Oct 2013, 10:07
Ah, neat, It says so on remarks
My app now seems to work on both xp/vista. Have a nice day revolution. Code: mov [ncm.cbSize], sizeof.NONCLIENTMETRICS mov [lpVersion.dwOSVersionInfoSize], sizeof.OSVERSIONINFO invoke GetVersionEx, lpVersion .if ( [lpVersion+OSVERSIONINFO.dwMajorVersion] < 6 ) ; #if (WINVER < 0x0600) sub [ncm.cbSize], 4 .endif |
|||
13 Oct 2013, 10:07 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.