News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

constants values

Started by Jimg, March 17, 2009, 06:14:52 PM

Previous topic - Next topic

Jimg

Is there some site one can go to, type in a standard windows constant name, and get back a numerical value?

e.g.   I want  -  CF_NOVERTFONTS

Yes, I finally find CF_NOVERTFONTS = &H1000000 in a few places, but

searching through the Google debris that prints out is a real pain and msdn is worthless for getting actual values.

There ought to be a site for this.


Vortex

A good trick is to use the powerful and light-weighted Pelles IDE. Simply type CF_NOVERTFONTS, right click it and the IDE will open commdlg.h highlighting the definition of CF_NOVERTFONTS :

#define CF_NOVERTFONTS  0x01000000L

drizz

under masm?

PUSHCONTEXT RADIX
.RADIX 16
%ECHO CF_NOVERTFONTS =  &H&@CatStr(%(CF_NOVERTFONTS))
POPCONTEXT RADIX


The truth cannot be learned ... it can only be recognized.

MichaelW

Good idea drizz :U

Encapsulated in a macro that displays the value of a constant or the size of a structure:

WHATIS MACRO arg
  PUSHCONTEXT RADIX
  .RADIX 16
  %ECHO arg = @CatStr(%(arg))h
  POPCONTEXT RADIX
ENDM

eschew obfuscation

Vortex


Jimg

?????

I have no idea what you guys are talking about.

I have no files named commdlg.h or any other .h files other than a few that are in C:\Windows\System32
I searched every file for the string and found none.

Vortex

Hi Jimg,

The .h file is from Pelles C development set.

windows.inc ( Version 1.4c RELEASE April 2008 coming with Masm32 V10 ) defines CF_NOVERTFONTS

Line 13106 :

CF_NOVERTFONTS                   equ 01000000h

drizz

Jimg, you don't have PSDK (.h files) or Win32Inc (.inc files) ?
The truth cannot be learned ... it can only be recognized.

Mark Jones

Hey Jim, I plugged that name into this:
http://www.masm32.com/board/index.php?topic=4018.0

Then double-clicked the result to open it, and searched for that name to find:

CF_NOVERTFONTS                   equ 01000000h
"To deny our impulses... foolish; to revel in them, chaos." MCJ 2003.08

Jimg

Interesting Mark.  I put it in the root of F: where I keep everything related to programming.

I put in the string and searched, but it didn't find anything.

I reset the first search path to   F:\*.*

This time when I searched, it just kept playing a three note tune over and over :)

Anyway, as you probably know, I have my own searcher here http://www.masm32.com/board/index.php?topic=7198.0

When I tried mine from the root of f:, it found
"F:\masm32\help\WIN32.HLP"
  bunch of binary stuff that drives the message editor crazy

"F:\VBProgs\a MattHart Progs\CHOOSFNT\choosfnt.frm"
141: Private Const CF_NOVERTFONTS = &H1000000

"F:\VBProgs\LogicPuzzle\Logic.frm"
2501: 'Private Const CF_NOVERTFONTS = &H1000000

"F:\VBProgs\LogicPuzzle\Baks\Logic.frm"
2207: 'Private Const CF_NOVERTFONTS = &H1000000

"F:\VBProgs\LogicPuzzle\Baks\bak0\Logic.frm"
1923: 'Private Const CF_NOVERTFONTS = &H1000000

"F:\VBProgs\LogicPuzzle\Baks\bak1\Logic.frm"
137: 'Private Const CF_NOVERTFONTS = &H1000000

"F:\VBProgs\LogicPuzzle\Baks\bak2\Logic.frm"
168: 'Private Const CF_NOVERTFONTS = &H1000000

"F:\VSCommon\Tools\Winapi\WIN32API.TXT"
15348: Const CF_NOVERTFONTS = &H1000000

"F:\WinAsm\Progs\StyleFlags\StyleFlags.asm"
318:             db  "CF_NOVERTFONTS", 0


I never thought to look in my old VB stuff. It's been ten years since I did that logic puzzle program.  I'll have to remember that old WIN32API.TXT file.

Still, these constants ought to be easily available somewhere. 

mitchi

In Visual Studio, you mouse hover the constant and the value tooltip pops up. No ?

Mark Jones

Hi Jim, I'm out of time at the moment but will check out your tool when I can. Just a note that IncFind does not recurse directories -- it is a simple tool only designed to search for wildcards in up to 5 folders. Try pointing a path to \masm32\include\*.inc or similar and see if it finds it. (Curious, are you using Vista? It hasn't been tested on Vista at all.)
"To deny our impulses... foolish; to revel in them, chaos." MCJ 2003.08

Jimg

Nope.  It not in any of my include files.  What include file did you find it in?

I'm using XP sp2.  Forever.

Mark Jones

LibSearchTool found the equate in \masm32\include\windows.inc (version 1.4c.)

Just tried your tool, very handy. It too found it in the same location:

"X:\masm32\include\windows.inc"
13106: CF_NOVERTFONTS                   equ 01000000h
"To deny our impulses... foolish; to revel in them, chaos." MCJ 2003.08

Jimg

How embarrasing  :red :red

I'm still using version 1.3 of windows.inc

But still, my original question stands in general.  It's not the first time I came up against an unknown constant.

And Drizz-  No, I don't have the PSDK.  It's just too huge, puts a ton of crap on my system root and in the registry, even though I install it elsewhere, and requires a help viewer I don't have or want to install.  Yes, these are all my personal problems, I understand.  Is there some where to just get all the .h files without all the hassle?

edit: I just downloaded Win32Inc from Japeth's site.  Thanks Drizz, this may be the answer. :U