ATMLCommonLibrary.controls.awb.AWBTabControl.FindUpDown C# (CSharp) Method

FindUpDown() private method

private FindUpDown ( ) : void
return void
        private void FindUpDown()
        {
            bool bFound = false;

            // find the UpDown control
            IntPtr pWnd = Win32.GetWindow( Handle, Win32.GW_CHILD );

            while (pWnd != IntPtr.Zero)
            {
                //----------------------------
                // Get the window class name
                var className = new char[33];

                int length = Win32.GetClassName( pWnd, className, 32 );

                var s = new string( className, 0, length );
                //----------------------------

                if (s == "msctls_updown32")
                {
                    bFound = true;

                    if (!_upDown)
                    {
                        //----------------------------
                        // Subclass it
                        _scUpDown = new SubClass( pWnd, true );
                        _scUpDown.SubClassedWndProc += scUpDown_SubClassedWndProc;
                        //----------------------------

                        _upDown = true;
                    }
                    break;
                }

                pWnd = Win32.GetWindow( pWnd, Win32.GW_HWNDNEXT );
            }

            if (( !bFound ) && ( _upDown ))
                _upDown = false;
        }