Window style change event

474 views Asked by At

I’m working on a project where I am drawing forms on top of other windows (viewports) to display more info. The program I’m drawing on is Autodesk 3ds max. I’m making a custom UserControl in C# which I load into 3ds max to get the handles. I am already able to draw the form(s) over the windows, by getting the window handle thus position / size. The problem is that when those windows get resized / hidden my forms don’t get resized because my UserControl doesn’t know about it.

Max does have a callback function for the viewport changing stuff, but it fires for almost everything, such as moving the cursor in the viewport. I don’t want to check for size changes or stuff every time I move my mouse in the viewport, because that’ll probably be pretty slow…

I was thinking about window messages for the resizing part but I don’t see ANY messages when I try to look at them in Spy++. I’ve seen in Spy++ that the visible windows have a style called: ‘WS_VISIBLE’. I was also thinking of having some kind of callback / event firing when that style changes…But I have no idea how to implement something like that. Is this even possible?

I’ve included some pictures of the Spy++ window properties:

Visible

NotVisible

Thanks

0

There are 0 answers