|
void __fastcall TMainForm::WndProc(TMessage &tmMessage)
{
//함수는 메시지 루프내에서 키보드 메시지를 문자 메시지로 변환하기 위한 목적으로만 사용
HWND wnd = ::GetForegroundWindow();
if(IsWindow(wnd))
{
if(wnd != this->Handle)
{
ShowMessage("aaa");
//if(gFocus != wnd)
// {
if(IsWindow(gFocus))
{
AttachThreadInput(
GetWindowThreadProcessId(this->Handle,NULL),
GetWindowThreadProcessId(gFocus,NULL),
FALSE);
}
gFocus = wnd;
AttachThreadInput(
GetWindowThreadProcessId(this->Handle,NULL),
GetWindowThreadProcessId(gFocus,NULL),
TRUE);
// }
}
}
}
키보드를 만드는 중에 이부분에서 win32 api function failed 에러가 납니다.
어디가 잘못되어 나는지 알려주세요....... ㅠ.ㅠ
|