Ejemplo n.º 1
0
LOCAL void Meter_OnSize(HWND hWindow, UINT state, int cx, int cy)
/***********************************************************************/
{
    int dx, dy;

    LPMETERCONTINFO lpInfo;
    if (! (lpInfo = (LPMETERCONTINFO)GetWindowLong (hWindow, GWL_DATAPTR) ) )
        return;

    if (SetupMeterControlInfo (hWindow, & dx, & dy) )
    {
        // Delete any existing background bmp
        if (lpInfo->pdibBack)
        {
            delete lpInfo->pdibBack;
            lpInfo->pdibBack = NULL;
        }
        // Instantiate a new background bmp
        lpInfo->pdibBack = new CDib();
        if (lpInfo->pdibBack)
        {
//			lpInfo->pdibBack->Create (8, cx, cy);
            lpInfo->pdibBack->Create (8, dx, dy);
        }
        ResizeControl (hWindow, dx, dy);
//		ResizeControl (hWindow, cx, cy);

        FORWARD_WM_SIZE (hWindow, state, dx, dy, DefWindowProc);
    }
    else
    {
        FORWARD_WM_SIZE (hWindow, state, cx, cy, DefWindowProc);
    }
}
Ejemplo n.º 2
0
/* This function handles the WM_SIZE message.
 */
void FASTCALL OutBasket_OnSize( HWND hwnd, UINT state, int cx, int cy )
{
   /* Save the new window state to the configuration file.
    */
   Amuser_WriteWindowState( szOutBaskWndName, hwnd );
   FORWARD_WM_SIZE( hwnd, state, cx, cy, Adm_DefMDIDlgProc );
}
Ejemplo n.º 3
0
LOCAL void Slider_OnSize(HWND hWindow, UINT state, int cx, int cy)
/***********************************************************************/
{
    LPSLIDERINFO lpInfo;

    HDC hDC = GetDC (hWindow);

    if (hDC && (cx > BitmapWidth || cy > BitmapHeight))
    {
        if (cx > BitmapWidth)
            BitmapWidth = cx;
        if (cy > BitmapHeight)
            BitmapHeight = cy;
        if (hBitmap)
            DeleteObject (hBitmap);
        hBitmap = CreateCompatibleBitmap (hDC,BitmapWidth,BitmapHeight);
        InvalidateRect (hWindow,NULL,FALSE);
        UpdateWindow (hWindow);
    }
    if (hDC)
        ReleaseDC (hWindow,hDC);
    lpInfo = Slider_GetInfo (hWindow);
    if (lpInfo)
        Slider_InitInfo (hWindow, lpInfo,TRUE);
    FORWARD_WM_SIZE(hWindow, state, cx, cy, Control_DefProc);
}
Ejemplo n.º 4
0
LOCAL void Puzzle_OnSize(HWND hWindow, UINT state, int cx, int cy)
/***********************************************************************/
{
	PPUZZLE pPuzzle = GetPuzzle(hWindow);
	if (pPuzzle)
		pPuzzle->Resize();
	FORWARD_WM_SIZE(hWindow, state, cx, cy, DefWindowProc);
}
Ejemplo n.º 5
0
LOCAL void Slider_OnSize(HWND hWindow, UINT state, int cx, int cy)
/***********************************************************************/
{
	int dx, dy;

	if (ComputeDIBControlSize (hWindow, & dx, & dy))
		ResizeControl (hWindow, dx, dy);
	FORWARD_WM_SIZE(hWindow, state, cx, cy, DefWindowProc);
}
Ejemplo n.º 6
0
LOCAL void Gauge_OnSize(HWND hWindow, UINT state, int cx, int cy)
/***********************************************************************/
{
	LPHGAUGEINFO lpInfo;
	
	ResizeControl (hWindow, cx, cy);
	if ( (lpInfo = Gauge_GetInfo (hWindow) ) )
		lpInfo->ArmLength = cy - 8;
	FORWARD_WM_SIZE(hWindow, state, cx, cy, DefWindowProc);
}
Ejemplo n.º 7
0
Archivo: Text.c Proyecto: atrniv/CLIPS
static void text_OnSize(
  HWND hwnd, 
  UINT state, 
  int cx, 
  int cy)
  {
   if (state != SIZEICONIC)
     { MoveWindow(GetDlgItem(hwnd, ID_EDIT_CONTROL), 0, 0, cx, cy, TRUE); }
     
   FORWARD_WM_SIZE(hwnd, state, cx, cy, DefMDIChildProc);
  }
Ejemplo n.º 8
0
static void status_OnSize(
  HWND hwnd, 
  UINT state, 
  int cx, 
  int cy)
  {
   struct statusWindowData *theData;
   
   theData = (struct statusWindowData *) GetWindowLongPtr(hwnd,GWLP_USERDATA);
   
   if (theData == NULL) 
     { return; }
     
   theData->noLines = cy / theData->lineSize;
   UpdateWnd(hwnd);

   FORWARD_WM_SIZE(hwnd,state,cx,cy,DefMDIChildProc);
  }
Ejemplo n.º 9
0
static void Radar_OnSize(HWND hWindow, UINT state, int cx, int cy)
/***********************************************************************/
{
	ResizeControl( hWindow, cx, cy );
	FORWARD_WM_SIZE(hWindow, state, cx, cy, DefWindowProc);
}