I'm writting a resource editor for AsmEdit and I
want to have the option of varible size grids
for the dialog feature, so when you create the
controls it will snap to the closest grid.

I can build the grid ok and my snap to works ok,
but I don't like the looks of my grid, it's a
solid line grid and it looks to intrusive.

I'm using:
INVOKE CreatePen, PS_SOLID, 1, 00c0c0c0h
.
.
INVOKE LineTo, hDC, rect.right, yOff
INVOKE LineTo, hDC, xOff, rect.bottom
.
.
I've tried using PS_DOT, and if they were really
dots it would be ok, but they're small dashes.

Whats the best way to fill the control with dots?

Thanks,

Ewayne
Posted on 2001-11-21 10:37:00 by Ewayne
Hi Ewayne,

I was just wondering if ExtCreatePen might do the trick?
Posted on 2001-11-21 18:07:51 by gscundiff
Hi Gary,

I have already tried using ExtCreatePen and the
dots are still small dashes, if I could use the
PS_USERSTYLE it might work, but it does not
support Win9x.

I tried using BS_PATTERN with a bitmap and everything
else I can think of.

I'm thinking about using the solid line and going
back and erasing the parts I don't want, but there
must be a better way, I know it can be done.

Thanks,

Ewayne
Posted on 2001-11-21 19:10:39 by Ewayne
Sort of fixed the problem by using CreatePatternBrush
with a set of grid dot bitmaps and filling the
control with the pattern brush.

The only problem I have now is a slight flicker
(I hate flicker) with a small grid pattern when
I move another control on the main control.

I hope I don't have to use a bunch of Validates
and Invalidates to remove the flicker.

Ewayne
Posted on 2001-11-22 00:52:05 by Ewayne