I have a question to drow a line in GUI programming. I hope you could help me:)
In fact, it's not a continuous line, it's a line with break. The function I use to draw this line is like this:
Void DrawBreakLine(int nStartPoint, int nEndPoint, BYTE bPattern)
the last parameter bPattern tells the function how to break. If the corresponding bit is
1, draw a point, otherwise leave a space.
Example: bPattern = 0xf0
the line looks like this:
---- ---- ---- ---- ---- ----
4 points, 4 spaces
In fact, I can define a BYTE array and send to the function
Ex: BYTE bPattern[] = {0xff, 0x0};
the line looks like this:
-------- -------- -------- --------
8 points, 8 spaces
However, if your parameter is bPattern more than 2 bytes, the bytes after the 2nd
byte mean nothing.
Well, now I want to draw this line:
------------ ------------ ------------ ------------
as you can see, it's 12 points and 12 spaces.
How can I draw this line with DrawBreakLine function easily?
Thanks very much:)