Hi,
Os:Qnx RTP 6.1
i have problem when i try resizing window when window contain widget
qcc -xc++ test.cpp -o test -lph
./test
i resize window to a small size (like 50,50) ok no problem
now the problem!
qcc -xc++ test.cpp -o test -DGADGET -lph
./test
i try resize window to a small size like (50,50) not possible ?
why ???
thanks,
//source code of test.cpp
#include <Ph.h>
#include <Pt.h>
#include <Ap.h>
#include <photon/PhRender.h>
PtWidget_t *win;
void raw_draw(PtWidget_t *widget, PhTile_t *damage)
{
PhRect_t rect;
PtSuperClassDraw(PtBasic,widget,damage);
PtCalcCanvas(widget, &rect);
PgSetFillColor(Pg_BLUE);
PgDrawRect(&rect, Pg_DRAW_FILL);
}
int
main(void)
{
PtArg_t args[5] = {0};
PhPoint_t pos,pos1;
PhDim_t dim,dim1;
int n = 0;
PtInit(NULL);
// position window on screen at 100,100
pos.x = 100;
pos.y = 100;
//size of window is 300x200
dim.w = 300;
dim.h = 200;
PtSetArg( &args[n], Pt_ARG_DIM, &dim, 0 );n++;
PtSetArg( &args[n], Pt_ARG_POS, &pos, 0 );n++;
if (win = PtCreateWidget(PtWindow,NULL,n,args))
{
#ifdef GADGET
n = 0;
pos1.x = 5;
pos1.y = 5;
dim1.w = 200;
dim1.h = 100;
PtSetArg( &args[n], Pt_ARG_DIM, &dim1, 0 );n++;
PtSetArg( &args[n], Pt_ARG_POS, &pos1, 0 );n++;
PtSetArg( &args[n], Pt_ARG_RAW_DRAW_F,&raw_draw, 1 );n++;
PtCreateWidget(PtRaw,Pt_DEFAULT_PARENT,n,args);
#endif
PtRealizeWidget(win);
PtMainLoop();
}
return 0;
}