need help about my program

The Partridge Family were neither partridges nor a family. Discuss.
Post Reply
mohagabo
Posts: 10
Joined: August 11th, 2013, 3:16 am

need help about my program

Post by mohagabo » March 10th, 2021, 6:49 am

hi ,
please I need your help on something,
I'm a structural engineer and I'm working on a program using chili frame work (with put pixel functions )
I've created a simple GUI for the program but as you may expect it is suffering from two issues
1- the window is fixed size (I need it to be resizable / maximizable )
2- the response time / latency ( any moving button or window is 3 or 4 frames behind the mouse )
and I've did all I could trying to solve that in the frame work but in vain
the program I'm making is drawing the screen in demand and not 60 times per second.
so if you can record me a video about how to handle screen resizing and a way to get reduce latency
I've tried many code samples to handle the screen resizing but it is not working with me
but about the latency it seems that I have no idea about how it can be

albinopapa
Posts: 4311
Joined: February 28th, 2013, 3:23 am
Location: Oklahoma, United States

Re: need help about my program

Post by albinopapa » March 14th, 2021, 6:10 pm

Are you referring to a custom UI or the Windows Win32 API? It kind of matters.

If you're making a custom UI say using the chili framework resizing your custom window UI is up to you. If you need to resize the Windows window, then you need to change the WindowStyle of the window in MainWindow if you want to be able to click and drag the border. You could also do it programmatically using the SetWindowPos() function.

As for the delay between mouse and window movement, again if it's a custom window UI, then my theory is there's always going to be a slight delay between the Windows UI ( mouse cursor for instance ) and what Direct3D shows. For me, I've seen the same issue if I use the Windows cursor, but if I hide the Windows cursor and draw my own the delay is less noticeable.
If you think paging some data from disk into RAM is slow, try paging it into a simian cerebrum over a pair of optical nerves. - gameprogrammingpatterns.com

Post Reply