source: golgotha/src/max_plugin/sdk_inc/winutil.h @ 80

Last change on this file since 80 was 80, checked in by Sam Hocevar, 11 years ago
  • Adding the Golgotha source code. Not sure what's going to be interesting in there, but since it's all public domain, there's certainly stuff to pick up.
  • Property svn:keywords set to Id
File size: 2.5 KB
2 *<
3        FILE: winutil.h
5        DESCRIPTION: Misc. windows related functions
7        CREATED BY: Rolf Berteig
9        HISTORY: 1-6-95 file created
11 *>     Copyright (c) 1994, All Rights Reserved.
12 **********************************************************************/
14#ifndef __WINUTIL__
15#define __WINUTIL__
18float CoreExport GetWindowFloat(HWND hwnd,BOOL *valid=NULL);
19int CoreExport GetWindowInt(HWND hwnd,BOOL *valid=NULL);
20BOOL CoreExport SetWindowTextInt( HWND hwnd, int i );
21BOOL CoreExport SetWindowTextFloat( HWND hwnd, float f, int precision=3 );
22BOOL CoreExport SetDlgItemFloat( HWND hwnd, int idControl, float val );
23float CoreExport GetDlgItemFloat( HWND hwnd, int idControl );
24void CoreExport SetDlgFont( HWND hDlg, HFONT hFont );
25void CoreExport SlideWindow( HWND hwnd, int x, int y );
26void CoreExport StretchWindow( HWND hwnd, int w, int h );
27BOOL CoreExport CenterWindow(HWND hWndChild, HWND hWndParent);
28void CoreExport GetClientRectP( HWND hwnd, Rect *rect );
29void CoreExport DrawIconButton( HDC hdc, HBITMAP hBitmap, Rect& wrect, Rect& brect, BOOL in );
30int CoreExport GetListHieght( HWND hList );
31void CoreExport ShadedVertLine( HDC hdc, int x, int y0, int y1, BOOL in );
32void CoreExport ShadedHorizLine( HDC hdc, int y, int x0, int x1, BOOL in );
33void CoreExport ShadedRect( HDC hdc, RECT& rect );
34void CoreExport Rect3D( HDC hdc, RECT& rect, BOOL in );
35void CoreExport WhiteRect3D( HDC hdc, RECT rect, BOOL in );
36void CoreExport DrawButton( HDC hdc, RECT rect, BOOL in );
37void CoreExport XORDottedRect( HWND hwnd, IPoint2 p0, IPoint2 p1 );
38void CoreExport XORDottedCircle( HWND hwnd, IPoint2 p0, IPoint2 p1 );
39void CoreExport XORDottedPolyline( HWND hwnd, int count, IPoint2 *pts);
40void CoreExport XORRect(HDC hdc, RECT& r, int border=1);
41void CoreExport MakeButton2State(HWND hCtrl);
42void CoreExport MakeButton3State(HWND hCtrl);
43int CoreExport GetCheckBox(HWND hw, int id);
44void CoreExport SetCheckBox(HWND hw, int id, BOOL b);
45BOOL CoreExport DoesFileExist(const TCHAR *file);
47// Delete superfluous zeroes from float string: 1.2300000 -> 1.23
48void CoreExport StripTrailingZeros(TCHAR* buf);
50template<class T> void LimitValue( T& value, T min, T max )
51        {
52        if ( value < min ) value = min;
53        if ( value > max ) value = max;
54        }
57#define MAKEPOINT( lparam, pt ) { pt.x = (short)LOWORD(lparam); pt.y = (short)HIWORD(lparam); }
Note: See TracBrowser for help on using the repository browser.