C++Builder Programming Forum
C++Builder  |  Delphi  |  FireMonkey  |  C/C++  |  Free Pascal  |  Firebird
볼랜드포럼 BorlandForum
 경고! 게시물 작성자의 사전 허락없는 메일주소 추출행위 절대 금지
C++빌더 포럼
Q & A
FAQ
팁&트릭
강좌/문서
자료실
컴포넌트/라이브러리
메신저 프로젝트
볼랜드포럼 홈
헤드라인 뉴스
IT 뉴스
공지사항
자유게시판
해피 브레이크
공동 프로젝트
구인/구직
회원 장터
건의사항
운영진 게시판
회원 메뉴
북마크
볼랜드포럼 광고 모집

C++빌더 Q&A
C++Builder Programming Q&A
[37397] int __stdcall
최진호 [] 1086 읽음    2004-09-24 02:57
int __stdcall에 관한 질문입니다..

아래는 책에  나와있는 예제 입니다..(윈도우 탐색기 처럼 서브디렉토리 파일명과 폴더를 표시해 주는 프로그램 입니다)
예제는 볼랜드 C++ builder 정복 4.0(정태영)
프로젝트 파일(Explorer.BPR) 파일의 일부 입니다.----> p568

여기서 궁금한것은..왜..int__stdcall 을 써야 하는지.. 다른 함수는 왜 쓸수 없는지



int __stdcall CustomSortProc(LPARAM Item1, LPARAM Item2, LPARAM ParamSort)
{
    int iResult;
    AnsiString FItem, SItem;

    switch(LOWORD(ParamSort)) {
        case 0 : iResult = lstrcmp(((TListItem *)Item1)->Caption.c_str(),
                                 ((TListItem *)Item2)->Caption.c_str());
                 break;
        case 1 : FItem = ((TListItem *)Item1)->SubItems->Strings[0];
                 SItem = ((TListItem *)Item2)->SubItems->Strings[0];
                 FItem = FItem.SubString(0, FItem.LastDelimiter(" ") - 1);
                 SItem = SItem.SubString(0, SItem.LastDelimiter(" ") - 1);
                 for (int i = 1; i < FItem.Length(); i++)
                    if (FItem[i] == ',') FItem.Delete(i, 1);
                 for (int i = 1; i < SItem.Length(); i++)
                    if (SItem[i] == ',') SItem.Delete(i, 1);

                 if (FItem.ToInt() > SItem.ToInt()) iResult = 1;
                 else iResult = -1;
                 break;
        case 2 : iResult = lstrcmp(((TListItem *)Item1)->SubItems->Strings[1].c_str(),
                                 ((TListItem *)Item2)->SubItems->Strings[1].c_str());
    }
    if (HIWORD(ParamSort)) return -iResult;
    return iResult;
}

이것은 책에 나와있는 예제 입니다..

+ -

관련 글 리스트
37397 int __stdcall 최진호 1086 2004/09/24
37402     Re:int __stdcall 김태선 1070 2004/09/24
Google
Copyright © 1999-2015, borlandforum.com. All right reserved.