Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //tutorial #1 in series of Paltalk Programming tutorials
- implementation
- {$R *.dfm}
- procedure TForm1.iPickerMouseDown(Sender: TObject; Button: TMouseButton;
- Shift: TShiftState; X, Y: Integer);
- begin
- if Button = mbLeft then
- SetCursor(iPicker.Picture.Icon.Handle);
- end;
- procedure TForm1.iPickerMouseUp(Sender: TObject; Button: TMouseButton;
- Shift: TShiftState; X, Y: Integer);
- var
- hHwnd: HWND;
- ptCords: TPoint;
- clsStr: String;
- sTitle: String;
- begin
- GetCursorPos(ptCords);
- hHwnd:= WindowFromPoint(ptCords);
- lblHandle.Text:= Format('%x : %d', [hHwnd, hHwnd]); //IntToStr(hHwnd);
- //====================================================================
- SetLength(clsStr, 255);
- GetClassName(hHwnd, Pchar(clsStr), 255);
- lblClassName.Text:= Pchar(clsStr);
- //=====================================================================
- lblDlgCtrlId.Text:= IntToStr(GetDlgCtrlId(hHwnd));
- //=====================================================================
- SetLength(sTitle, 255);
- GetWindowText(hHwnd, Pchar(sTitle), 255);
- lblTitle.Text:= Pchar(sTitle);
- end;
- end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement