Update of /cvsroot/perl-win32-gui/Win32-GUI In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6004
Modified Files: CHANGELOG DC.xs Log Message: Re-implement DrawFrameControl allowing DFCS_ADJUSTRECT to function Index: DC.xs =================================================================== RCS file: /cvsroot/perl-win32-gui/Win32-GUI/DC.xs,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** DC.xs 15 Jul 2007 18:37:14 -0000 1.17 --- DC.xs 15 Jul 2007 18:39:51 -0000 1.18 *************** *** 867,889 **** # (@)METHOD:DrawFrameControl(LEFT, TOP, RIGHT, BOTTOM, TYPE, STATE) # Draws a frame control of the specified type and style. BOOL DrawFrameControl(handle, left, top, right, bottom, type, state) ! HDC handle ! int left ! int top ! int right ! int bottom UINT type UINT state ! PREINIT: ! RECT rc; ! CODE: ! rc.left = left; ! rc.top = top; ! rc.right = right; ! rc.bottom = bottom; ! RETVAL = DrawFrameControl(handle, &rc, type, state); ! OUTPUT: ! RETVAL ########################################################################### --- 867,890 ---- # (@)METHOD:DrawFrameControl(LEFT, TOP, RIGHT, BOTTOM, TYPE, STATE) # Draws a frame control of the specified type and style. + # + # If STATE includes DFCS_ADJUSTRECT, then the input parameters + # LEFT, TOP, RIGHT, BOTTOM are ajusted to exclude the surrounding edge + # of the push button. If any of LEFT, TOP, RIGHT, BOTTOM are readonly, + # then DFCS_ADJUSTRECT will be ignored for the readonly parameters. BOOL DrawFrameControl(handle, left, top, right, bottom, type, state) ! HDC handle ! RECT rc = { (LONG)SvIV(ST(1)), (LONG)SvIV(ST(2)), (LONG)SvIV(ST(3)), (LONG)SvIV(ST(4)) }; UINT type UINT state ! C_ARGS: ! handle, &rc, type, state ! POSTCALL: ! if (state & DFCS_ADJUSTRECT) { ! if(!SvREADONLY(ST(1))) { sv_setiv_mg(ST(1), (IV)rc.left); } ! if(!SvREADONLY(ST(2))) { sv_setiv_mg(ST(2), (IV)rc.top); } ! if(!SvREADONLY(ST(3))) { sv_setiv_mg(ST(3), (IV)rc.right); } ! if(!SvREADONLY(ST(4))) { sv_setiv_mg(ST(4), (IV)rc.bottom); } ! } ########################################################################### Index: CHANGELOG =================================================================== RCS file: /cvsroot/perl-win32-gui/Win32-GUI/CHANGELOG,v retrieving revision 1.112 retrieving revision 1.113 diff -C2 -d -r1.112 -r1.113 *** CHANGELOG 15 Jul 2007 18:37:14 -0000 1.112 --- CHANGELOG 15 Jul 2007 18:39:51 -0000 1.113 *************** *** 14,17 **** --- 14,19 ---- PolyLineTo(). [George] - DC.xs - Fix DrawText() documentation + - DC.xs - Rework DrawFrameControl() to allow DFCS_ADJUSTRECT to modify + input parameters + [Robert May] : 20 January 2007 - Restore Original WndProc