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
[44379] Re:폼을 생성할때 에러가 납니다.
머슴.한석복 [han8783] 950 읽음    2006-04-04 19:20
코드들을 FormCreate Event 가 아닌 다른 이벤트 에 넣어 보세요.

dtacq 님이 쓰신 글 :
: 컴파일할때는 에러가 안나는데 실행하면 'Access violation at address~~~'라는 메세지가 나옵니다.
: 아래부분을 전부 주석처리하면 에러가 안나는데.. 어떤 부분이 잘못되었는지 도움 부탁드립니다.
:
:
: void __fastcall TfrmMtg::FormCreate(TObject *Sender)
: {
:     TSearchRec sr;
:     int i = 1;
:     int iAttributes = 0;
:     String sTempName;
:     iAttributes|=faReadOnly|faHidden|faSysFile|faVolumeID|faArchive|faAnyFile;
:    
: // make Button array for Montage kinds
:     buttons->Add(BtnMtg);
:     BtnMtg->Width = ScrollBox1->Width - GetSystemMetrics(SM_CXVSCROLL) -4;
:
: // find *.mon files and add them to montage list
:     sTempName = "C:\\Temp\\*.mon";
:     if (FindFirst(sTempName, iAttributes, sr) == 0) {
:         do {
:             i++;
:             sTempName = sr.Name;
:             sTempName.SetLength(sTempName.Length() -4);
:             if (sTempName == "32R")  {
:                 i--;
:                 continue;
:
:             }
:             AddButton(sTempName);               // 몽타지 버튼 추가
:             AddMontageList(sTempName, i);       //  리뷰 몽타지 설정에 몽타지 리스트 로드
:
:         } while (FindNext(sr) == 0);
:     }
: //add code
:     FindClose(sr);
:
: // make Label array of Electode  for Montage remake
:     electrodes->Add(LbElectrode);
:     static const String name_electrd[] = {"HEOG", "FP1", "FP2","F7",
:                                         "F3", "Fz", "F4", "F8","ftc1",
:                                         "ftc2", "T3", "C3", "Cz","C4",
:                                         "T4", "tt1", "tcp1","Cp1", "Cp2",
:                                         "tcp2", "tt2", "T5", "P3", "Pz",
:                                         "P4", "T6", "Po1", "Po2", "O1",
:                                         "Oz", "O2", "A1", "A2", ""};
:     static const POINT pt_electrd[] = {{524,33},{430,64},{503,64},{371,97},
:                           {419,105}, {467,105},{515,105},{563,97},{395,137},
:                           {539,137},{347,177},{411,177},{467,177},{523,177},
:                           {585,177},{342,218},{398,218},{443,218},{491,218},
:                           {539,218},{592,218},{355,258},{411,258},{467,258},
:                           {523,258},{579,258},{418,288},{515,288},{419,321},
:                           {467,321},{515,321},{299,185},{630,185},{0,0}};
:     for (int i = 0; name_electrd[i].Length() != 0; ++i) {
:         AddLabel(name_electrd[i], pt_electrd[i].x, pt_electrd[i].y);
:     }
:       fStatisticFileChange=false;
:     FileListBox1->Directory= StatisticsPathDirectory;
:     FileListBox2->Directory= StatisticsPathDirectory;
:     FileListBox3->Directory= StatisticsPathDirectory;
:     FileListBox4->Directory= StatisticsPathDirectory;
:     FileListBox5->Directory= StatisticsPathDirectory;
:     FileListBox6->Directory= StatisticsPathDirectory;
:     FileListBox1->FileName= StatisticsPathDirectory+StatisticEEGNMFileName;
:     FileListBox2->FileName= StatisticsPathDirectory+StatisticEEGSDFileName;
:     FileListBox3->FileName= StatisticsPathDirectory+StatisticVEPNMFileName;
:     FileListBox4->FileName= StatisticsPathDirectory+StatisticVEPSDFileName;
:     FileListBox5->FileName= StatisticsPathDirectory+StatisticAEPNMFileName;
:     FileListBox6->FileName= StatisticsPathDirectory+StatisticAEPSDFileName;
:
:
:     // 리뷰몽타지 설정 부분
:     // -- 기존몽타지 그리드 타이틀바 설정
:     GridMontage->Cells[0][0] = "번호";
:     GridMontage->Cells[1][0] = "몽타지 이름";
:     GridMontage->Cells[0][1] = "1";
:     GridMontage->Cells[1][1] = "32R";
:
:     // -- 리뷰몽타지 그리드 타이틀바 설정
:     GridReviewM->Cells[0][0] = "번호";
:     GridReviewM->Cells[1][0] = "몽타지 이름";
:     GridReviewM->Cells[0][1] = "1";
:     GridReviewM->Cells[1][1] = "32R";
:     LoadRMontageList(); // 리뷰 몽타지를 몽타지 환경파일에서 읽어 로드
:
:
: }

+ -

관련 글 리스트
44367 폼을 생성할때 에러가 납니다. dtacq 828 2006/04/04
44379     Re:폼을 생성할때 에러가 납니다. 머슴.한석복 950 2006/04/04
Google
Copyright © 1999-2015, borlandforum.com. All right reserved.