Window Strech?

Posted By: tagimbul

Window Strech? - 02/13/18 08:11

hey i have make yesterday a little programm:

Quote:

///////////////////////////////
#include <acknex.h>
#include <default.c>

///////////////////////////////
function main()
{
var screenScaleFreeze = 0;

mouse_mode = 4;
VECTOR tmp;

while(1)
{
if(screen_size.x - mouse_pos.x < 5 && screen_size.y - mouse_pos.y < 5)
mouse_pointer = 6;
else
mouse_pointer = 1;

if(mouse_pointer == 6 && mouse_left)
screenScaleFreeze = 1;

if(!mouse_left)
screenScaleFreeze = 0;

if(screenScaleFreeze)
{
vec_set(tmp,window_pos.x);

wait(1);
video_set(mouse_pos.x,mouse_pos.y,0,2);
video_window(tmp.x,NULL ,NULL,NULL );
}

DEBUG_VAR(screen_size.x ,20);
DEBUG_VAR(screen_size.y ,40);

wait(1);
}
}



by the corner down right i can stretch the window
video_set stretch not like a normal windows window. so i fix it with video_window
but the window is jerky

what can i do to make it smoother?

greez tom
Posted By: MasterQ32

Re: Window Strech? - 02/14/18 07:56

Change the style of the engine window with video_window with flag 4 (thick border that allows resizing the window) set, then react in on_message to WM_SIZE

But check out first, if reacting to WM_SIZE is necessary before changing the resolution twice
© 2024 lite-C Forums