Resizing a window in code

Hi it’s me again. I keep posting all my issues here because I’ve found the help from the people in these forums very helpful. So thanks.

In order to maximise screen realestate for the program I am making I have a toggle button which is supposed to hide/show some functionality from the user. Because that functionality (namely a trend) is updated via a thread I am pretty sure that unrealising the widgets (in order to hide them) that the thread has control over is not an option.

Also because I still need to log the data coming in from the thread I can’t just stop the thread.

So from here I have decided that the easiest thing to do would be to disable the trend (but not the thread) and hide it away by adjusting the size of the application window that it is in. I need to do this manually because I still don’t want the user to be able to adjust the window size.

In VB it was very easy to change the LENGTH and WIDTH properties of a control(widget). However, in PhaB, based on the documentation, it dosen’t seem so easy.

Also if someone has a sugestion as to a better way to implement what I have just described I’m all ears.

Resize like this:

PhDim_t dim={100,100}; PtSetResource(ABW_base, Pt_ARG_DIM, &dim, 0);

and remember to turn of

because otherwise the user would still be able to resize the window.

Yet an other idea:
If you only want to get rid of the Trend why not just moving it to some place where the user can’t see it:

PhPoint_t pos={-10000,-10000}; PtSetResource(ABW_trend, Pt_ARG_POS, &pos, 0);