Go to the first, previous, next, last section, table of contents.


asirgui.hnd

asirguid.hnd
:: asirgui の main window のハンドル番号を保持するファイル
// Visual C++ 用のテストプログラム. 標準入力を asirgui へ送り込む.
// test.cpp : コンソール アプリケーション用のエントリ ポイントの定義
//

#include "stdafx.h"
#include "test.h"
#include <windows.h>
#include <stdlib.h>
#include <stdio.h>
#include <fcntl.h>
#include <process.h>

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// 唯一のアプリケーション オブジェクト

CWinApp theApp;

using namespace std;

int _tmain(int argc, TCHAR* argv[], TCHAR* envp[])
{
	int nRetCode = 0;

	// MFC の初期化および初期化失敗時のエラーの出力
	if (!AfxWinInit(::GetModuleHandle(NULL), NULL, ::GetCommandLine(), 0))
	{
		// TODO: 必要に応じてエラー コードを変更してください。
		cerr << _T("Fatal Error: MFC initialization failed") << endl;
		nRetCode = 1;
	}
	else
	{
		// TODO: この位置にアプリケーションの動作を記述してください。
		CString strHello;
		strHello.LoadString(IDS_HELLO);
		cout << (LPCTSTR)strHello << endl;
	}
	HWND hnd;
	FILE *fp = fopen("c:/Program Files/asir/bin/asirgui.hnd","r");
	fscanf(fp,"%d",&hnd);
	fclose(fp);
	while (1) {
		int c;
		c = getchar();
		if ( c == '#' ) break;
		PostMessage(hnd,WM_CHAR,c,1);
	}
	return nRetCode;
}
参照
@xref{xyz_abc}

ChangeLog


Go to the first, previous, next, last section, table of contents.