|
허접하지만 ...쩝
////////////////////////////////////////////////////////////////////////////////////////////////
// mouse 관련 api
void cmyapi::apiMouseHold(HWND phwnd)
{
RECT rect ;
GetWindowRect(phwnd , &rect) ;// API puts window coords into RECT
ClipCursor(&rect) ;// Confine the cursor
}
void cmyapi::apiMouseRelease()
{
HWND hWnd ;
RECT rect ;
hWnd = GetDesktopWindow() ; // API gets desktop's handle
GetWindowRect(hWnd, &rect) ;// API puts window coords into RECT
ClipCursor(&rect) ; // "Confine" the cursor to the entire screen.
}
void cmyapi::apiMouseHide()
{
ShowCursor(FALSE) ;
}
void cmyapi::apiMouseShow()
{
ShowCursor(TRUE) ;
}
// 시작버튼 제어
void cmyapi::apiStartButtonHide(BOOL bstatus)
{
if( bstatus ) // 사라짐
ShowWindow(GetWindow(FindWindow("Shell_traywnd", 0), 5), 0);
else // 보인다.
ShowWindow(GetWindow(FindWindow("Shell_traywnd", 0), 5), 9);
}
void cmyapi::apiStartButtonDisable(BOOL bstatus)
{
if( bstatus ) // 사용불가
EnableWindow(FindWindowEx(FindWindow("Shell_TrayWnd",0), 0, "Button", 0), FALSE);
else // 사용가능
EnableWindow(FindWindowEx(FindWindow("Shell_TrayWnd", 0), 0, "Button", 0), TRUE);
}
윤필 님이 쓰신 글 :
: 안녕하세요. 여러분.
: 프로그램 실행시 마우스 커서 숨기는 방법 좀 알려주세요..
: 그리고 혹시 특정 프로그램 실행시 시작 버튼을 동작 못하도록 하는 방법은 없나요?
: 수고하세요..
|