News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests

Main Menu

Scatter Plot - again

Started by KeepingRealBusy, July 26, 2015, 04:28:53 AM

Previous topic - Next topic

KeepingRealBusy

Michael,

See: http://masm32.com/board/index.php?topic=1302.msg12930#msg12930

I have modified this again and wanted to set the Scatter Plot title bar to a different string (add changing coordinate info). It appears that the title is inherited from the console window title (if I change the Dialog macro title the scatter plot window title also changes when it is created). I can change the console window title after creation with "invoke SetConsoleTitle,OFFSET pTitle", but that does not change the scatter plot window title. How can I do this (I am not very conversant in "Windows" operations, I can barely keep my head above the water).

Dave.

MichaelW

To change the name in the dialog title bar, I just changed the name passed to the macro that creates the dialog, in this case to "NewName":

;==============================================================================
start:
;==============================================================================
    Dialog "NewName", \
           "MS Sans Serif",10, \
           WS_VISIBLE or WS_OVERLAPPED or WS_SYSMENU or DS_CENTER, \
           0,0,0,199,200,1024


I don't know what is included in your source, but since the sources I am working with use rand_size.asm, and for whatever reason rand_size.obj is not in the archive, I had to assemble rand_size.asm to get rand_size.obj, and then add rand_size.obj to the end of the Link command line.
Well Microsoft, here's another nice mess you've gotten us into.

KeepingRealBusy

Michael,

Thank you for the reply.

As I said before in my prior post, what you proposed will change the title in the bitmap window as well as in the main window because the bitmap window inherits the main window title at creation.

The main window title can be changed  during execution using "invoke SetConsoleTitle,OFFSET pTitle",  but this does not change the title in the bitmap window.

How can the bitmap window title be changed during execution?

Does anyone in this wonderful forum  have an answer?

I have included a zip of the modified code below. This code is just the start of what I want to do with this. At the present time it just draws a Red line, then blanks it, then drops down a line. It repeats until the middle of the window is found (vertically) and writes a Green line, then blanks it, then draws a Blue line, then blanks it, then drops down a line and repeats until it it hits the bottom of the window.

Dave.


KeepingRealBusy

Dave,

Thank you, Dave. You saved the day again.

Dave.

dedndave

as you can see in the doc, a WM_SETTEXT message may also be sent (or posted if to the same window)

KeepingRealBusy

Michael, Dave,

Here is the Result, just like I wanted (at this time).

Now I want to convert it to drawing vertical Green lines lines, but only the top half of the screen, with a changing title at each line. It will draw the Green line, then plot the whole top of the screen with a sine like pattern, folded to conserve space, positive values in Red, negative values in Blue, and plot (once) a test folded image in the lower half, and then advance the Green line (erasing the old line first) and repeat. I will implement a horizontal scroll bar at the bottom of the screen that will eventually be used to position the pattern to match the test image.

I don't yet know how to create the bitmap and the scroll bar in the client area without the bitmap overlaying the scroll bar. Wish me luck.

Dave.

dedndave

the scroll bars will always be on top of whatever you place in the client

it's a little hard to get a picture in my head of what you are trying to do
but it probably isn't necessary that i get it - lol

you can use "system" scroll bars, or create your own
system scroll bars are easier to code, but creating your own gives you better control of them

KeepingRealBusy

Michael, Dave,

Sorry about that, my BTD was wrong (needed right to left - had left to right), and did not correctly handle a mod 10 value.

The new ZIP should be correct.

Dave,

Thank you for the info of the scroll bar. If I create the bitmap first, it will be centered between the title bar and the bottom of the screen. Then, if I add a scroll bar at the bottom, it will overlay the bottom of the bitmap - just don't overlay it with plot bits. How high is such a scroll bar - how to calculate how much of the bottom of the bitmap to reserve?

Dave.

KeepingRealBusy

Michael, Dave,

Cleaned it up some more, this zip should be correct.

Dave.