Показать сообщение отдельно
Старый 04.02.2011, 17:13   #7  
ist is offline
ist
Участник
 
60 / 10 (1) +
Регистрация: 29.07.2007
Цитата:
Сообщение от S.Kuskov Посмотреть сообщение
You can use WinAPI:
X++:
#WinAPI
#KeyPressed
void clicked()
{
    super();
 
    ctrl_InputQuantity.setFocus();
    ctrl_InputQuantity.setSelection(-1,0);
    WinAPI::postMessage(ctrl_InputQuantity.hWnd(), #WM_KEYDOWN, #Key7, 0);
}


Thanks a lot, it works perfect. The bad news is thah in the #KeyPressed I didn't found comma macro. I have noticed that some macroses coincides with ASCII code of the characters. I try with ASCII code 44 that is ASCII code of the comma character, but without success.

X++:
WinAPI::postMessage(ctrlQty.hWnd(), #WM_KEYDOWN, #Comma, 0);

Последний раз редактировалось ist; 04.02.2011 в 18:50.