Ну у меня что-то похожее получилось
X++:
int getRightPointer()
{
Binary data = new Binary(32);
DLL _winApiDLL = new DLL('user32');
DLLFunction fun = new DLLFunction(_winApiDLL, 'GetWindowRect');
;
fun.returns(ExtTypes::DWord);
fun.arg(ExtTypes::DWord, ExtTypes::Pointer);
fun.call(infolog.hWnd(), data);
return data.dWord(8);
}
X++:
int getWidth()
{
Binary data = new Binary(32);
DLL _winApiDLL = new DLL('user32');
DLLFunction fun = new DLLFunction(_winApiDLL, 'GetWindowRect');
container con;
;
fun.returns(ExtTypes::DWord);
fun.arg(ExtTypes::DWord, ExtTypes::Pointer);
fun.call(this.hWnd(), data);
return data.dWord(8) - data.dWord(0);
}
X++:
public void run()
{
super();
this.design().left(this.getRightPointer() - this.getWidth()-4);
}
Всё равно. Как-то грустно это

.