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
[36418] 유닛을 추가하여 함수를 분리하려면?
곽성주 [] 769 읽음    2004-07-22 14:14
아래와 같이 OCX를 이용하여 스캐닝하는 함수를 구현하였습니다.
호출은 버튼 이벤트에서 하고요... 헤더에 함수선언 해주었고요.

그런데 이함수를 unit 을 하나 추가하여 함수를 분리하려고 합니다.
unit의 헤더와 구현을 어떻게 구성해야 할까요?  


#include <vcl.h>
#pragma hdrstop

#include "U_FuncTest.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma link "TWIZLib_OCX"
#pragma resource "*.dfm"
TForm1 *Form1;
//---------------------------------------------------------------------------
__fastcall TForm1::TForm1(TComponent* Owner)
  : TForm(Owner)
{
}
//---------------------------------------------------------------------------
// 함수
void __fastcall TForm1::wf_scanner(WideString scan_file)
{
  Twiz1->Units=TWIZ_INCHES;
  Twiz1->PixelType=1;
  Twiz1->AcquireToFile(scan_file);
}
// 호출
void __fastcall TForm1::Button1Click(TObject *Sender)
{

WideString file1;
file1="c:\\test.bmp";

wf_scanner(file1);
}

///////  헤더 ////////////////////////////////////
...
class TForm1 : public TForm
{
__published:   
  TTwiz *Twiz1;
  TButton *Button1;
  void __fastcall Button1Click(TObject *Sender);
private:   
public:         
  __fastcall TForm1(TComponent* Owner);
  void __fastcall wf_scanner(WideString scan_file);
};
...

+ -

관련 글 리스트
36418 유닛을 추가하여 함수를 분리하려면? 곽성주 769 2004/07/22
36423     Re:유닛을 추가하여 함수를 분리하려면? posix.duo 775 2004/07/22
36424         Re:Re:유닛을 추가하여 함수를 분리하려면? 곽성주 713 2004/07/22
36425             Re:Re:Re:유닛을 추가하여 함수를 분리하려면? posix.duo 743 2004/07/22
36427                 Re:Re:Re:Re:유닛을 추가하여 함수를 분리하려면? 곽성주 732 2004/07/22
36438                     Re:Re:Re:Re:Re:유닛을 추가하여 함수를 분리하려면? posix.duo 728 2004/07/22
Google
Copyright © 1999-2015, borlandforum.com. All right reserved.