Home > Software engineering >  I want to get a number of numerical handle, but I can't get up?
I want to get a number of numerical handle, but I can't get up?

Time:11-02


I want to get a number of numerical handle, but I can't get up?
HPrinter=FindWindow (NULL, L "print");
If (hPrinter)
{
HWND hwndChild=: : GetWindow (hPrinter GW_CHILD);//list all control
While (hwndChild)
{
GetWindowText (hwndChild, TempTitle, 20 * 2);
MessageBox (NULL, TempTitle, TempTitle, MB_OK);
HwndChild=: : GetWindow (hwndChild GW_HWNDNEXT);
}
I use the above code handle to traverse the entire window, but always get the print & amp; Cancel & amp; Application handle to control, also can't handle to traverse to the copies, I see ID 0 through SPY++ x481, but I still can't get through the following code number of the handle, can't get to the actual number of print,
HWND hCount=GetDlgItem (x481 hPrinter, 0);
If (hCount)
MessageBox (NULL, "Get hChild OK", L L Get hChild "OK", MB_OK);
My ultimate goal is the actual number of want to print, please give directions, thank you

CodePudding user response:

HWND hCount=GetDlgItem (x481 hPrinter, 0);
Char name [40].
What is the control check? The GetClassName (hCount, name, 40);
  • Related