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

📄 winmain.cpp

📁 socket编程
💻 CPP
字号:
//+----------------------------------------------------------------------------
//| SAMPLE - Sample Program
//| COPYRIGHT (C) __________ CORPORATION 1998  ALL RIGHTS RESERVED
//|
//| Program Information
//|     TOSTEEL-NT Sample Program
//|
//|              Name           Date        Rev       Comment
//| Designed by  _._________    YYYY.MM.DD  00.00.00  First Design
//| Modified by  _._________    ____.__.__  __.__.__
//+----------------------------------------------------------------------------
#include "Tosteel.h"

#pragma comment (lib, "tosteel")

CTOSTEEL	_tosteel;
unsigned int TosMain(char *);

////////////////////////////////////////////////////////////
// TOSTEEL Message Handler                                //
////////////////////////////////////////////////////////////
long __stdcall WndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
{ 
	switch (message) {
	case WM_CREATE:
		// If you would like to do the special initialize routines,
		// you can add this position.
		break;

	case WM_PAINT:
		_tosteel.ReDisplay();
		break;

	case WM_DESTROY:
		// ---- Don't delete following logic. ----
		_tosteel.Abort();
		PostQuitMessage(0);
		return 0;
	}
	return DefWindowProc(hwnd, message, wParam, lParam);
}

////////////////////////////////////////////////////////////
// Windows Process Entry Procedure                        //
////////////////////////////////////////////////////////////
int CALLBACK WinMain(HINSTANCE hInst, HINSTANCE, LPSTR CmdLine, int showCmd)
{
	// If you would like to do the special initialize routines,
	// you can add this position.
	// Remark :
	//     This position is executed before above WM_CREATE


	// If you would like to use another TSK_MAN,
	// set the hostname and port number.
	// _tosteel.TaskManager("localhost", 8500);


	// If you specify parameter 'CmdLine' without NAME=XXXX,
	// you must set the 1st parameter as 'task name'. 
	int len ;
	char * ptr = "钱树森" ;
	len = strlen(ptr) ;

	return _tosteel.Run("ALARM_CLT", hInst, CmdLine, showCmd, WndProc, TosMain).wParam;
}

⌨️ 快捷键说明

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