¥Ï¥ëhal
¥Ç¥¸¥¿ŽÙ ¥³¥ó¥Æ¥ó¥Ä

pc2

ºî¤Ã¤Æ³Ø¤Ö
¥Ï¡¼¥É¤È¥½¥Õ¥È

¥¢¥ë¥´¥ê¥º¥à
ÅŻҲóÏ©

 






¤³¤Î¥µ¥¤¥È¤ÏHP¤Ç¤¹
¥Ö¥í¥°¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó
Í×˾¡¦°Õ¸«¤Ï
²¼µ­¤Î·Ç¼¨¾ì¤òÍøÍѤ·¤Æ
²¼¤µ¤¤¤Þ¤¿¥Ö¥í¥°¤â¸«¤Æ²¼¤µ¤¤

 

¥í¥Ü¥Ã¥È¡¦DOSV·Ç¼¨ÈÄ·ó£Â£ì£ï£ç

²û¤«¤·¤Î¥³¥ó¥Ô¥å¡¼¥¿
Apple II Apple2
PC9801 PC9821

£ò£ï£â£ï£ô£ï

Top¤ËÌá¤ë

¥é¥é Lara
¥¢¥Ê¥í¥° ¥³¥ó¥Æ¥ó¥Ä

LaraºÂ¤ì
Æ°²è¤Ç³Ø¤Ö
í¿¤È·±Îý
Æ°²è¥á¥Ë¥å¡¼


¹©ºî


½¸ÃÄÎý½¬¥á¥Ë¥å¡¼


¤·¤Ä¤±¡¡·±Îý¥³¥é¥à




ºÇ¸å¤Ë¥é¥é¤Ë¤Ä¤¤¤Æ

¤³¤Î¥µ¥¤¥È¤ÏHP¤Ç¤¹
¥Ö¥í¥°¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó
Í×˾¡¦°Õ¸«¤Ï
²¼µ­¤Î·Ç¼¨¾ì¤òÍøÍѤ·¤Æ
²¼¤µ¤¤¤Þ¤¿¥Ö¥í¥°¤â¸«¤Æ²¼¤µ¤¤

Lara¥é¥é¤Î
¥Ö¥í¥°

¸¤¤Î¤·¤Ä¤±¤È·±Îý
·Ç¼¨ÈÄ


·Ç¼¨ÈĤÎÍøÍѵ¬Â§

 

 

 

 

£Ì£á£ò£áÉú¤»
Top¤ËÌá¤ë
¾¾ËÜ¡¡¥ï¥ó¥ï¥ó¥¯¥é¥Ö
¤ï¤ó¤ï¤ó¥¯¥é¥Ö

 

²óÅúºÑ¤ßVisual Studio C++ 2008/2010 Express Edition¤ÇWindows¥Õ¥©¡¼¥à¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤Çwin32api¤ò»ÈÍѤ¹¤ë¡£¤½¤Î£²
c++ cli ¡¡£Æ£ï£ò£í¡¡¤Ç¡¡¥Ç¥£¥¹¥×¥ì¥¤¡¡²òÁüÅÙ¤ÎÊѹ¹¥×¥í¥°¥é¥à¤òºî¤ë
³Ø½¬ÆâÍÆ¡¡
£±¡¥¡¡c++ cli Form ¤Çwin32api¤ò»ÈÍÑ
£²¡¥ ref class »²¾È¥¯¥é¥¹¤ÎÇÛÎó¤òºî¤ë
£³¡¥¡¡²èÌÌ¡¡²òÁüÅÙ¤ÎÊѹ¹
£´¡¥¡¡¥Õ¥©¡¼¥àForm¤Ë¥³¥Þ¥ó¥É¥é¥¤¥ó¤«¤é°ú¿ô¤òÆɤ߹þ¤à
£µ¡¥¡¡¥Ç¥¹¥¯¥È¥Ã¥×¤Ë°ú¿ôÉÕ¤­¤Î¥·¥ç¡¼¥È¥«¥Ã¥È¤òºî¤ë

²óÅúºÑ¤ßVisual Studio C++ 2008/2010 Express Edition¤ÇWindows¥Õ¥©¡¼¥à¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤Ç¤Ï£Ã¡Ü¡Ü¡¿£Ã£Ì£É¤¬ºÎÍѤµ¤ì¤Æ¤¤¤ë¤Î¤Ç¡¢.NET Framework¤ò»ÈÍѤ¹¤ë¡£
Í­ÎÁÈǤˤϣͣƣä¬ÉÕ¤¤¤Æ¤¤¤ë¤¬¡¢ÌµÎÁÈǤˤϤʤ¤¡££Æ£ï£ò£í¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤Ë£÷£é£î£³£²£á£ð£é¤ò»ÈÍѤ¹¤ë¤³¤È¤Ï¸æË¡Å٤Τ褦¤Ç¤¢¤ë¤¬¡¢¼ÙÆ»¤Ç»È¤¦ÊýË¡

¤Þ¤Ç¥×¥í¥¸¥§¥¯¥È¤Ç£Æ£ï£ò£í¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤òºîÀ®¡¢ º£²ó¤ÎºîÀ®¤Ç¤Ï ref class »²¾È¥¯¥é¥¹¤ÎÇÛÎó¤òºî¤ë¡£¥Õ¥©¡¼¥àForm¤Ë¥³¥Þ¥ó¥É¥é¥¤¥ó¤«¤é°ú¿ô¤òÆɤ߹þ¤à¤¿¤á¡¢¼¡¤Î¥Ç¥Ð¥Ã¥°¥â¡¼¥É¤Ç»ÈÍѤ¹¤ë¡£

¥³¥ó¥Ñ¥¤¥ë¤Î½àÈ÷¡¡¡¡¥×¥í¥¸¥§¥¯¥È¡¡¥×¥í¥Ñ¥Æ¥£¡¡Á´ÈÌ
¥×¥í¥¸¥§¥¯¥È¡¡¥×¥í¥Ñ¥Æ¥£

¥×¥í¥¸¥§¥¯¥È¡¡¥×¥í¥Ñ¥Æ¥£¡¡¥ê¥ó¥«¡¼¡¡¥³¥Þ¥ó¥É¥é¥¤¥ó
/INCREMENTAL /NOLOGO "kernel32.lib" "user32.lib" "gdi32.lib" "winspool.lib" "comdlg32.lib" "advapi32.lib" "shell32.lib" "ole32.lib" "oleaut32.lib" "uuid.lib" "odbc32.lib" "odbccp32.lib"
¥ê¥ó¥«¡¼¡¡¥³¥Þ¥ó¥É¥é¥¤¥ó

º£²óºî¤ë¥¢¥×¥ê¥±¡¼¥·¥ç¥ó
app

¥Ç¥Ð¥Ã¥¯¡¡¥â¡¼¥É¤Ç¤Ï¡¡¥³¥Þ¥ó¥É¥é¥¤¥ó¤«¤é
resolution_change.exe 1024 768 32 60¡¡¤Ç°ú¿ô¤òÅϤ¹¤³¤È¤¬¤Ç¤­¤ë

¸«ËܤΥÀ¥¦¥ó¥í¡¼¥É¡¡exe zip Ž¿Ž°Ž½


ÇÛÉÛÍÑ¡¡¤Î¥³¥ó¥Ñ¥¤¥ë

Microsoft .NET Framework 4 (Web ¥¤¥ó¥¹¥È¡¼¥é¡¼)

http://www.microsoft.com/downloads/ja-jp/details.aspx?displaylang=ja&FamilyID=9cfb2d51-5ff4-4491-b0e5-b386f32c0992

¤É¤¦¤·¤Æ¤â£Ä£Ì£Ì¤Ç¤·¤«¥³¥ó¥Ñ¥¤¥ë¤Ç¤­¤Ê¤¤¤È¤­¤Ï¡¡vcredist_x86.exe¤ò¥¤¥ó¥¹¥È¡¼¥ë
£ã£ì£ò¤È¥Þ¥ë¥Á¥¹¥ì¥Ã¥É¡¿£Í£Ô¤ÏÊ»ÍѤǤ­¤Ê¤¤
http://www.microsoft.com/downloads/ja-jp/details.aspx?FamilyID=A7B7A05E-6DE6-4D3A-A423-37BF0912DB84


ÀÖ»ú¤ÏÆþÎÏ


// disp32form1.cpp : ¥á¥¤¥ó ¥×¥í¥¸¥§¥¯¥È ¥Õ¥¡¥¤¥ë¤Ç¤¹¡£

#include "stdafx.h"
#include "Form1.h"

using namespace disp32form1;

[STAThreadAttribute]
int main(array<System::String ^> ^args)
{
// ¥³¥ó¥È¥í¡¼¥ë¤¬ºîÀ®¤µ¤ì¤ëÁ°¤Ë¡¢Windows XP ¥Ó¥¸¥å¥¢¥ë¸ú²Ì¤òÍ­¸ú¤Ë¤·¤Þ¤¹
Application::EnableVisualStyles();
Application::SetCompatibleTextRenderingDefault(false);

// ¥á¥¤¥ó ¥¦¥£¥ó¥É¥¦¤òºîÀ®¤·¤Æ¡¢¼Â¹Ô¤·¤Þ¤¹
Application::Run(gcnew Form1(args)); //args¤òÉÕ¤±¤ë
return 0;
}



stdafx.h¤ÎÆâÍÆ

// stdafx.h : ɸ½à¤Î¥·¥¹¥Æ¥à ¥¤¥ó¥¯¥ë¡¼¥É ¥Õ¥¡¥¤¥ë¤Î¥¤¥ó¥¯¥ë¡¼¥É ¥Õ¥¡¥¤¥ë¡¢¤Þ¤¿¤Ï
// »²¾È²ó¿ô¤¬Â¿¤¯¡¢¤«¤Ä¤¢¤Þ¤êÊѹ¹¤µ¤ì¤Ê¤¤¡¢¥×¥í¥¸¥§¥¯¥ÈÀìÍѤΥ¤¥ó¥¯¥ë¡¼¥É ¥Õ¥¡¥¤¥ë
// ¤òµ­½Ò¤·¤Þ¤¹¡£
#pragma once
#include"windows.h"
#include "commctrl.h"
#include <SDKDDKVer.h>
#include "d_data.h"
#include <commctrl.h>
#include <shlobj.h>

// compile with: /clr
#include <stdlib.h>
#include <string.h>
#include <stdio.h>

// ¥Þ¡¼¥·¥ã¥ê¥ó¥°ÍѥإåÀ
//http://msdn.microsoft.com/ja-jp/library/bb531313.aspx
#include <msclr/marshal.h>



d_data.cpp

#include "StdAfx.h"
#include "d_data.h"

d_data::d_data(void){
no=-1;
x_data=0;
y_data=0;
perpel=0;
hz=0;

}


d_data.h

#pragma once
ref class d_data
{
public:
d_data(void);
int no;
int x_data;
int y_data;
int perpel;
int hz;

};


disp.h

#pragma once
ref class disp
{
public:
DEVMODE* dispmode; // ¥Ç¥£¥¹¥×¥ì¥¤¥â¡¼¥É // ¥Í¥¤¥Æ¥£¥Ö¡¦¥³¡¼¥É¤Î¥¯¥é¥¹¡Ê¢¨¥Ý¥¤¥ó¥¿¡Ë

static array<d_data^>^ disp_data; //»²¾È¥¯¥é¥¹¤ÎÇÛÎó¤Î¼ýǼ¾ì½ê¤òºî¤ë
int old_no;
int old_x_data;
int old_y_data;
int old_perpel;
int old_hz;
int disp_end_no;
disp(void);
void disp_use(void);
void disp_old(void);
int disp_chang(int width_x,int height_y,int perpel, int frequency_hz);

};


disp.cpp

#include "StdAfx.h"
#include "disp.h"
#include "d_data.h"

disp::disp(void)
{
static DEVMODE dispmode; // ¥Ç¥Ð¥¤¥¹¹½Â¤ÂÎ
disp_data = gcnew array<d_data^> (1000); //»²¾È¥¯¥é¥¹¤ÎÇÛÎó¤Î¼ýǼ¾ì½ê¤òºî¤ë
EnumDisplaySettings( NULL, ENUM_REGISTRY_SETTINGS, &dispmode ); //¡¡¥Ç¥£¥¹¥×¥ì¥¤²òÁüÅ٤Υ쥸¥¹¥È¥êÊݸÃͤòµá¤á¤ë

old_x_data = dispmode.dmPelsWidth;
old_y_data = dispmode.dmPelsHeight;
old_perpel = dispmode.dmBitsPerPel;
old_hz = dispmode.dmDisplayFrequency;

}

void disp::disp_use(void)
{

//»ÈÍѤǤ­¤ë¥Ç¥£¥¹¥×¥ì¥¤¥â¡¼¥É¤Î³Îǧ ÇÛÎó¤Ë¼ýǼ
static DEVMODE dispmode; // ¥Ç¥£¥¹¥×¥ì¥¤¥â¡¼¥É
int disp_no;


disp_no = 0;
while( TRUE )
{
//Á´¥â¡¼¥É¤ÎÎóµó
if( !EnumDisplaySettings( NULL, disp_no, &dispmode ) ) break;
// ¥ê¥Ã¥Á¥Æ¥­¥¹¥È¤Ëɽ¼¨¤¹¤ë
disp_data[disp_no]=gcnew d_data; //½ÅÍ× ¥¯¥é¥¹¤ÎÇÛÎó¤ÎÃæ¿È¤Î³ÎÊÝ
disp_data[disp_no]->no = disp_no;
disp_data[disp_no]->x_data =dispmode.dmPelsWidth; // ²òÁüÅÙ²£¥µ¥¤¥º¡Êwidth x¡Ë
disp_data[disp_no]->y_data =dispmode.dmPelsHeight; // ²òÁüÅٽĥµ¥¤¥º¡Êhight y¡Ë
disp_data[disp_no]->perpel =dispmode.dmBitsPerPel; // £±¥Ô¥¯¥»¥ëÅö¤¿¤ê¤Î¥Ó¥Ã¥È¿ô
disp_data[disp_no]->hz =dispmode.dmDisplayFrequency; // ¥ê¥Õ¥ì¥Ã¥·¥å¼þÇÈ¿ô
disp_end_no=disp_no;
disp_no++;
}

}
int disp::disp_chang(int width_x,int height_y,int perpel, int frequency_hz){
static DEVMODE dispmode; // ¥Ç¥Ð¥¤¥¹¹½Â¤ÂÎ
HDC hdc; // ¸½ºß¤Î¿§²òÁüÅÙ¤ò¼èÆÀ¤¹¤ë¤¿¤á¤Î¥Ç¥Ð¥¤¥¹¥³¥ó¥Æ¥­¥¹¥È
hdc = GetDC(NULL); // ¥Ç¥Ð¥¤¥¹¹½Â¤ÂΤò½é´ü²½¤¹¤ë
ZeroMemory(&dispmode,sizeof(dispmode));
dispmode.dmSize = sizeof(dispmode);
dispmode.dmFields = DM_BITSPERPEL | DM_PELSWIDTH | DM_PELSHEIGHT;
dispmode.dmBitsPerPel = GetDeviceCaps(hdc,BITSPIXEL);
dispmode.dmPelsWidth = width_x; // ²òÁüÅÙ²£¥µ¥¤¥º¡Êwidth x¡Ë
dispmode.dmPelsHeight =height_y; // ²òÁüÅٽĥµ¥¤¥º¡Êhight y¡Ë
dispmode.dmBitsPerPel=perpel; // £±¥Ô¥¯¥»¥ëÅö¤¿¤ê¤Î¥Ó¥Ã¥È¿ô
dispmode.dmDisplayFrequency =frequency_hz; // ¥ê¥Õ¥ì¥Ã¥·¥å¼þÇÈ¿ô
ReleaseDC(NULL,hdc);
// ¥Ç¥£¥¹¥×¥ì¥¤¥â¡¼¥É¤Î¥Á¥Ã¥¯¹ç³Ê¤Ê¤é²òÁüÅÙÊѹ¹¤ò¹Ô¤¦¡£
if( ChangeDisplaySettings(&dispmode,CDS_TEST) == DISP_CHANGE_SUCCESSFUL ) {
ChangeDisplaySettings(&dispmode,CDS_FULLSCREEN);
return 0;
}
return 1;
}
void disp::disp_old(void){
static DEVMODE dispmode; // ¥Ç¥Ð¥¤¥¹¹½Â¤ÂÎ
HDC hdc; // ¸½ºß¤Î¿§²òÁüÅÙ¤ò¼èÆÀ¤¹¤ë¤¿¤á¤Î¥Ç¥Ð¥¤¥¹¥³¥ó¥Æ¥­¥¹¥È
hdc = GetDC(NULL); // ¥Ç¥Ð¥¤¥¹¹½Â¤ÂΤò½é´ü²½¤¹¤ë
ZeroMemory(&dispmode,sizeof(dispmode));
dispmode.dmSize = sizeof(dispmode);
dispmode.dmFields = DM_BITSPERPEL | DM_PELSWIDTH | DM_PELSHEIGHT;
dispmode.dmBitsPerPel = GetDeviceCaps(hdc,BITSPIXEL);
dispmode.dmPelsWidth = old_x_data; // ²òÁüÅÙ²£¥µ¥¤¥º¡Êwidth x¡Ë
dispmode.dmPelsHeight =old_y_data; // ²òÁüÅٽĥµ¥¤¥º¡Êhight y¡Ë
dispmode.dmBitsPerPel=old_perpel; // £±¥Ô¥¯¥»¥ëÅö¤¿¤ê¤Î¥Ó¥Ã¥È¿ô
dispmode.dmDisplayFrequency =old_hz; // ¥ê¥Õ¥ì¥Ã¥·¥å¼þÇÈ¿ô
ReleaseDC(NULL,hdc);
// ¥Ç¥£¥¹¥×¥ì¥¤¥â¡¼¥É¤Î¥Á¥Ã¥¯¹ç³Ê¤Ê¤é²òÁüÅÙÊѹ¹¤ò¹Ô¤¦¡£
if( ChangeDisplaySettings(&dispmode,CDS_TEST) == DISP_CHANGE_SUCCESSFUL ) {
ChangeDisplaySettings(&dispmode,CDS_FULLSCREEN);}

}

 


shortcut.h¤ÎÆþÎÏ

#pragma once
ref class shortcut
{
public:
shortcut(void);
BOOL CreateLinkFile(LPCTSTR lpszShortcutFile, LPCTSTR lpszTargetFile, LPCTSTR lpszArgs, LPCTSTR lpszDescription, LPCTSTR lpszDir);
int Stcut(LPCTSTR pszStr2,LPCTSTR pszStr3);

};


shortcut.cpp¤ÎÆþÎÏ

#include "StdAfx.h"
#include "shortcut.h"
//====================
#include <windows.h>
#include <tchar.h>
#include <shlobj.h> // for IShellLink
#include <stdio.h>
//====================
#include <tchar.h> // L _T
#include <locale.h>


//¥·¥ç¡¼¥È¥«¥Ã¥ÈºîÀ®

hortcut::shortcut(void)
{
}
// *********************************************************
// ¥·¥ç¡¼¥È¥«¥Ã¥È¤ò¥Ç¥¹¥¯¥È¥Ã¥×¤ËºîÀ®
// *********************************************************
//http://winofsql.jp/sh/html/create_shortcut.htm
//http://lightbox.matrix.jp/ginpro/patio.cgi?mode=view2
&f=92&no=9&w=700&type=ref&opt=text-align:left;margin-left:5px;&xml=y
//http://support.microsoft.com/kb/229092/ja
//http://msdn.microsoft.com/ja-jp/library/bb774950(en-us).aspx
//http://dobon.net/vb/dotnet/file/createshortcut.html C#
//http://support.microsoft.com/kb/244677/ja
//http://www.h4.dion.ne.jp/~fht/wptips/shortcut.html
//http://www.h4.dion.ne.jp/~fht/wptips/selectfolder.html
//http://www.h4.dion.ne.jp/~fht/wptips/
//http://rararahp.cool.ne.jp/vc/vctips/api.htm

int shortcut::Stcut(LPCTSTR pszStr2,LPCTSTR pszStr3)
{
//LPCTSTR ¤Ï¡¡const char *¡¡½ñ¤­´¹¤¨¤Ç¤­¤Ê¤¤(Æɤ߼è¤êÀìÍѤÎ)
//LPTSTR ¤Ï¡¡ char *¡¡Æɤ߽ñ¤­¤Ç¤­¤ë

//http://msdn.microsoft.com/ja-jp/library/cc410901.aspx
//http://support.microsoft.com/kb/207008/ja
MessageBox(NULL, TEXT(pszStr3), TEXT("½àÈ÷´°Î»"), 0);
/*HINSTANCE, HINSTANCE, LPTSTR, int*/
//¥Ç¥¹¥¯¥È¥Ã¥×¥Õ¥©¥ë¥À¤ò¼èÆÀ¤·¤Þ¤¹
LPITEMIDLIST pid;
HRESULT hResult = SHGetSpecialFolderLocation(NULL, CSIDL_DESKTOP, &pid);
if(SUCCEEDED(hResult)) {
TCHAR szPath[MAX_PATH * sizeof(WCHAR) / sizeof(TCHAR)];
// MessageBox(NULL, TEXT(pszStr3), TEXT( pszStr2), 0);
// LPCTSTR pszStr = _T("\\resolution_change.lnk"); //ANSI ÈǤǤÏLPCSTR pszStr = "test"; Unicode ÈǤǤÏLPCWSTR pszStr = L"test";
LPCTSTR pszStr = _T(pszStr3); //ANSI ÈǤǤÏLPCSTR pszStr = "test"; Unicode ÈǤǤÏLPCWSTR pszStr = L"test";
if(SHGetPathFromIDList(pid, szPath)) {
// lstrcat(szPath, TEXT("\\resolution_change.lnk"));
lstrcat(szPath, pszStr);
//¥×¥í¥°¥é¥à¤ò¼Â¹Ô¤·¤Æ¤¤¤ë¥Õ¥©¥ë¥À̾¡¢¥Õ¥¡¥¤¥ë̾¤ò¼èÆÀ¤¹¤ë
// ¼Â¹Ô¥Õ¥¡¥¤¥ë¤Î¥Õ¥ë¥Ñ¥¹¼èÆÀ
char szPath2[_MAX_PATH];
GetModuleFileName( NULL, szPath2, MAX_PATH);
//¥Ç¥¹¥¯¥È¥Ã¥×¾å¤Ë¥á¥âÄ¢¤Ø¤Î¥·¥ç¡¼¥È¥«¥Ã¥È¤òºîÀ®¤·¤Þ¤¹
// if(CreateLinkFile(szPath, TEXT("C:\\WINDOWS\\NOTEPAD.EXE"), NULL,NULL, NULL)) {
if(CreateLinkFile(szPath, szPath2, pszStr2,NULL, NULL)) {
MessageBox(NULL, TEXT("¥Ç¥¹¥¯¥È¥Ã¥×¤Ë¥·¥ç¡¼¥È¥«¥Ã¥È¤¬ºîÀ®¤µ¤ì¤Þ¤·¤¿"), TEXT(""), 0);
}
}
CoTaskMemFree(pid);
}
return 0;
}

//lpszShortcutFile : ¥·¥ç¡¼¥È¥«¥Ã¥È¥Õ¥¡¥¤¥ë¤Î¥Ñ¥¹
//lpszTargetFile : ¥ê¥ó¥¯¸µ¤Î¥Õ¥¡¥¤¥ë¤Î¥Ñ¥¹
//lpszArgs : ¥³¥Þ¥ó¥É¥é¥¤¥ó°ú¿ô
//lpszDescription : ¥Ç¥¹¥¯¥ê¥×¥·¥ç¥ó
//lpszDir : ºî¶È¥Ç¥£¥ì¥¯¥È¥ê
BOOL shortcut::CreateLinkFile(LPCTSTR lpszShortcutFile, LPCTSTR lpszTargetFile, LPCTSTR lpszArgs, LPCTSTR lpszDescription, LPCTSTR lpszDir)

{
BOOL bResult = FALSE;
//COM¤Î½é´ü²½
CoInitialize(NULL);

//IShellLink ¥¤¥ó¥¿¡¼¥Õ¥§¡¼¥¹¤ò¼èÆÀ
IShellLink* psl;
// ¡¡£Ã¸À¸ì¤Ç¤Î»ÈÍÑÎ㡧
//¡¡CoCreateInstance( &CLSID_ShellLink, NULL, CLSCTX_INPROC_SERVER, &IID_IShellLink, (void **)&psl )¡¨
//¡¡£Ã¡Ü¡Ü¸À¸ì¤Ç¤Î»ÈÍÑÎ㡧
//¡¡CoCreateInstance( CLSID_ShellLink, NULL, CLSCTX_INPROC_SERVER, IID_IShellLink, (void **)&psl )¡¨
//http://atata.sakura.ne.jp/references/functions/CoCreateInstance.html
// hResult = ::CoCreateInstance((REFCLSID) CLSID_Class1, 0, CLSCTX_INPROC_SERVER, (REFIID) IID__Class1, (LPVOID*)&pClass1);
HRESULT hResult =::CoCreateInstance(( REFCLSID) CLSID_ShellLink, NULL, CLSCTX_INPROC_SERVER,(REFIID) IID_IShellLink,(LPVOID*) reinterpret_cast<void **>(&psl)); //shortcut.obj : error LNK2020: ̤²ò·è¤Î¥È¡¼¥¯¥ó (0A000013) CLSID_ShellLink

// HRESULT hResult =::CoCreateInstance(CLSID_ShellLink, NULL, CLSCTX_INPROC_SERVER, IID_IShellLink, reinterpret_cast<void **>(&psl)); //shortcut.obj : error LNK2020: ̤²ò·è¤Î¥È¡¼¥¯¥ó (0A000013) CLSID_ShellLink
if(SUCCEEDED(hResult)) {
//IPersistFile ¥¤¥ó¥¿¡¼¥Õ¥§¡¼¥¹¤ò¼èÆÀ
IPersistFile* ppf;
hResult = psl->QueryInterface((REFIID)IID_IPersistFile,(LPVOID*) reinterpret_cast<void **>(&ppf)); //shortcut.obj : error LNK2020: ̤²ò·è¤Î¥È¡¼¥¯¥ó (0A000011) IID_IPersistFile
if(SUCCEEDED(hResult)) {
//¥ê¥ó¥¯¸µ¤Î¥Ñ¥¹¤òÀßÄê
hResult = psl->SetPath(lpszTargetFile);
if(SUCCEEDED(hResult)) {
//¥³¥Þ¥ó¥É¥é¥¤¥ó°ú¿ô¤òÀßÄê
if(lpszArgs != NULL) {
psl->SetArguments(lpszArgs);
}
//¥Ç¥¹¥¯¥ê¥×¥·¥ç¥ó¤òÀßÄê
if(lpszDescription != NULL) {
psl->SetDescription(lpszDescription);
}
//ºî¶È¥Ç¥£¥ì¥¯¥È¥ê¤òÀßÄê
if(lpszDir != NULL) {
psl->SetWorkingDirectory(lpszDir);
}
#ifdef UNICODE
hResult = ppf->Save(lpszShortcutFile, TRUE);
if(SUCCEEDED(hResult)) {
bResult = TRUE;
}
#else
WCHAR wszShortcutFile[MAX_PATH];
if(MultiByteToWideChar(CP_ACP, 0, lpszShortcutFile, -1, wszShortcutFile, MAX_PATH) > 0) {
//¥·¥ç¡¼¥È¥«¥Ã¥È¥Õ¥¡¥¤¥ë¤ÎÊݸ
hResult = ppf->Save(wszShortcutFile, TRUE);
if(SUCCEEDED(hResult)) {
bResult = TRUE;
}
}
#endif
}
ppf->Release();
}
psl->Release();
}

CoUninitialize();
return bResult;

}
//http://www.asahi-net.or.jp/~kv8s-yjm/another/yja104.htm



Form1.h¤ÎÆþÎÏ

#pragma once
using namespace System::Diagnostics;
using namespace msclr::interop; // msclr

#include "d_data.h"
#include "disp.h"
#include "shortcut.h"

namespace disp32form1 {

using namespace System;
using namespace System::ComponentModel;
using namespace System::Collections;
using namespace System::Windows::Forms;
using namespace System::Data;
using namespace System::Drawing;

/// <summary>
/// Form1 ¤Î³µÍ×
/// </summary>
public ref class Form1 : public System::Windows::Forms::Form
{
public:
// Form1(void)
array<System::String ^> ^Args_data;
Form1(array<System::String ^> ^args)//voi¤òÊѹ¹

{
InitializeComponent();
//
//TODO: ¤³¤³¤Ë¥³¥ó¥¹¥È¥é¥¯¥¿¡¼ ¥³¡¼¥É¤òÄɲä·¤Þ¤¹

Args_data = args; // ÄɲÃ
//EnableWindow(ListView_GetHeader(reinterpret_cast(this->listView1
->Handle.ToInt32())),FALSE);
//
}

protected:
/// <summary>
/// »ÈÍÑÃæ¤Î¥ê¥½¡¼¥¹¤ò¤¹¤Ù¤Æ¥¯¥ê¡¼¥ó¥¢¥Ã¥×¤·¤Þ¤¹¡£
/// </summary>
~Form1()
{
if (components)
{
delete components;
}
}
private: System::Windows::Forms::Button^ button1;
protected:

private: System::Windows::Forms::ListBox^ listBox1;

private: System::Windows::Forms::TextBox^ textBox2;

private:
/// <summary>
/// ɬÍפʥǥ¶¥¤¥Ê¡¼ÊÑ¿ô¤Ç¤¹¡£
/// </summary>
System::ComponentModel::Container ^components;
private: System::Windows::Forms::TextBox^ textBox1;
private: System::Windows::Forms::TextBox^ textBox3;
private: System::Windows::Forms::TextBox^ textBox4;
private: System::Windows::Forms::TextBox^ textBox6;
private: System::Windows::Forms::TextBox^ textBox5;
private: System::Windows::Forms::Button^ button3;
private: System::Windows::Forms::Label^ label1;
private: System::Windows::Forms::Label^ label2;
private: System::Windows::Forms::Label^ label3;
private: System::Windows::Forms::Label^ label4;
private: System::Windows::Forms::Label^ label5;
private: System::Windows::Forms::TextBox^ textBox7;
private: System::Windows::Forms::TextBox^ textBox8;
private: System::Windows::Forms::TextBox^ textBox9;
private: System::Windows::Forms::TextBox^ textBox10;
private: System::Windows::Forms::Label^ label6;
private: System::Windows::Forms::Button^ button4;

//============================================================-
static disp m_disp;

static shortcut shc;
/* static array<wchar_t> awc;

static pin_ptr<wchar_t> ppwc;*/
//============================================================-

#pragma region Windows Form Designer generated code
/// <summary>
/// ¥Ç¥¶¥¤¥Ê¡¼ ¥µ¥Ý¡¼¥È¤ËɬÍפʥ᥽¥Ã¥É¤Ç¤¹¡£¤³¤Î¥á¥½¥Ã¥É¤ÎÆâÍƤò
/// ¥³¡¼¥É ¥¨¥Ç¥£¥¿¡¼¤ÇÊѹ¹¤·¤Ê¤¤¤Ç¤¯¤À¤µ¤¤¡£
/// </summary>
void InitializeComponent(void)
{
this->button1 = (gcnew System::Windows::Forms::Button());
this->listBox1 = (gcnew System::Windows::Forms::ListBox());
this->textBox2 = (gcnew System::Windows::Forms::TextBox());
this->textBox1 = (gcnew System::Windows::Forms::TextBox());
this->textBox3 = (gcnew System::Windows::Forms::TextBox());
this->textBox4 = (gcnew System::Windows::Forms::TextBox());
this->textBox5 = (gcnew System::Windows::Forms::TextBox());
this->textBox6 = (gcnew System::Windows::Forms::TextBox());
this->button3 = (gcnew System::Windows::Forms::Button());
this->label1 = (gcnew System::Windows::Forms::Label());
this->label2 = (gcnew System::Windows::Forms::Label());
this->label3 = (gcnew System::Windows::Forms::Label());
this->label4 = (gcnew System::Windows::Forms::Label());
this->label5 = (gcnew System::Windows::Forms::Label());
this->textBox7 = (gcnew System::Windows::Forms::TextBox());
this->textBox8 = (gcnew System::Windows::Forms::TextBox());
this->textBox9 = (gcnew System::Windows::Forms::TextBox());
this->textBox10 = (gcnew System::Windows::Forms::TextBox());
this->label6 = (gcnew System::Windows::Forms::Label());
this->button4 = (gcnew System::Windows::Forms::Button());
this->SuspendLayout();
//
// button1
//
this->button1->BackColor = System::Drawing::Color::IndianRed;
this->button1->Location = System::Drawing::Point(83, 1);
this->button1->Name = L"button1";
this->button1->Size = System::Drawing::Size(82, 23);
this->button1->TabIndex = 0;
this->button1->Text = L"Êѹ¹";
this->button1->UseVisualStyleBackColor = false;
this->button1->Click += gcnew System::EventHandler(this, &Form1::button1_Click);
//
// listBox1
//
this->listBox1->FormattingEnabled = true;
this->listBox1->ItemHeight = 12;
this->listBox1->Location = System::Drawing::Point(12, 115);
this->listBox1->Name = L"listBox1";
this->listBox1->Size = System::Drawing::Size(523, 352);
this->listBox1->TabIndex = 2;
this->listBox1->SelectedIndexChanged += gcnew System::EventHandler(this, &Form1::listBox1_SelectedIndexChanged);
//
// textBox2
//
this->textBox2->Location = System::Drawing::Point(171, 3);
this->textBox2->Name = L"textBox2";
this->textBox2->Size = System::Drawing::Size(193, 19);
this->textBox2->TabIndex = 5;
//
// textBox1
//
this->textBox1->Location = System::Drawing::Point(43, 57);
this->textBox1->Name = L"textBox1";
this->textBox1->Size = System::Drawing::Size(47, 19);
this->textBox1->TabIndex = 6;
//
// textBox3
//
this->textBox3->Location = System::Drawing::Point(125, 57);
this->textBox3->Name = L"textBox3";
this->textBox3->Size = System::Drawing::Size(78, 19);
this->textBox3->TabIndex = 7;
//
// textBox4
//
this->textBox4->Location = System::Drawing::Point(234, 57);
this->textBox4->Name = L"textBox4";
this->textBox4->Size = System::Drawing::Size(69, 19);
this->textBox4->TabIndex = 8;
//
// textBox5
//
this->textBox5->Location = System::Drawing::Point(340, 58);
this->textBox5->Name = L"textBox5";
this->textBox5->Size = System::Drawing::Size(48, 19);
this->textBox5->TabIndex = 9;
//
// textBox6
//
this->textBox6->Location = System::Drawing::Point(455, 59);
this->textBox6->Name = L"textBox6";
this->textBox6->Size = System::Drawing::Size(68, 19);
this->textBox6->TabIndex = 10;
//
// button3
//
this->button3->BackColor = System::Drawing::Color::Chartreuse;
this->button3->Location = System::Drawing::Point(2, 1);
this->button3->Name = L"button3";
this->button3->Size = System::Drawing::Size(75, 23);
this->button3->TabIndex = 11;
this->button3->Text = L"¸µ¤ËÌ᤹";
this->button3->UseVisualStyleBackColor = false;
this->button3->Click += gcnew System::EventHandler(this, &Form1::button3_Click);
//
// label1
//
this->label1->AutoSize = true;
this->label1->Location = System::Drawing::Point(13, 58);
this->label1->Name = L"label1";
this->label1->Size = System::Drawing::Size(19, 12);
this->label1->TabIndex = 12;
this->label1->Text = L"No";
//
// label2
//
this->label2->AutoSize = true;
this->label2->Location = System::Drawing::Point(102, 59);
this->label2->Name = L"label2";
this->label2->Size = System::Drawing::Size(17, 12);
this->label2->TabIndex = 13;
this->label2->Text = L"²£";
//
// label3
//
this->label3->AutoSize = true;
this->label3->Location = System::Drawing::Point(211, 58);
this->label3->Name = L"label3";
this->label3->Size = System::Drawing::Size(17, 12);
this->label3->TabIndex = 14;
this->label3->Text = L"½Ä";
//
// label4
//
this->label4->AutoSize = true;
this->label4->Location = System::Drawing::Point(317, 59);
this->label4->Name = L"label4";
this->label4->Size = System::Drawing::Size(17, 12);
this->label4->TabIndex = 15;
this->label4->Text = L"¿§";
//
// label5
//
this->label5->AutoSize = true;
this->label5->Location = System::Drawing::Point(395, 59);
this->label5->Name = L"label5";
this->label5->Size = System::Drawing::Size(54, 12);
this->label5->TabIndex = 16;
this->label5->Text = L"¥ê¥Õ¥ì¥Ã¥·¥å";
//
// textBox7
//
this->textBox7->Location = System::Drawing::Point(129, 89);
this->textBox7->Name = L"textBox7";
this->textBox7->Size = System::Drawing::Size(74, 19);
this->textBox7->TabIndex = 17;
//
// textBox8
//
this->textBox8->Location = System::Drawing::Point(209, 90);
this->textBox8->Name = L"textBox8";
this->textBox8->Size = System::Drawing::Size(80, 19);
this->textBox8->TabIndex = 18;
//
// textBox9
//
this->textBox9->Location = System::Drawing::Point(305, 90);
this->textBox9->Name = L"textBox9";
this->textBox9->Size = System::Drawing::Size(40, 19);
this->textBox9->TabIndex = 19;
//
// textBox10
//
this->textBox10->Location = System::Drawing::Point(362, 90);
this->textBox10->Name = L"textBox10";
this->textBox10->Size = System::Drawing::Size(42, 19);
this->textBox10->TabIndex = 20;
//
// label6
//
this->label6->AutoSize = true;
this->label6->Location = System::Drawing::Point(91, 95);
this->label6->Name = L"label6";
this->label6->Size = System::Drawing::Size(29, 12);
this->label6->TabIndex = 21;
this->label6->Text = L"°ú¿ô";
//
// button4
//
this->button4->BackColor = System::Drawing::Color::MediumPurple;
this->button4->Location = System::Drawing::Point(2, 24);
this->button4->Name = L"button4";
this->button4->Size = System::Drawing::Size(163, 27);
this->button4->TabIndex = 22;
this->button4->Text = L"¥Ç¥£¥¹¥¯¥È¥Ã¥×¤Ë¥·¥ç¡¼¥È¥«¥Ã¥È¤òºî¤ë";
this->button4->UseVisualStyleBackColor = false;
this->button4->Click += gcnew System::EventHandler(this, &Form1::button4_Click);
//
// Form1
//
this->AutoScaleDimensions = System::Drawing::SizeF(6, 12);
this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;
this->BackColor = System::Drawing::Color::Plum;
this->ClientSize = System::Drawing::Size(550, 479);
this->Controls->Add(this->button4);
this->Controls->Add(this->label6);
this->Controls->Add(this->textBox10);
this->Controls->Add(this->textBox9);
this->Controls->Add(this->textBox8);
this->Controls->Add(this->textBox7);
this->Controls->Add(this->label5);
this->Controls->Add(this->label4);
this->Controls->Add(this->label3);
this->Controls->Add(this->label2);
this->Controls->Add(this->label1);
this->Controls->Add(this->button3);
this->Controls->Add(this->textBox6);
this->Controls->Add(this->textBox5);
this->Controls->Add(this->textBox4);
this->Controls->Add(this->textBox3);
this->Controls->Add(this->textBox1);
this->Controls->Add(this->textBox2);
this->Controls->Add(this->listBox1);
this->Controls->Add(this->button1);
this->Name = L"Form1";
this->Text = L"²èÌ̲òÁüÅÙÊѹ¹";
this->Load += gcnew System::EventHandler(this, &Form1::Form1_Load);
this->ResumeLayout(false);
this->PerformLayout();

}

#pragma endregion
private: System::Void button1_Click(System::Object^ sender, System::EventArgs^ e) {
// disp m_disp;

int width_x = int::Parse(textBox3->Text); // ²òÁüÅÙ²£¥µ¥¤¥º¡Êwidth x¡Ë
int height_y =int::Parse(textBox4->Text); // ²òÁüÅٽĥµ¥¤¥º¡Êhight y¡Ë
int perpel =int::Parse(textBox5->Text); // ²òÁüÅٽĥµ¥¤¥º¡Êhight y¡Ë
int frequency_hz =int::Parse(textBox6->Text); // ¥ê¥Õ¥ì¥Ã¥·¥å¼þÇÈ¿ô
int y;

y=m_disp.disp_chang( width_x, height_y, perpel, frequency_hz);
if(y==1) MessageBox::Show("²òÁüÅÙÊѹ¹¼ºÇÔ");

}
private: System::Void Form1_Load(System::Object^ sender, System::EventArgs^ e) {
//¥Õ¥©¡¼¥à¤Ø¤Î°ú¿ô¤Î°ú¤­ÅϤ· ²£¡¡½Ä¡¡¿§¡¡¥ê¥Õ¥ì¥Ã¥·¥å¡¡Î㣱£°£²£¸¡¡£·£¶£¸¡¡£³£²¡¡£¶£°
int h_data0;
int h_data1;
int h_data2;
int h_data3;
/*======================================
if(0 < CommandLineArgs->Length)

{ System::Diagnostics::Debug::WriteLine("°ú¿ô¤Î¸Ä¿ô = " + CommandLineArgs->Length);
for(int i = 0;i < CommandLineArgs->Length;i++)System::Diagnostics::Debug::WriteLine("No." + i + " = " + CommandLineArgs[i]);
}else
{ CommandLineArgs = gcnew array<String ^>(2);
CommandLineArgs[0] = "";
}

{ MessageBox::Show("°ú¿ô¤Î¸Ä¿ô = " + CommandLineArgs->Length);
for(int i = 0;i < CommandLineArgs->Length;i++) MessageBox::Show("No." + i + " = " + CommandLineArgs[i]);
}else
{ CommandLineArgs = gcnew array<String ^>(2);
CommandLineArgs[0] = "";
}
//==========================*/
if(Args_data->Length==4){
h_data0=int::Parse(Args_data[0]);
h_data1=int::Parse(Args_data[1]);
h_data2=int::Parse(Args_data[2]);
h_data3=int::Parse(Args_data[3]);
}else{ Args_data = gcnew array<String ^>(2);
Args_data[0] = "";}

//¥Õ¥©¡¼¥à¤Ø¤Î°ú¿ô¤Î°ú¤­ÅϤ·½ª¤ï¤ê
//disp m_disp;
//¸½ºß¤Î¥â¡¼¥É
textBox3->Text=m_disp.old_x_data.ToString();
textBox4->Text=m_disp.old_y_data.ToString();
textBox5->Text=m_disp.old_perpel.ToString();
textBox6->Text=m_disp.old_hz.ToString();
//°ú¿ô
textBox7->Text=h_data0.ToString();
textBox8->Text=h_data1.ToString();
textBox9->Text=h_data2.ToString();
textBox10->Text=h_data3.ToString();


static DEVMODE dispmode; // ¥Ç¥Ð¥¤¥¹¹½Â¤ÂÎ


//»ÈÍѤǤ­¤ë¥Ç¥£¥¹¥×¥ì¥¤¥â¡¼¥É¤Î³Îǧ
m_disp.disp_use();
String^ text;
text="";
int disp_no=0;

/*-------------------
richTextBox1->SaveFile("C:\\dispmode.rtf");¡¡Êݸ¤¹¤ë¾ì¹ç
richTextBox1->LoadFile("C:\\dispmode.rtf");
-------------------*/
// »ÈÍѤǤ­¤ë¥Ç¥£¥¹¥×¥ì¥¤¥â¡¼¥É¤ò¥ê¥¹¥È¥Ü¥Ã¥¯¥¹¤Ëɽ¼¨
disp_no = 0;
int flag=0;
if(h_data0==0 && h_data1==0 && h_data2==0 && h_data3==0 ) flag=-1;
int y;

//while( TRUE )
// while(m_disp.disp_data[disp_no]->no = -1)
for(disp_no=0;disp_no<=m_disp.disp_end_no;disp_no++)
{
//Á´¥â¡¼¥É¤ÎÎóµó
//if( m_disp.disp_data[disp_no]->no==-1 ) break;
// ¥ê¥Ã¥Á¥Æ¥­¥¹¥È¤Ëɽ¼¨¤¹¤ë
text=disp_no.ToString()+" "+m_disp.disp_data[disp_no]->x_data.ToString()+" "+m_disp.disp_data[disp_no]->y_data.ToString()+
" "+m_disp.disp_data[disp_no]->perpel.ToString()+" "+m_disp.disp_data[disp_no]->hz.ToString()+"\n";
listBox1->Items->Add(text);
//¥Õ¥©¡¼¥à¤Ø¤Î°ú¿ô¤¬²òÁüÅÙ¤ÈŬ¹ç¤·¤Æ¤¤¤ë¤«¤Î¥Á¥§¥Ã¥¯
if( m_disp.disp_data[disp_no]->x_data==h_data0 &&
m_disp.disp_data[disp_no]->y_data==h_data1 &&
m_disp.disp_data[disp_no]->perpel==h_data2 &&
m_disp.disp_data[disp_no]->hz==h_data3) flag=1;
// disp_no++;

}
textBox1->Text=flag.ToString();
//¥Õ¥©¡¼¥à¤Ø¤Î°ú¿ô¤Î°ú¤­ÅϤ·¤¬¤¢¤Ã¤¿¤È¤­¤Î½èÍý

if(flag==1){
y=m_disp.disp_chang( h_data0,h_data1,h_data2,h_data3); //¥Õ¥©¡¼¥à¤Ø¤Î°ú¿ô¤Ç²òÁüÅÙÊѹ¹
this->WindowState = FormWindowState::Minimized; //¸½ºß¤Î¥Õ¥©¡¼¥à¤òºÇ¾®²½
MessageBox::Show("¸½ºß¤Î¥Õ¥©¡¼¥à¤òºÇ¾®²½¤·¤Þ¤·¤¿¡£");
}
else {
if(flag !=-1){
text= h_data0.ToString()+" "+h_data1.ToString()+" "+h_data2.ToString()+" "+h_data3.ToString()+" ";
if (MessageBox::Show(text+"Âбþ¤·¤Æ¤¤¤Ê¤¤²òÁüÅ٤Ǥ¹¡£¶¯À©Êѹ¹¤·¤Æ¤ß¤Þ¤¹¤«?", "³Îǧ", MessageBoxButtons::YesNo) == System::Windows::Forms::DialogResult::Yes) {
y=m_disp.disp_chang( h_data0,h_data1,h_data2,h_data3);
}
}

}
if(y==1) MessageBox::Show("²òÁüÅÙÊѹ¹¼ºÇÔ");
/*
¸½ºß¤Î¥Õ¥©¡¼¥à¤òºÇ¾®²½
this->WindowState = FormWindowState::Minimized;
¸½ºß¤Î¥Õ¥©¡¼¥à¤òºÇÂç²½
this->WindowState = FormWindowState::Maximized;
¸½ºß¤Î¥Õ¥©¡¼¥à¤òºÇ¾®²½¡¢¤¢¤ë¤¤¤ÏºÇÂç²½¤«¤é¸µ¤ËÌ᤹
this->WindowState = FormWindowState::Normal;
¸½ºß¤Î¥Õ¥©¡¼¥à¤òÈóɽ¼¨
this->Hide();
¸½ºß¤Î¥Õ¥©¡¼¥à¤òÈóɽ¼¨¤«¤éɽ¼¨
this->Show();
*/

}
private: System::Void button2_Click(System::Object^ sender, System::EventArgs^ e) {
// disp m_disp;
int s_no=0;
textBox2->Text=listBox1->Text;
textBox1->Text=listBox1->SelectedIndex.ToString();
s_no=listBox1->SelectedIndex;
textBox3->Text=m_disp.disp_data[s_no]->x_data.ToString();
textBox4->Text=m_disp.disp_data[s_no]->y_data.ToString();
textBox5->Text=m_disp.disp_data[s_no]->perpel.ToString();
textBox6->Text=m_disp.disp_data[s_no]->hz.ToString();

}
private: System::Void button3_Click(System::Object^ sender, System::EventArgs^ e) {

m_disp.disp_old();

}

private: System::Void button4_Click(System::Object^ sender, System::EventArgs^ e) {

//http://code.msdn.microsoft.com/VisualC-7c6bc862
//http://yokohama.cool.ne.jp/chokuto/urawaza/com/shell.html
//http://minidx.blogspot.com/2007/03/vc_14.html ʸ»ú¥Ë¥Ä¥¤¥Æ
//http://fatalita.sakura.ne.jp/Junk/_T/index.html
//const TCHAR * text = _T("ʸ»úÎó"); ¤È LPCTSTR text = _T("ʸ»úÎó"); ¤ÏƱ¤¸°ÕÌ£¤Ç¤¹¡£
//http://ysmt.blog21.fc2.com/blog-entry-244.html
//http://support.microsoft.com/kb/311259/ja
//http://codezine.jp/article/detail/4774

shortcut stc;
int ret;
String^ option1;
String^ option2;
option1= textBox3->Text + " "+ textBox4->Text + " " + textBox5->Text + " " + textBox6->Text;
option2="\\resolution_change "+option1+".lnk";
MessageBox::Show(option1+"²òÁüÅ٤νàÈ÷¤ò¤·¤Þ¤¹");
/*
String^ -> char*
//marshal_context¤Î¥¤¥ó¥¹¥¿¥ó¥¹¤òºî¤Ã¤Æ¥á¥½¥Ã¥É¤Îmarshal_as¤ò¸Æ¤Ö
#include <msclr/marshal.h>
using namespace msclr::interop;
//
String^ str = "test_text";
marshal_context context;
const char* ptr = context.marshal_as<const char*>(str);
*/

//LPTSTR pszStr; //exeample ="1024 768 32 60";
const char* pszStr1;
marshal_context ctx1;
pszStr1 = ctx1.marshal_as<const char*>(option1);
const char* pszStr2;
marshal_context ctx2;
pszStr2 = ctx2.marshal_as<const char*>(option2);
// s2 = ctx.marshal_as<const wchar_t*>(s0);
ret=stc.Stcut(pszStr1,pszStr2);
if(ret) MessageBox::Show("¥Ç¥¹¥¯¥È¥Ã¥×¤Î¥·¥ç¡¼¥È¥«¥Ã¥È¤ò³Îǧ¤·¤Æ¤¯¤À¤µ¤¤");

}

private: System::Void listBox1_SelectedIndexChanged(System::Object^ sender, System::EventArgs^ e) {
// disp m_disp;
int s_no=0;
textBox2->Text=listBox1->Text;
textBox1->Text=listBox1->SelectedIndex.ToString();
s_no=listBox1->SelectedIndex;
textBox3->Text=m_disp.disp_data[s_no]->x_data.ToString();
textBox4->Text=m_disp.disp_data[s_no]->y_data.ToString();
textBox5->Text=m_disp.disp_data[s_no]->perpel.ToString();
textBox6->Text=m_disp.disp_data[s_no]->hz.ToString();

}
};
}

¤Ä¤Å¤¯

 
Æ°²è¤¬»Ý¤¯¤´Í÷¤¤¤¿¤À¤±¤Ê¤¤¾ì¹ç¤ÏºÇ¿·¤ÎFlash Player¤ò¥¤¥ó¥¹¥È¡¼¥ë¤·¤Æ¤¯¤À¤µ¤¤
web ¥Ö¥é¥¦¥¶¤¬¥¤¥ó¥¿¡¼¥Í¥Ã¥È¥¨¥¯¥¹¥×¥í¡¼¥é£¶¡Ê£É£Å£¶¡Ë°Ê²¼¤Î¾ì¹ç¥á¥Ë¥å¡¼¤¬Êø¤ì¤Æ¤·¤Þ¤¦¤³¤È¤¬¤¢¤ê¤Þ¤¹¡£
¥¤¥ó¥¿¡¼¥Í¥Ã¥È¥¨¥¯¥¹¥×¥í¡¼¥é£·¡¢Sleipnir¡¢Mozilla Firefox¤ò¤´»ÈÍѤ¯¤À¤µ¤¤¡£