rezdm
April 7th, 2000, 09:56 AM
ATL 3.0, ATL Dialog, Spin button common control (NOT ActiveX)
1. Create any atl project
2. Insert new ATL object, dialog
3. In dialog editor put a spin button control on a dialog window
Now, to check what position is returned during UDN_DELTAPOS, you can set a breakpoint in UDN_DELTAPOS notify handler, or just put an edit box, setting auto buddy property to true. There a 2 errors
1. It works in opposite way(you press down and value grows, you press up and value countdowns)
2. Now, i try to set initial position (using this code:
SendDlgItemMessage(IDC_SPIN_TERMINALNUMBER, TBM_SETRANGE,TRUE, MAKELONG(0, 10));
SendDlgItemMessage(IDC_SPIN_TERMINALNUMBER, TBM_SETPOS, (WPARAM)TRUE, (LPARAM)some_variable);
I tried to insert this code in WM_INITDIALOG... Heh, no result!
1. Create any atl project
2. Insert new ATL object, dialog
3. In dialog editor put a spin button control on a dialog window
Now, to check what position is returned during UDN_DELTAPOS, you can set a breakpoint in UDN_DELTAPOS notify handler, or just put an edit box, setting auto buddy property to true. There a 2 errors
1. It works in opposite way(you press down and value grows, you press up and value countdowns)
2. Now, i try to set initial position (using this code:
SendDlgItemMessage(IDC_SPIN_TERMINALNUMBER, TBM_SETRANGE,TRUE, MAKELONG(0, 10));
SendDlgItemMessage(IDC_SPIN_TERMINALNUMBER, TBM_SETPOS, (WPARAM)TRUE, (LPARAM)some_variable);
I tried to insert this code in WM_INITDIALOG... Heh, no result!