CHTMLControlSection::CHTMLControlSection( CHTMLSection *pSectParent, GS::FontDef &fdef, const StringClass &strWindowClass, UINT uStyle, UINT uStyleEx, UINT uWidth, UINT uHeight ) : CHTMLSectionABC( pSectParent ) , m_fdef( fdef ) { SetKeep( true ); m_hwnd = CreateWindowEx( uStyleEx, strWindowClass, _T(""), uStyle, 0, 0, uWidth, uHeight, pSectParent->GetHwnd(), NULL, g_hQHTMInstance, NULL ); ASSERT( m_hwnd ); SubclassControl( m_hwnd, pSectParent, this ); }
CHTMLImageSection::CHTMLImageSection( CHTMLSection *pParent, CQHTMImageABC *pImage, int nBorder ) : CHTMLSectionABC( pParent ) , m_pImage( pImage ) , m_nBorder( nBorder ) , m_nTimerID( knNullTimerId ) , m_nFrame( 0 ) { SetParent( pParent ); SetKeep( true ); #ifdef QHTM_BUILD_INTERNAL_IMAGING ASSERT( m_pImage ); if( m_pImage->GetFrameCount() && m_pImage->GetFrameTime( 0 ) ) { m_nTimerID = RegisterTimerEvent( this, m_pImage->GetFrameTime( 0 ) ); } #endif // QHTM_BUILD_INTERNAL_IMAGING }
CHTMLComboSection::CHTMLComboSection( CHTMLSection *pSectParent, GS::FontDef &fdef, CHTMLSelect *pFormObject, class CHTMLSectionCreator *psc ) : CHTMLSectionABC( pSectParent ) , m_fdef( fdef ) , m_pFormObject( pFormObject ) , m_uComboHeight( 0 ) { SetKeep( true ); if( !psc->IsMeasuring() && !psc->GetDC().IsPrinting() ) { DWORD dwStyle = WS_BORDER | WS_VSCROLL | WS_CHILD | WS_VISIBLE | CBS_DROPDOWNLIST | CBS_DISABLENOSCROLL | CBS_NOINTEGRALHEIGHT; LPTSTR endptr; UINT uID = pFormObject->m_strID.GetLength() ? _tcstol( pFormObject->m_strID, &endptr, 10 ) : 0; m_hwnd = CreateWindowEx( WS_EX_STATICEDGE, _T("COMBOBOX"), NULL, dwStyle, 0, 0, 0, 0, pSectParent->GetHwnd(), (HMENU)uID, g_hQHTMInstance, NULL ); ASSERT( m_hwnd ); for( UINT u = 0; u < pFormObject->m_arrItems.GetSize(); u++ ) { CHTMLOption *pOption = pFormObject->m_arrItems[ u ]; LPCTSTR pcszText = (LPCTSTR)pOption->m_strText; if( pcszText ) { int nItem = SendMessage( m_hwnd, CB_ADDSTRING, 0, (LPARAM)pcszText ); if( pOption->m_bSelected ) { SendMessage( m_hwnd, CB_SETCURSEL, nItem, 0 ); } } } if( pFormObject->m_bDisabled ) { EnableWindow( m_hwnd, FALSE ); } SubclassControl( m_hwnd, pSectParent, this ); } }
void TaskAuto (void *pdata) { //static struct Pointfp64 position; //static fp64 angle; uint8 err; uint8 *msg; pdata=pdata; for(;;) { msg = OSMboxPend(AutoMbox,0,&err); switch (msg[0]) { case 1: LCD_Clear(); GPS_Clear(); RouteForm=RouteStop; PID_Clear(); GoRoute1(); case 2: PID_Clear(); GoRoute2(); break; case 3: PID_Clear(); GoRoute3(); case 4: PID_Clear(); GoRoute4(); case 5: PID_Clear(); GoRoute5(); case 6: rGPJDAT&=~0x1000; //¹Ø·äÃùÆ÷ LCD_Clear(); PID_Clear(); //GoRoute6(); Route_Num=6; SetKeep(PointRoute[Route[6]].position,0.0); while(RouteFinish) { if(((Fp64Abs(Aim_Angle-Gps_List[0].angle)<1)&& (Getlength(AimPoint,Gps_List[0].position)<10))||(Route_Num==7)) { RouteFinish=0; RouteForm=RouteStop; LCD_SetXY(0,2); LCD_WriteString("route6 done"); } OSTimeDly(1); } break; case 7: GPS_Init(PointRoute[Route[6]].position,0.0); LCD_Clear(); PID_Clear(); GoRoute7(); break; case 8: GPS_Init(PointRoute[Route[7]+1].position,Gps_List[0].angle); LCD_Clear(); PID_Clear(); GoRoute8(); Shootest(); break; default:; break; } OSTimeDly(1); } }