Visual Assist X를 사용하면 제일 편한 기능중 하나가 .h와 .cpp간의 전환 단축키 입니다.

이걸 매크로로 구현한 글이 있어서 링크 합니다.

Visual Studio 2005, 2008에서 동작 확인했습니다.

Function OpenDocument(ByVal path As String) As Window
    If (My.Computer.FileSystem.FileExists(path)) Then
        OpenDocument = DTE.ItemOperations.OpenFile(path)
    Else
        Dim filename As String
        filename = path.Substring(path.LastIndexOf("\") + 1)
        Dim item As ProjectItem
        item = DTE.Solution.FindProjectItem(filename)
        If (item IsNot Nothing) Then
            If (item.Document Is Nothing) Then
                OpenDocument = item.Open()
            Else
                OpenDocument = item.Document.ActiveWindow()
            End If
        End If
    End If
    If (OpenDocument IsNot Nothing) Then
        OpenDocument.Activate()
    End If
End 

Function Sub ToggleBetweenSourceAndHeader()
    Dim document As Document
    document = DTE.ActiveDocument
    Dim path As String
    path = document.FullName
    Dim ext_position As Integer
    ext_position = path.LastIndexOf(".")
    If (ext_position <> -1) Then
        Dim ext As String
        ext = path.Substring(ext_position)
        Dim path_without_ext As String
        path_without_ext = path.Remove(ext_position, ext.Length())
        If (ext.ToLower().Contains(".cpp")) Then     ' .cpp -> .hpp or .h
            If (OpenDocument(path_without_ext & ".hpp") Is Nothing) Then
                OpenDocument(path_without_ext & ".h")
            End If
        ElseIf (ext.ToLower().Contains(".cxx")) Then ' .cxx -> .hxx
            OpenDocument(path_without_ext & ".hxx")
        ElseIf (ext.ToLower().Contains(".cc")) Then  ' .cc -> .hh
            OpenDocument(path_without_ext & ".hh")
        ElseIf (ext.ToLower().Contains(".c")) Then
            OpenDocument(path_without_ext & ".h")
        ElseIf (ext.ToLower().Contains(".h")) Then   ' .h -> .c or .cpp
            If (OpenDocument(path_without_ext & ".c") Is Nothing) Then
                OpenDocument(path_without_ext & ".cpp")
            End If
        ElseIf (ext.ToLower().Contains(".hpp")) Then ' .hpp -> .cpp
            OpenDocument(path_without_ext & ".cpp")
        ElseIf (ext.ToLower().Contains(".hxx")) Then ' .hxx -> .cxx
            OpenDocument(path_without_ext & ".cxx")
        ElseIf (ext.ToLower().Contains(".hh")) Then  ' .hh -> .cc
            OpenDocument(path_without_ext & ".cc")
        End If
    End If
End Sub






posted by 뚱2

글래스 자동 임포트 기능이라기 보다 정리기능이라고 할 수 있습니다.
사용하는 클래스는 자동으로 임포트 하고
사용하지 않는 클래스가 임포트 되어 있으면 정리해 줍니다.

단축키는 Ctrl+Shift+O (영어) 입니다.
posted by 뚱2

Window -> Preferences -> General -> Keys


posted by 뚱2
Window -> Preferences -> General -> Editors -> Text Editors -> Spelling


posted by 뚱2
서라운드 기능을 하는 단축키 이다.


posted by 뚱2
이클립스의 재미있는 옵션 입니다.
타이핑 중에 세미콜론을 쓰면 자동으로 문장 끝으로 이동시킵니다.
처음에는 어색했는데 익숙해 지니까 없으면 불편한 기능이 되어버렸습니다.

Window -> Preferences -> Java -> Editor -> Typing -> Automatically insert at correct position 
-> Semicolons 체크



posted by 뚱2
이클립스를 소스를 작성하면 임포트 선언한 부분이 폴더링이 되어서 한꺼번에 보입니다.
제 개인적으로 불편해서 전 펼쳐 보이게 사용합니다.

Window -> Preferences -> Java -> Editor -> Folding -> Enable folding 체크 해제



posted by 뚱2
Window -> Preferences -> General -> Edittors -> Text Editors -> Show Line Numbers 를 체크




posted by 뚱2

오늘 작업중인 노트북을 새로 밀었다.
프로젝트 진행중이던 프로그램들은 USB 하드에 백업해구도 다시 복구하니...
헉!!!! Visual Studio 2005에서 실행이 안되는 것이다.
그 첫번째 에러메세지는 공유 MFC DLL을 사용했는데 디버그용
mfc80ud.dll을 찾을 수 없다는 것이다 그래서 정적 MFC 로 컴파일 해보니
잘된다... 그래도 찜찜해서
다시 공유 DLL로 하고 직접 mfc80ud.dll을 옮겨서 해봤으나 이번에는
C 런타임 dll vmsvcr80d.dll 을 찾을수 없다고 한데..
역쉬 찾아서 넣어줬지만 이젠 알 수 없는 에러가 나버린다..
여기 저기 찾고... 별 방법을 다 해봤으나 안되는데
갑자기 든 생각이 새로 노트북을 밀면서 FAT32 방식으로 포맷을 바꿨다.
기존의 방식은 NTFS 방식이었다
결국 다시 노트북을 밀고 NTFS 방식으로 해보니
제대로 된다...
왜 이렇게 되는지 이유는 모르겠고 무엇때문에 안되는지는 알았는데
찜찜하다....
posted by 뚱2

Platform SDK 설치

IDE/Tool/Visual Studio 2008. 9. 18. 15:23

Visual Studio 만을 설치하는 것으로는 부족합니다.
VS 가 지난 97 년에 나왔고, 지금 쓰고 있는 것도 VC98 폴더명을 통해서 유추해봐도 98 년 정도에 나온 것을
대부분의 개발자들이 그대로 쓰고 있는 실정입니다.

하지만, 하루가 다르게 기존 개발환경은 업데이트 되고 있기 때문에, 98 년도에 나온 Windows 개발관련 Header 파일은
내용이 많이 부실한 상황입니다.

이런저런 이유로, MS 에서는 Platform SDK 를 내놓았습니다.
물론, 무료이고
http://www.microsoft.com/msdownload/platformsdk/sdkupdate
사이트에서 다운로드 받을 수 있습니다. 만약, 자신이 근무하는 회사가 "MSDN Universal" 을 받고 있다면, 그 때 받게 되는
묵직한 "CD" 박스에 "Platform SDK" CD 가 들어 있으니, 그걸로 설치하셔도 됩니다.

해당 웹페이지에 가면, Windows SDK 라고 해서 "Core SDK", "DirectX SDK", "Internet Development SDK", "IIS SDK",
"MDAC SDK", "Windows Installer SDK", "WMI SDK" 로 나뉘어져 있습니다.

마음같아서는 모두 설치하고 싶으시겠지만, 웹상에서 다운로드 받는 것이기 때문에 "Core SDK" 만 설치하는 데도
시간단위로 걸립니다. 나머지는 해당 분야에 맞게 골라서 설치하시면 되고, 기본적으로 꼭 "Core SDK" 는 설치를 하십시오.

"Platform SDK" 를 설치하는 경우 부가적으로 "Platform SDK" 도움말 파일도 설치가 됩니다. MS 행사에서 간혹, "MSDN
Library" 를 나누어 주는 경우가 있는데요. 그 MSDN Library 도움말의 대부분을 차지하고 있는 것이 "Platform SDK"
도움말입니다. MSDN Library 와 많은 부분에서 중복이 되기 때문에 하드 디스크의 공간이 GB 단위로 손실이 발생합니다.
더군다나, 거기다가 Visual Studio.NET 까지 설치하면 .NET 도움말에도 MSDN Library 가 있어서, 3중으로 중복된 파일이
존재하게 됩니다. 그래서 저같은 경우에는 아예 "MSDN Library" 를 제거했고, 그냥 Platform SDK 설치와 함께 제공되는
도움말을 쓰고 있습니다.

설치가 완전히 되고 나면, Visual Studio IDE 에 Platform SDK 의 존재를 알려야 됩니다. "Platform SDK" 설치과정중에
자동적으로 해주는 단계가 있는데, 그 단계를 무시했다고 해도 상관없습니다. 수동으로 다음과 같이 입력해 주면 됩니다.

VC++ IDE 에서 "Tools/Options" 메뉴에 "Directories" 탭을 누른후,

오른쪽 윗편에 "Include files" 를 선택하신 후, 다음과 같은 순서인지 확인합니다.
C:\Program Files\Microsoft Platform SDK\include
C:\Program Files\Microsoft Platform SDK\include\ATL30
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE
C:\Program Files\Microsoft Visual Studio\VC98\MFC\INCLUDE
C:\Program Files\Microsoft Visual Studio\VC98\ATL\INCLUDE

"Library files" 에도 Platform SDK 의 존재를 알립니다.
C:\Program Files\Microsoft Visual Studio\VC98\LIB
C:\Program Files\Microsoft Visual Studio\VC98\MFC\LIB
C:\Program Files\Microsoft Platform SDK\lib

위에서 보면 Include File 같은 경우에 Platform SDK 폴더의 것을 상위에 놓았고, Library 의 경우에는 맨 하위에 놓은 것을
볼 수 있습니다.
왜냐면... 개발을 하다 보니, 새로 나온 Platform SDK 의 Lib 파일을 사용하는 경우, 불안정하게 동작하는 것을 많이 경험
했습니다. 그래서, 헤더파일만 위에 놓고, Lib 파일은 우선순위를 가장 아래로 두었습니다.

여러분이 저를 기준으로 삼을 필요는 없습니다. Library 역시 Platform SDK 를 가장 상위에 놓아도 됩니다. 단지, 저는 그렇게
하고 싶지 않을 뿐입니다.

출처 http://www.sysnet.pe.kr/Default.aspx?mode=2&sub=0&pageno=11&detail=1&wid=20
posted by 뚱2
Windows 2003에서 Visual Studio 2005 SP1 설치 오류 문제


Error message when you try to install a large Windows Installer package or a large Windows Installer patch package in Windows Server 2003 or in Windows XP: "Error 1718. File was rejected by digital signature policy"

SYMPTOMS

When you try to install a large Microsoft Windows Installer (.msi) package or a large Microsoft Windows Installer patch (.msp) package on a computer that is running Microsoft Windows Server 2003 or Microsoft Windows XP, you receive the following error message:
Error 1718. File FileName was rejected by digital signature policy.


CAUSE

This problem occurs when the computer has insufficient contiguous memory for Windows Server 2003 or Windows XP to verify that the .msi package or the .msp package is correctly signed.

WORKAROUND

To work around this problem, follow these steps:

1. Click Start, click Run, type control admintools, and then click OK.
2. Double-click Local Security Policy(로컬 보안 설정).
3. Click Software Restriction Policies(소프트웨어 제한 정책).
Note If no software restrictions are listed, right-click Software Restriction Policies(소프트웨어 제한 정책), and then click Create New Policy(정책 생성하기).
4. Under Object Type(개체 유형), double-click Enforcement(강요).
5. Click All users except local administrators(로컬 관리자를 제외한 모든 사용자), and then click OK.
6. Restart the computer.

Important
After you follow the previous steps, local administrators can install the .msi package or the .msp package. After the package is installed, reset the enforcement level by following the previous steps. In step 5, click All users instead of All users except local administrators.
posted by 뚱2

Visual Assist X

IDE/Tool/Visual Studio 2008. 2. 20. 18:37
Visual Studio를 더 편하게 사용하게 해주는 프로그램입니다.
Assist X에 여러가지 기능이 있지만 그중에 제일 좋은건

1. Alt+O
  C++ 프로그래머라면....
  .h 파일과 .cpp 파일을 오가는데 많이 힘들어 하실텐데요
  ALT+O로 한번에 이동 할 수 있습니다. 정말 편합니다.

2. Alt+G
  자료형이나 함수의 정의된 곳으로 이동하는 단축키 입니다.

ps. 그리고 Visual Studio에서 ctrl+Tap을 누르면 윈도우에서 Alt+Tap을 누른것과 같은
    현재 띄워놓은 창들이 리스트 형식으로 쭉~~~~ 나타납니다.
posted by 뚱2
VC++ 6.0을 정식으로 지원하는 마지막 PSDK 입니다.

http://www.microsoft.com/msdownload/platformsdk/sdkupdate/psdk-full.htm
posted by 뚱2