⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mswin.h

📁 图像处理的压缩算法
💻 H
📖 第 1 页 / 共 4 页
字号:
				testWin.ShowWindow(SW_NORMAL);
				
				RECT RecNew = {144, 200, 500, 600};;
				testWin.MoveWindow(&RecNew);
			}		
	*/
	void	MoveWindow(const RECT * lpRect, BOOL bRepaint = TRUE);

	/**
	    Remark:
			Copies the dimensions of the bounding rectangle of the CWnd object to the structure pointed
			to by lpRect. The dimensions are given in screen coordinates relative to the upper-left
			corner of the display screen. The dimensions of the caption, border, and scroll bars,
			if present, are included.
		Parameters:
			lpRect: Points to a RECT structure that will receive the screen coordinates of the upper-left and lower-right corners. 
		Example:
			//Please make sure you have a "Data1" worksheet window exist when you run the example
			void test_GetWindowRect()
			{
				WorksheetPage testWks("Data1");
				Window testWin = testWks.GetWindow();
				testWin.ShowWindow(SW_NORMAL);
				
				RECT rect;
				testWin.GetWindowRect(&rect);
				printf("upper-left position, x:%d, y:%d\n", rect.left, rect.top);
				printf("lower-right position: x:%d, y:%d\n", rect.right, rect.bottom);
			}		
	*/
	void	GetWindowRect(RECT * lpRect);

	/**
	    Remark:
			Copies the client coordinates of the CWnd client area into the structure pointed to by lpRect. 
			The client coordinates specify the upper-left and lower-right corners of the client area. Since
			client coordinates are relative to the upper-left corners of the CWnd client area, the 
			coordinates of the upper-left corner are (0,0).
		Parameters:
			Points to a RECT structure that will receive the coordinates of the upper-left and lower-right corners of the client area. 
		Example:
			//Please make sure you have a "Data1" worksheet window exist when you run the example
			void test_GetClientRect()
			{
				WorksheetPage testWks("Data1");
				Window testWin = testWks.GetWindow();
				testWin.ShowWindow(SW_NORMAL);
				
				RECT rect;
				testWin.GetClientRect(&rect);
				printf("upper-left position to client area, x:%d, y:%d\n", rect.left, rect.top);
				printf("lower-right position to client area: x:%d, y:%d\n", rect.right, rect.bottom);
			}		
	*/
	void	GetClientRect(RECT * lpRect);

	/**
			Converts the client coordinates of a given RECT structure pointer on the display to screen coordinates. 
			Example:
			//Please make sure you have a "Data1" worksheet window exist when you run the example
			void run_ClientToScreen()
			{
				WorksheetPage testWks("Data1");
				Window testWin = testWks.GetWindow();
				testWin.ShowWindow(SW_NORMAL);
				
				RECT rect;
				testWin.GetClientRect(&rect);
				testWin.ClientToScreen(&rect);
				printf("upper-left position on screen, x:%d, y:%d\n", rect.left, rect.top);
				printf("lower-right position on screen: x:%d, y:%d\n", rect.right, rect.bottom);
			}		
	*/
	void	ClientToScreen(RECT * lpRect); 

	//void	ClientToScreen(point * lpPoint);

//	void	ScreenToClient(point * lpPoint);

	/**
	Remarks:
		Converts the screen coordinates of a given RECT structure pointer on the display to client coordinates.
	Example:
		//Please make sure you have a "Data1" worksheet window exist when you run the example
		void run_ScreenToClient()
		{
			WorksheetPage testWks("Data1");
			Window testWin = testWks.GetWindow();
			testWin.ShowWindow(SW_NORMAL);
				
			RECT rect;
			rect.left=100;
			rect.right=200;
			rect.top=200;
			rect.bottom=300;
			testWin.ScreenToClient(&rect);
			printf("upper-left position to client area, x:%d, y:%d\n", rect.left, rect.top);
			printf("lower-right position to client area: x:%d, y:%d\n", rect.right, rect.bottom);
		}
	*/
	void	ScreenToClient(RECT * lpRect);
	
	/**
	*/
	BOOL	Enable;

	/**
	Example:
		void test_IsWindowVisible()
		{
			for(int ii = 0; ii <= OGW_NUM_WIN_TYPES; ii++)
			{
				Window ww(GetWindow(ii));
				printf("Index %d:", ii);
				if(ww)
				{
					if(ww.Visible)
					{
						RECT rect;
						ww.GetClientRect(&rect);
						printf("%[%d:%d], width=%d, height=%d\n", rect.left, rect.top, rect.right-rect.left, rect.bottom-rect.top);
					}
					else
						out_str("Hidden");
				}
				else
					out_str("Not available");
			}
		}
	*/
	BOOL	Visible;

	/**
	*/	
	string	Text;

	/**
	    Remark:
			This function checks if window is maximized. 
		Return:
			Return TRUE if the window is maximized, otherwise, FALSE.. 
	*/
	BOOL	IsZoomed();

	/**
	    Remark:
			This function checks if window is minimized. 
		Return:
			Return TRUE if the window is minimized, otherwise, FALSE.. 
	*/
	BOOL	IsIconic();
	
	/** 
		Set stock logic font for the control
	Example:
		RichEdit richEdit = EditBoxes.GetItem(IDC_RICHEDIT1);		
	
		richEdit.SetFont(OEM_FIXED_FONT);
		
	Parameters:
		nFontNumber
			the Stock Logic font number, can be one of following,
			OEM_FIXED_FONT,      
			ANSI_FIXED_FONT,     
			ANSI_VAR_FONT,       
			SYSTEM_FONT,         
			DEVICE_DEFAULT_FONT, 
			SYSTEM_FIXED_FONT.   
	Return:
		None.
	*/
	void SetFont(int nFontNumber);
	
	/**
	*/
	Window	GetDlgItem(int nChildWinID);
	
	/**
	*/
	Window	GetParent();

#ifdef	ORIGIN_COM_SUPPORT
	/**
		This function provides COM support for ActiveX controls that are placed into Origin windows or Dialog Builder winodws.
	Remarks:
		This function is available only for OriginPro versions, or with a special COM enabled license
	Example:
		static void UpdateMatrixGraph()
		{
			Matrix myMat("Matrix1");
			
			if(myMat)
			{
				Object CWKnob1 = MyDlg.GetItem(IDC_CWKNOB1).GetActiveXControl();
				double dNoiseLevel = CWKnob1.Value;
				
				Object CWSlide1 = MyDlg.GetItem(IDC_CWSLIDE1).GetActiveXControl();
				double vv = CWSlide1.Value;
				double dPeakHalfWidth = 5. / (vv+1.);
				fill_mat_with_values(myMat, 0.2, 0.4, 15.0, dPeakHalfWidth, dNoiseLevel);
				
				Object CW3DGraph1 = MyDlg.GetItem(IDC_CWGRAPH3D1).GetActiveXControl();
				_VARIANT	var = myMat;
				CW3DGraph1.Plot3DSimpleSurface(var);
			}
		}
		
	*/
	_VARIANT GetActiveXControl();
	
#endif //#ifdef	ORIGIN_COM_SUPPORT

	/**
		Identifies the device context for the window client area if successful; otherwise, the return value is NULL.
	Example:
		int get_pixels_per_inch(bool bX = true)
		{
			DeviceContext dc = MyDlg.GetWindow().GetDC();
			return dc.GetDeviceCaps(bX? LOGPIXELSX : LOGPIXELSY);
		}
	*/
	DeviceContext GetDC( );
	
	/**
			This method retrieves the identifier of the currently checked radio button in the specified group.
		Parameters:
			nIDFirstButton: Specifies the integer identifier of the first radio button in the group. 
			nIDLastButton: Specifies the integer identifier of the last radio button in the group. 
		Return:
				ID of the checked radio button, or zero if none is selected.
	*/
	int GetCheckedRadioButton( int nIDFirstButton, int nIDLastButton );
	/**
			This method selects, adds a check mark to a specified radio button in a group and clears, removes a check 
			mark from all other radio buttons in the group. 
		Parameters:
			nIDFirstButton: Specifies the integer identifier of the first radio button in the group. 
			nIDLastButton: Specifies the integer identifier of the last radio button in the group. 
			nIDCheckButton: Specifies the integer identifier of the radio button to be checked. 
	*/
	void CheckRadioButton( int nIDFirstButton, int nIDLastButton, int nIDCheckButton );
	
	/**
		read only
		Example:
			void Run_FontName()
			{
				MyDlg.GetWindow().SetFont(SYSTEM_FONT);
				string strFont = MyDlg.GetWindow().FontName;	
				out_str(strFont);
				
				double dSize = MyDlg.GetWindow().FontSize;	
				out_double("",dSize);	
			}
	*/
	string FontName;

	/**
		read only
		SeeAlso:
			FontName
	*/
	double	FontSize;// in points
};




/*
 * ShowWindow() Commands
 */
#define SW_HIDE             0
#define SW_SHOWNORMAL       1
#define SW_NORMAL           1
#define SW_SHOWMINIMIZED    2
#define SW_SHOWMAXIMIZED    3
#define SW_MAXIMIZE         3
#define SW_SHOWNOACTIVATE   4
#define SW_SHOW             5
#define SW_MINIMIZE         6
#define SW_SHOWMINNOACTIVE  7
#define SW_SHOWNA           8
#define SW_RESTORE          9
#define SW_SHOWDEFAULT      10
#define SW_FORCEMINIMIZE    11
#define SW_MAX              11

#ifndef NOSCROLL

/*
 * Scroll Bar Constants
 */
#define SB_HORZ             0
#define SB_VERT             1
#define SB_CTL              2
#define SB_BOTH             3

/*
 * Scroll Bar Commands
 */
#define SB_LINEUP           0
#define SB_LINELEFT         0
#define SB_LINEDOWN         1
#define SB_LINERIGHT        1
#define SB_PAGEUP           2
#define SB_PAGELEFT         2
#define SB_PAGEDOWN         3
#define SB_PAGERIGHT        3
#define SB_THUMBPOSITION    4
#define SB_THUMBTRACK       5
#define SB_TOP              6
#define SB_LEFT             6
#define SB_BOTTOM           7
#define SB_RIGHT            7
#define SB_ENDSCROLL        8

#endif /* !NOSCROLL */


#endif // _OC_VER > 0x0703
//-------- end ORIGIN_8_FEATURES

#pragma dll(kernel32, system)


#define MAX_PATH          260

#define LOWORD(l)           ((WORD)(l))
#define HIWORD(l)           ((WORD)(((DWORD)(l) >> 16) & 0xFFFF))
#define LOBYTE(w)           ((BYTE)(w))
#define HIBYTE(w)           ((BYTE)(((WORD)(w) >> 8) & 0xFF))


#define DeleteFile  DeleteFileA
/** >File Management
		Delete an existing file.
	Parameters:
		lpFileName = null-terminated string that specifies the file to be deleted. 
	Return:
		If the function succeeds, the return value is nonzero.
		If the function fails, the return value is zero.
	Example:
		string str = "c:\\mytempfile.txt"; 
		if( DeleteFile(str) )
			printf("%s deleted\n", str);
		else
			printf("%s was not deleted\n", str);
*/
BOOL WINAPI DeleteFile(LPCTSTR lpFileName); // Delete an existing file.

/** >System
		The GetTickCount function retrieves the number of milliseconds that have elapsed since the system was started.
		It is limited to the resolution of the system timer.
		It is often used to measure time needed to complete an operation (see the example).
	Parameters:
		None.
	Return:
		the number of milliseconds ellapsed since the system was restarted.
	Example:
		// This example measures how much time (in milliseconds) it takes
		// to execute an empty for-loop of 1000.
		void	run_GetTickCount()
		{
			DWORD dw1 = GetTickCount();
			
			for(int ii = 0; ii < 1000; ii++)
				;
			
			printf("Empty loop of 1000 takes %d ms\n",GetTickCount()-dw1);

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -