Search Results for '.net'

5 POSTS

  1. 2006년 08월 02일 Using Visual C++ 2005 Express Edition with the Microsoft Platform SDK
  2. 2006년 07월 21일 웹페이지 긁어오는 소스 (MFC, VC++.NET) (2)
  3. 2006년 07월 21일 기념일 계산 소스 (VC++.NET)
  4. 2006년 07월 18일 VC++ .NET에서 TRACE
  5. 2006년 07월 12일 VC++ .NET 메시지 박스

Using Visual C++ 2005 Express Edition with the Microsoft Platform SDK

By Brian Johnson,
Microsoft Corporation

You can use Visual C++ Express to build powerful .NET Framework applications immediately after installation. In order to use Visual C++ Express to build Win32 applications, you'll need to take just a few more steps. I'll list the steps necessary for building Win32 applications using Visual C++ Express.

Step 1: Install Visual C++ Express.

If you haven't done so already, install Visual C++ Express.

Step 2: Install the Microsoft Platform SDK.

Install the Platform SDK over the Web from the Download Center. Follow the instructions and install the SDK for the x86 platform.

Step 3: Update the Visual C++ directories in the Projects and Solutions section in the Options dialog box.

Add the paths to the appropriate subsection:

Executable files: C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Bin

Include files: C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Include

Library files: C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Lib

Note: Alternatively, you can update the Visual C++ Directories by modifying the VCProjectEngine.dll.express.config file located in the \vc\vcpackages subdirectory of the Visual C++ Express install location. Please make sure that you also delete the file "vccomponents.dat" located in the "%USERPROFILE%\Local Settings\Application Data\Microsoft\VCExpress\8.0" if it exists before restarting Visual C++ Express Edition.

Step 4: Update the corewin_express.vsprops file.

One more step is needed to make the Win32 template work in Visual C++ Express. You need to edit the corewin_express.vsprops file (found in C:\Program Files\Microsoft Visual Studio 8\VC\VCProjectDefaults) and

Change the string that reads:

AdditionalDependencies="kernel32.lib" to

AdditionalDependencies="kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib"

Step 5: Generate and build a Win32 application to test your paths.

In Visual C++ Express, the Win32 Windows Application type is disabled in the Win32 Application Wizard. To enable that type, you need to edit the file AppSettings.htm file located in the folder “%ProgramFiles%\Microsoft Visual Studio 8\VC\VCWizards\AppWiz\Generic\Application\html\1033\".

In a text editor comment out lines 441 - 444 by putting a // in front of them as shown here:

// WIN_APP.disabled = true;
// WIN_APP_LABEL.disabled = true;
// DLL_APP.disabled = true;
// DLL_APP_LABEL.disabled = true;

Save and close the file and open Visual C++ Express.

From the File menu, click New Project. In the New Project dialog box, expand the Visual C++ node in the Product Types tree and then click Win32. Click on the Win32 Console Application template and then give your project a name and click OK. In the Win32 Application Wizard dialog box, make sure that Windows application is selected as the Application type and the ATL is not selected. Click the Finish button to generate the project.

As a final step, test your project by clicking the Start button in the IDE or by pressing F5. Your Win32 application should build and run.

이올린에 북마크하기(0) 이올린에 추천하기(0)

Trackback URL : http://php.chol.com/~perrkoo/tt/trackback/208

Leave a comment



웹페이지 긁어오는 소스 (MFC, VC++.NET)

Posted 2006년 07월 21일 23시 26분, Filed under: Teeny Tools/phpMyMemo
phpMyMemo와 상관이 있는 소스일 듯 하네요.
웹에서 실행되는 내용을.. 가져오는 소스입니다.

원래는 MFC로 만드려고 계획했으나,
VC++ .NET을 사용해서 해보려고 수정해봤습니다.

VB.NET이나 C#.NET은 참고할만한 곳이 많은데..
VC++.NET은 찾기 힘드네요.
어쩔 수 없이 C# 소스를 찾아서 바꾸기도 하고..
맨땅에 헤딩하듯이 MSDN을 찾아보기도 하고..
쉽지 않았네요.
그래도 재미있었네요~ ^^


<MFC용>
//#include <Wininet.h> // 필요한 헤더 파일
#pragma comment(lib, "wininet") // 필요한 lib 파일
#include <afxinet.h>


void CTestphpDlg::GOGO()
{

// echo로 설정된 값 가져오기...
char* address = "http://[경로]/version.php";  //여기는 원하는 주소로 수정~
CInternetSession session;
CInternetFile *pHttpFile = NULL;


try
{
  pHttpFile = (CInternetFile *) session.OpenURL(address);
}
catch (CInternetException* pEx)
{
  pHttpFile = NULL;
  unsigned long iErr = pEx->m_dwError;
  AfxMessageBox(_T("Internet connection error %d"));
}


CString szReturnedStrings = _T("");
CString szReturn;

while(pHttpFile->ReadString(szReturn))
szReturnedStrings = szReturnedStrings + szReturn;

// szReturnedStrings.Replace("<ENTER>","\\\n");
AfxMessageBox(szReturnedStrings);


pHttpFile->Close();
}


<VC++ .NET용>
//위에 쓰고
using namespace System::Net;
using namespace System::IO;
using namespace System::Text;  //String 용
using namespace System::Diagnostics; 
//Debug::WriteLine용




//실행부분에는..
Uri^ myUri =gcnew Uri("http://[경로]/version.php");  //여기는 원하는 주소로 수정~
WebRequest^ webReq = WebRequest::CreateDefault(myUri);
WebResponse^ webRes = webReq->GetResponse();
Stream^ ReceiveStream = webRes->GetResponseStream();


StreamReader^ reader = gcnew StreamReader(ReceiveStream, Encoding::Default );

array<Char>^ read = gcnew array<Char>(256);
String^ input = gcnew String(read);

while( !String::IsNullOrEmpty(input = reader->ReadLine()) )
{
  Debug::WriteLine(input);
}


reader->Close();
webRes->Close();

이올린에 북마크하기(0) 이올린에 추천하기(0)

Trackback URL : http://php.chol.com/~perrkoo/tt/trackback/202

  1. # BlogIcon Wiziple 2006년 08월 02일 09시 14분 Delete Reply

    파일로 저장할때는 간단하게 한줄^^

    URLDownloadToFile();

  2. # BlogIcon perrkoo 2006년 08월 02일 10시 49분 Delete Reply

    오오 그렇군요. 함수를 본 적은 있는데, 어디에 써먹나 몰랐는데 ^^ 감사합니다~

Leave a comment



기념일 계산 소스 (VC++.NET)

Posted 2006년 07월 21일 23시 25분, Filed under: Teeny Tools/Etc.
기념일 계산 소스입니다.
예전에 MFC용(새 창으로 열기)(여기)으로 만든 적이 있었는데..
VC++.NET용으로 바꿔봤습니다.(비교해서 보시면 재미있을 듯)
역시 참고 할 곳이 별로 없어서
MSDN을 찾아보면서 맨땅에 헤딩했습니다.


// 입력된 날자부터 오늘까지의 총 날짜수
int CalcDayElapsed(int yearS, int monthS,int dayS, bool First)
{
DateTime StartDay;
StartDay = DateTime (yearS,monthS,dayS,0,0,0);

int yearN,monthN,dayN;
DateTime NowDay;
NowDay = DateTime::Today;
yearN = NowDay.Year;
monthN = NowDay.Month;
dayN = NowDay.Day;

Debug::WriteLine(String::Format("Today: {0}/{1}/{2}",yearN,monthN,dayN));

TimeSpan ElapsedDay = NowDay - StartDay;

int DayElapsed=0;

// First=> true 첫날을 하루로 침/ false: 다음날부터 계산
if (First==true)
DayElapsed=(int)ElapsedDay.TotalDays+1;
else
DayElapsed=(int)ElapsedDay.TotalDays;

return DayElapsed;
}


//입력된 날자로부터 몇 일 후는?
void CalcDayFrom(int yearS, int monthS, int dayS, bool First,
int Dayafter, int& yearT, int& monthT, int& dayT)
{
DateTime StartDay;
StartDay = DateTime (yearS,monthS,dayS,0,0,0);

TimeSpan ElapsedDay;

// First=> true 첫날을 하루로 침/ false: 다음날부터 계산
if (First==true)
ElapsedDay=TimeSpan(Dayafter-1,0,0,0);
else
ElapsedDay=TimeSpan(Dayafter,0,0,0);

DateTime TheDay;
TheDay=StartDay+ElapsedDay;

yearT = TheDay.Year;
monthT = TheDay.Month;
dayT = TheDay.Day;

return;

}


//실행부분(버튼클릭)
private: System::Void button1_Click(System::Object^ sender, System::EventArgs^ e) {

int yearS, monthS, dayS;
yearS=2006;
monthS=5;
dayS=13;


bool first=true;
int elapsed=CalcDayElapsed(yearS,monthS,dayS,first);

Debug::WriteLine(String::Format("Start: {0}/{1}/{2}",yearS,monthS,dayS));
Trace::WriteLine(String::Format("Elapsed : {0}",elapsed) );

int y,m,dd;
CalcDayFrom(yearS,monthS,dayS,first,elapsed,y,m,dd);
Debug::WriteLine(String::Format("The Day : {0}/{1}/{2}",y,m,dd) );

}
이올린에 북마크하기(0) 이올린에 추천하기(0)

Trackback URL : http://php.chol.com/~perrkoo/tt/trackback/203

Leave a comment



VC++ .NET에서 TRACE

Posted 2006년 07월 18일 22시 11분, Filed under: Teeny Tools/Etc.
MFC에서 저는 지겹도록(?) TRACE 매크로를 많이 씁니다.
디버그 모드에서 값을 체크할 때는... 개인적으로 '짱'이라고 생각합니다.
그런데..
.NET에서는 어떻게 해야하는지 해매였지요.
역시나 알면 쉽지만.. 모르면 저처럼 삽질을 해야지요.
비베의 Debug.Print랑 비슷한 모습을 보여주네요.
그리고 꽤 지적도 많은 CString을 안쓰는 대신에 쓰는 String 클래스.. 맘에 드네요.

   using namespace System::Diagnostics; //위에는 요놈을..

    //사용해야 할 곳에서.. Trace::를 쓰던가 Debug::를 쓰던가..
  Debug::WriteLine(yearS);
  Debug::WriteLine(String::Format("Start: {0}/{1}/{2}",yearS,monthS,dayS));
  Trace::WriteLine(String::Format("Elapsed : {0}",elapsed));
이올린에 북마크하기(0) 이올린에 추천하기(0)

Trackback URL : http://php.chol.com/~perrkoo/tt/trackback/199

Leave a comment



VC++ .NET 메시지 박스

Posted 2006년 07월 12일 00시 48분, Filed under: Teeny Tools/Etc.
VC++ 메시지박스를 많이 쓰지요.
그런데.. .net에서 어떻게 해야하는지 좀 해맸습니다.
알고보면 쉬운거지만..
.net을 전혀 모르던 저에게는 좀 깝깝했던 기억이 있네요.

MessageBox::Show("A","B", MessageBoxButtons::OKCancel,MessageBoxIcon::Asterisk);
이올린에 북마크하기(0) 이올린에 추천하기(0)

Trackback URL : http://php.chol.com/~perrkoo/tt/trackback/196

Leave a comment




Calendar

«   2010년 03월   »
  1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31      

Recent Posts

  1. 하지만.. 후회는...
  2. 버려야 할 나쁜 습관 #2
  3. 버려야 할 나쁜 습관 #1
  4. 산세베리아
  5. 신파극

Recent Comments

  1. 언녕허세요? 23456 2009년
  2. 하나라도 워링이나면 발생합니다. 경고.. June 2008년
  3. 아... 아직 사용하시는 분이 계셨군요... perrkoo 2008년
  4. 저는 아직도 쓰고 있습니다. 혹시 업글.. Text2J사용자 2008년
  5. -_-;; 뭐라노? 씰데없는 코멘트구마이 perrkoo 2008년

Recent Trackbacks

  1. ExacTime 0.9 Beta 공개!!! 벽에게 말걸기 2006년
  2. ExacTime 이것은 뭐냐? 벽에게 말걸기 2006년
  3. 블로그 방문자 통합 10만명 돌파 기념!! Multimedia 評 2006년
  4. TEXT2JPEG4PSP v0.76 SE (Special Edition) 벽에게 말걸기 2006년
  5. TEXT2JPEG4PSP v0.76 벽에게 말걸기 2006년

Bookmarks

  1. Everyone and Everything
  2. ExacTime Q/A 게시판
  3. Multimedia 評
  4. Rhino's Cool Talk
  5. ShuTime Homepage
  6. TEXT2JPEG4PSP Q/A 게시판
  7. ▒ 제닉스의 사고뭉치 ▒

Site Stats

TOTAL 119966 HIT
TODAY 5 HIT
YESTERDAY 30 HIT
Creative Commons License

이 저작물은 크리에이티브 커먼즈 코리아 저작자표시-비영리-변경금지 2.0 대한민국 라이센스에 따라 이용하실 수 있습니다.