use Win32::GuiTest qw( :ALL ); $hditem_ptr = AllocateVirtualBuffer($hwnd, 44); WriteToVirtualBuffer($hditem_ptr, $hditem); SendMessage($hwnd, HDM_SETITEM, $columnClicked, $hditem_ptr->{ptr}); FreeVirtualBuffer($hditem_ptr); ShowWindow($hwnd, 1); # refresh