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
[22516] [질문][리소스 에러]Resource Bitmap1 not found
kkt49 [] 1572 읽음    2002-11-08 17:32
아래와 같이 했는데 6.x버젼에서 에러 뜨네요
Resource Bitmap1 not found


FAQ2613C.txt   Adding bitmaps in a builder project w/o using a TImage
Category   :IDE
Platform    :All
Product    :C++Builder  3.x

Question:
I want to add a bitmap in my project as a resource instead of as
a design time TImage component.

Answer:
Open the Image editor

Create a new Resource file (.res)

Create a new bitmap named Bitmap1 (default) in that .res file
Save the .res file to your project folder with a name that
is not the same as the project's default .res file.

In CBuilder's main menu Click:

Project | Add To Project
Find your .res file an choose OK.

In the .h file declare a Graphics::TBitmap pointer:

private:
   Graphics::TBitmap* MyBitmap;

in the .cpp file create a TBitmap Object

void __fastcall TForm1::FormCreate(TObject *Sender)
{
    MyBitmap = new Graphics::TBitmap();
    MyBitmap->LoadFromResourceName((int)HInstance, "Bitmap1");
}

7/2/98 10:32:32 AM

+ -

관련 글 리스트
22516 [질문][리소스 에러]Resource Bitmap1 not found kkt49 1572 2002/11/08
22524     Re:[질문][리소스 에러]자문자답 kkt49 1462 2002/11/09
Google
Copyright © 1999-2015, borlandforum.com. All right reserved.