Search Results for 'vc++'

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월 18일 VC++ .NET에서 TRACE
  4. 2006년 07월 13일 C2220 에러에 관하여.. (7)
  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에서 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



C2220 에러에 관하여..

Posted 2006년 07월 13일 21시 13분, Filed under: Teeny Tools/Etc.
MFC로 회사에서 프로그램을 짜다가 처음보는 에러를 만났습니다.

Compiler Error C2220 warning treated as error - no object file generated

이렇게 뜨더군요.
사실 warning treated as error 만 뭔소린가 파악해도 쉽게 알 수 있을지 모르지만.. -_-;;
처음보는 에러인지라..

국내 사이트를 꽤 찾아봐도 싱그러운 해답은 없더군요.
모 국내 개발자께서 C에서는 그냥 넘어갈 것인데 C++에서는 에러로 처리하는 것 같다고 하시더군요.
배열을 0으로 설정을 해서 그렇다고 하시는데.. 내 경우는 아닌 거 같구.

AutoCAD를 컨트롤 할 일이 있어서 ObjectARX를 사용하는 곳에
MFC로 이미 만든 프로그램에 있던 함수인지라 전혀 문제가 없다고 생각하고 가져다 발랐더만..
대략난감.

여튼 외국사이트에서 도움을 받았는데..
어처구니 없게도
"treat warnings as errors"라는 옵션을 꺼버리면 되더군요.
컴파일러 옵션에서는 "/WX"라는 옵션을 지우면되구요.

알고보면 간단하지만..
저처럼 헤매이실 다른 분을 위해 남깁니다.

<도움받은 사이트>
http://microsoft.ease.lsoft.com/scripts/wa-msn.exe?A2=ind0105c&L=mfc&P=367

http://msdn.microsoft.com/library/defau ··· 2220.asp(새 창으로 열기)
이올린에 북마크하기(0) 이올린에 추천하기(0)

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

  1. # 김현중 2006년 12월 18일 15시 38분 Delete Reply

    감사합니다..^^

  2. # BlogIcon perrkoo 2006년 12월 28일 10시 26분 Delete Reply

    별 말씀을요~ ^^

  3. # 김구진 2007년 09월 12일 17시 26분 Delete Reply

    감사합니다.. 이문제 때문에 한참을 고민하다가 이 글을보고 겨우 해결했네요..ㅠㅠ 다시 한번 감사드립니다!!ㅎ

  4. # BlogIcon perrkoo 2007년 09월 19일 23시 00분 Delete Reply

    아 그렇습니까? 다행이네요~ ^^

  5. # dalhee 2008년 04월 25일 13시 25분 Delete Reply

    오늘 libtorrent 를 빌드하다가...헤매이고 있었는데 큰 도움이 되었습니다.
    감사합니다.

  6. # BlogIcon perrkoo 2008년 04월 26일 21시 38분 Delete Reply

    도움이 되었다니.. 기분이 정말 좋습니다. ^^

  7. # BlogIcon June 2008년 10월 17일 16시 37분 Delete Reply

    하나라도 워링이나면 발생합니다.
    경고수준 낮추던지 옵션을 끄던지하는 방법도 있겠지만
    워링을 잡는게 더 좋은 방법일것 같아요 ^^;

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 120211 HIT
TODAY 14 HIT
YESTERDAY 42 HIT
Creative Commons License

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