|
임문환 님이 쓰신 글 :
: 프로잭트에 기본으로 생성되는 .res 파일을 이미지 에티터로 열어 커서 리소스를 추가한 후 님과같이 하니 아래와 같은 오류가 발생하면서 정말 안되더군요.
: "(null) 지정된 리소스 유형이 이미지 파일에 없습니다."
:
: 그래서 별도의 리소스 스크립트를 만들어 프로잭트에 추가한 다음 아래와 같이 하니 잘 되더군요.
:
: const int crMyCursor = 1;
:
: HCURSOR hcursor=LoadCursor(HInstance,MAKEINTRESOURCE(ID_MY_CURSOR));
: if(hcursor){
: Screen->Cursors[crMyCursor] = hcursor;
: Cursor = crMyCursor;
: }
정말 감사합니다....그렇게하니 되네요
근데....경고에러가 나네요??
W8018 Assigning int to TCursor
이런 경고가 나네요....
Screen->Cursor=2; 하고 Screen->Cursor=1; 여기서요.
무시해도 되는건가요?
감사합니다~~
void __fastcall TForm1::Image1MouseDown(TObject *Sender,
TMouseButton Button, TShiftState Shift, int X, int Y)
{
Screen->Cursors[2] = LoadCursor(HInstance,"MYCURSOR");
Screen->Cursor=2;
}
void __fastcall TForm1::Image1MouseUp(TObject *Sender, TMouseButton Button,
TShiftState Shift, int X, int Y)
{
Screen->Cursor=1;
}
|