독도 광고 모금 캠페인


'2008/04'에 해당되는 글 7건

  1. 2008/04/17 19장 초대장 날려드립니다.(마감) (23)
  2. 2008/04/17 BROWSEINFO로 폴더를 선택할 때, 처음 보여지는 폴더를 변경하기.(MFC)
  3. 2008/04/16 파일의 속성 얻어오기 / 설정하기(MFC)
  4. 2008/04/16 릴리즈 모드에서 디버깅하기(VC6)
  5. 2008/04/03 선배 나 열나는 것 같아............
  6. 2008/04/03 초대장 나눠드립니다.(마감) (45)
  7. 2008/04/02 Office Style Flat ComboBox (From CodeProject, MFC)
2008/04/17 11:59

19장 초대장 날려드립니다.(마감)

사용하실 분들만 댓글 달아주세요-0-;

얼마전에 35장 보내드렸는데, 일주일이 지나도록 안받는 분들이 계셔서 제가 다시 회수했습니다.

일주일 안에 안받으시면 바로 초대장 회수하겠습니다~

댓글 달아주세요~
크리에이티브 커먼즈 라이선스
Creative Commons License
이올린에 북마크하기(0) 이올린에 추천하기(0)
Trackback 0 Comment 23
2008/04/17 09:41

BROWSEINFO로 폴더를 선택할 때, 처음 보여지는 폴더를 변경하기.(MFC)

콜백루틴(무조건 static)

static int CALLBACK BrowseForFolder_CallbackProc(HWND hwnd, UINT uMsg, LPARAM lParam, LPARAM lpData)
{
if(uMsg == BFFM_INITIALIZED)
SendMessage(hwnd, BFFM_SETSELECTION, (WPARAM)TRUE, (LPARAM)lpData);

return 0;
}


폴더 선택 다이얼로그 띄우는 함수

BOOL BrowseForFolder(HWND hWnd, CString& strFolder, LPCTSTR lpstrTitle)
{
BOOL bRet = FALSE;

LPTSTR lpstrFolder = (LPTSTR)strFolder.GetBuffer(MAX_PATH); //필요하면 사용.

BROWSEINFO bi;
bi.hwndOwner = hWnd;
bi.pidlRoot = NULL;
bi.pszDisplayName = NULL;
bi.lpszTitle = lpstrTitle;
bi.ulFlags = BIF_RETURNONLYFSDIRS;
bi.lpfn = BrowseForFolder_CallbackProc; //콜백함수
bi.lParam = (LPARAM)lpstrFolder; //처음에 보여질 폴더. CString 값이면 (LPCSTR)(LPCTSTR)로 형변환해서 사용해도 됨.

LPITEMIDLIST pidlBrowse;
if(pidlBrowse = SHBrowseForFolder(&bi))
{
if(SUCCEEDED(SHGetPathFromIDList(pidlBrowse, lpstrFolder))) //이 아래 부분부터는 필요하면 사용. 아니면 변경해서 사용.
bRet = TRUE;

LPMALLOC pMalloc;
if(SUCCEEDED(SHGetMalloc(&pMalloc)))
{
pMalloc->Free(pidlBrowse);
pMalloc->Release();
}
}

strFolder.ReleaseBuffer();
return bRet;
}

엠파스 검색에서 따옴.

크리에이티브 커먼즈 라이선스
Creative Commons License
Trackback 0 Comment 0
2008/04/16 17:54

파일의 속성 얻어오기 / 설정하기(MFC)

DWORD GetFileAttributes(LPCTSTR lpFileName);

파일의 Full Path를 넘겨주면 파일의 속성을 리턴한다. 이 리턴값을 받아서 & 연산으로 자신의 원하는 속성이 있는지 검색하면 된다.

BOOL SetFileAttributes(LPCTSTR lpFileName, DWORD dwFileAttributes);

사용법은 위와 똑같다. 파일의 경로와 속성을 넘겨주면 속성을 세팅한다. 실패하면 Zero를 리턴.
크리에이티브 커먼즈 라이선스
Creative Commons License
Trackback 0 Comment 0
2008/04/16 12:13

릴리즈 모드에서 디버깅하기(VC6)

   요약 : 어플리케이션을 릴리즈 모드로 Build 할 때 디버깅 정보를 남기어서 VC++ Debugging Tool에서 디버깅을 가능하게 합니다.
    이 방법을 사용하는 경우, 실제 릴리즈 실행 파일은 거의 영향을 받지 않으면서,디버그에서 브레이크 포인터를 잡거나, Trace를 가능하게 하므로,릴리즈모드 에서만 발생하는 버그를 잡을수 있습니다.

    추가정보 :
    이 방법을 사용하게 되면 _DEBUG free define으로 포함되는 디버깅 메크로는 포함되지 않으나, Source code안으로 Step in 가능하게 하는 디버깅 정보들은 OBJ와 PDB 파일에 남게 됩니다.  이를 이용하게 되면 VC++ IDE 환경에서 source level 까지의 step in이 가능해 집니다.

    방법 :

    1. Project를 open한뒤 menu 'Project/Settings'를 선택합니다.

    2. 'Settings For'를 'Win32 Release'로 선택합니다.

    3. 'C/C++' tab에서 'category'를 'General'로 선택하고 'Program Database'로 선택합니다.

    4. 'Link' tab에서 'category'를 General'로 선택하고 'Generate debug info'를 체크합니다.

    5. 'Rebuild All'를 실행하여서 프로그램을 다시 빌드 합니다.
   

    이제 디버깅 하고자 하는 위치에 브레이크포인터를 잡고 'Go'를 실행하면,
   
    디버깅을 진행할수 있습니다.

 
출처 : 데브피아 정유석님의 글

크리에이티브 커먼즈 라이선스
Creative Commons License
Trackback 0 Comment 0
2008/04/03 23:32

선배 나 열나는 것 같아............



ㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋ
크리에이티브 커먼즈 라이선스
Creative Commons License
이올린에 북마크하기(0) 이올린에 추천하기(0)
Trackback 0 Comment 0
2008/04/03 10:44

초대장 나눠드립니다.(마감)

35장이나 있네요.

사용하실 분들만 받으면 좋겠지만, 그냥 아무나-0-;

댓글 달리는데로...그리고 제가 틈나는대로 계속 보내드릴께요. 오늘 중 무조건 발송~_~

발송 끝났어요~
크리에이티브 커먼즈 라이선스
Creative Commons License
이올린에 북마크하기(0) 이올린에 추천하기(0)
Trackback 0 Comment 45
2008/04/02 14:58

Office Style Flat ComboBox (From CodeProject, MFC)

사용자 삽입 이미지
This control easily gives your application the Flat Look that is seen in the Microsoft office products. To use the control, simply add the files CCJFlatComboBox.cpp and CCJFlatComboBox.h to your project. You can use Class Wizard to add the CCJFlatComboBox member variables ( you most likely will have to rebuild the .clw file associated with your project ), or just replace any instance of CComboBox , with CCJFlatComboBox .

Example

Below is and example of how you might add the control to your project.

Header file:

//{{AFX_DATA(CFlatComboDemoDlg)  
enum { IDD = IDD_FLATCOMBODEMO_DIALOG };  
CCJFlatComboBox m_DDCombo;  
//}}AFX_DATA  

Implementation file:

//{{AFX_DATA_MAP(CFlatComboDemoDlg)  
DDX_Control(pDX, IDC_DROPDOWN_COMBO, m_DDCombo);  
//}}AFX_DATA_MAP  

Acknowledgements:

  • Chris Maunder - For letting me use his color picker class, and for his auto-completion code. I made some modifications to the appearance of the control that is used in this demo. My modifications are noted.
  • Gilberto Botaro - For his help with adding auto completion to the CCJFlatComboBox class.
  • Vachik Hovhannissian and Danilo Lax - For help with fixing focus and message handling bugs.
  • Yosh Yamashita - For help with fixing accelerator bug.
  • Shannon McCoy - For suggestions on using ::GetSysColor(...) and ::GetSystemMetrics(...) more efficiently.
  • Todd Brannam - For help with fixing offset bug to use GetSystemMetrics().

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

About the Author

Kirk Stowell



Occupation: Web Developer
Location: United States United States
크리에이티브 커먼즈 라이선스
Creative Commons License
Trackback 0 Comment 0