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

델파이 Q&A
Delphi Programming Q&A
[8926] Re:[질문]마우스 모양변화 감지
류종택 [ryujt] 1089 읽음    2003-08-13 09:42
Direct-X에서 테스트는 안해봤지만..
아래 소스를 참고하셔서 시도해보세요..

------------------------------------------------------------------

Function  GetCursorInfo2:TCursorInfo;
Var
    hWindow: HWND;
    pt: TPoint;
    dwThreadID, dwCurrentThreadID: DWORD;
Begin
    Result.hCursor := 0;
    ZeroMemory(@Result, SizeOf(Result));
    // Find out which window owns the cursor
    if GetCursorPos(pt) then
    begin
        Result.ptScreenPos := pt;
        hWindow := WindowFromPoint(pt);
        if IsWindow(hWindow) then
        begin
            // Get the thread ID for the cursor owner.
            dwThreadID := GetWindowThreadProcessId(hWindow, nil);

            // Get the thread ID for the current thread
            dwCurrentThreadID := GetCurrentThreadId;

            // If the cursor owner is not us then we must attach to
            // the other thread in so that we can use GetCursor() to
            // return the correct hCursor
            if (dwCurrentThreadID <> dwThreadID) then
            begin
                if AttachThreadInput(dwCurrentThreadID, dwThreadID, True) then
                begin
                // Get the handle to the cursor
                Result.hCursor := GetCursor;
                AttachThreadInput(dwCurrentThreadID, dwThreadID, False);
                end;
            end
            else
            begin
                Result.hCursor := GetCursor;
            end;
        end;
    end;
End;

asfasfd 님이 쓰신 글 :
: 다이렉트x화면에서 마우스 모양감지하는 방법이 궁금합니다.
: 마우스를 움직였을 때, 특정 위치에서 마우스 모양이 변하는지 그렇지 않은지만 확인하면됩니다. 마우스 모양이 어떤지는 관심도 없구요.
:
: 4시간이 넘게 강좌면 질답란을 기웃거려봐도, 못찾겠네요. 답변부탁드릴께요.(__)

+ -

관련 글 리스트
8923 [질문]마우스 모양변화 감지 asfasfd 659 2003/08/12
8926     Re:[질문]마우스 모양변화 감지 류종택 1089 2003/08/13
Google
Copyright © 1999-2015, borlandforum.com. All right reserved.