예제 #1
0
CCreateToySourcePanel::CCreateToySourcePanel()
	: glgui::CMovablePanel("Create Toy Source Tool")
{
	SetBackgroundColor(Color(0, 0, 0, 255));
	SetHeaderColor(Color(100, 100, 100, 255));
	SetBorder(glgui::CPanel::BT_SOME);

	m_pToyFileLabel = new glgui::CLabel("Toy File:", "sans-serif", 10);
	m_pToyFileLabel->SetAlign(glgui::CLabel::TA_TOPLEFT);
	AddControl(m_pToyFileLabel);
	m_pToyFileText = new glgui::CTextField();
	m_pToyFileText->SetContentsChangedListener(this, ToyChanged);
	AddControl(m_pToyFileText);

	m_pSourceFileLabel = new glgui::CLabel("Source File:", "sans-serif", 10);
	m_pSourceFileLabel->SetAlign(glgui::CLabel::TA_TOPLEFT);
	AddControl(m_pSourceFileLabel);
	m_pSourceFileText = new glgui::CTextField();
	m_pSourceFileText->SetContentsChangedListener(this, SourceChanged);
	AddControl(m_pSourceFileText);

	m_pWarnings = new glgui::CLabel("");
	m_pWarnings->SetAlign(glgui::CLabel::TA_TOPLEFT);
	AddControl(m_pWarnings);

	m_pCreate = new glgui::CButton("Create");
	m_pCreate->SetClickedListener(this, Create);
	AddControl(m_pCreate);
}
예제 #2
0
void CGameListCtrl::OnColumnClick(wxListEvent& event)
{
    if (event.GetColumn() != COLUMN_BANNER)
    {
        int current_column = event.GetColumn();
        if (sorted)
        {
            if (last_column == current_column)
            {
                last_sort = -last_sort;
            }
            else
            {
                SConfig::GetInstance().m_ListSort2 = last_sort;
                last_column = current_column;
                last_sort = current_column;
            }
            SConfig::GetInstance().m_ListSort = last_sort;
        }
        else
        {
            last_sort = current_column;
            last_column = current_column;
        }
        caller = this;
        SortItems(wxListCompare, last_sort);
    }

    SetBackgroundColor();

    event.Skip();
}
예제 #3
0
파일: Canvas.cpp 프로젝트: mobotics/XCSoar
void
Canvas::StretchMono(PixelScalar dest_x, PixelScalar dest_y,
                    UPixelScalar dest_width, UPixelScalar dest_height,
                    const Bitmap &src,
                    PixelScalar src_x, PixelScalar src_y,
                    UPixelScalar src_width, UPixelScalar src_height,
                    Color fg_color, Color bg_color)
{
  assert(IsDefined());
  assert(src.IsDefined());

#ifndef _WIN32_WCE
  if (bg_color == COLOR_BLACK && (src_width != dest_width ||
                                  src_height != dest_height)) {
    /* workaround for a WINE bug: stretching a mono bitmap ignores the
       text color; this kludge makes the text color white */
    SetTextColor(COLOR_BLACK);
    SetBackgroundColor(COLOR_WHITE);
    Stretch(dest_x, dest_y, dest_width, dest_height,
            src, src_x, src_y, src_width, src_height,
            MERGEPAINT);
    return;
  }
#endif

  /* on GDI, monochrome bitmaps are special: they are painted with the
     destination HDC's current colors */
  SetTextColor(fg_color);
  SetBackgroundTransparent();

  Stretch(dest_x, dest_y, dest_width, dest_height,
          src, src_x, src_y, src_width, src_height);
}
예제 #4
0
void UITouchButton::Initialize(DWORD dwId, LPCSTR szText, INT32 iFontSize, int iBackgroundColor, int iFocuedBackgroundColor)
{
    SetId(dwId);
    SetText(szText);
    SetFontSize(iFontSize);

    SetBackgroundColor(iBackgroundColor);
    SetFocusedBackgroundColor(iFocuedBackgroundColor);
}
예제 #5
0
void UITouchButton::Init()
{
    UIButton::Init();
    SetBackgroundColor(ColorManager::knWhite);
    SetFocusedBackgroundColor(ColorManager::knBlack);
    SetFontColor(ColorManager::knBlack);
    SetFocusedFontColor(ColorManager::knWhite);

}
예제 #6
0
 void OnWindowEvent(const SDL_Event &event) override
 {
     if (event.type == SDL_KEYDOWN)
     {
         switch (event.key.keysym.sym)
         {
         case SDLK_r:
             SetBackgroundColor({1, 0, 0, 1});
             break;
         case SDLK_g:
             SetBackgroundColor({0, 1, 0, 1});
             break;
         case SDLK_b:
             SetBackgroundColor({0, 0, 1, 1});
             break;
         }
     }
 }
예제 #7
0
void CGameListCtrl::InsertItemInReportView(long _Index)
{
    // When using wxListCtrl, there is no hope of per-column text colors.
    // But for reference, here are the old colors that were used: (BGR)
    // title: 0xFF0000
    // company: 0x007030
    int ImageIndex = -1;

    GameListItem& rISOFile = *m_ISOFiles[_Index];

    // Insert a first row with nothing in it, that will be used as the Index
    long ItemIndex = InsertItem(_Index, wxEmptyString);

    // Insert the platform's image in the first (visible) column
    SetItemColumnImage(_Index, COLUMN_PLATFORM, m_PlatformImageIndex[rISOFile.GetPlatform()]);

    if (rISOFile.GetBitmap().IsOk())
        ImageIndex = m_imageListSmall->Add(rISOFile.GetBitmap());

    // Set the game's banner in the second column
    SetItemColumnImage(_Index, COLUMN_BANNER, ImageIndex);

    int SelectedLanguage = SConfig::GetInstance().m_LocalCoreStartupParameter.SelectedLanguage;

    // Is this sane?
    if  (rISOFile.GetPlatform() == GameListItem::WII_WAD)
    {
        SelectedLanguage = SConfig::GetInstance().m_SYSCONF->GetData<u8>("IPL.LNG");
    }

    std::string const name = rISOFile.GetName(SelectedLanguage);
    SetItem(_Index, COLUMN_TITLE, StrToWxStr(name), -1);

    // We show the company string on GameCube only
    // On Wii we show the description instead as the company string is empty
    std::string const notes = (rISOFile.GetPlatform() == GameListItem::GAMECUBE_DISC) ?
                              rISOFile.GetCompany() : rISOFile.GetDescription(SelectedLanguage);
    SetItem(_Index, COLUMN_NOTES, StrToWxStr(notes), -1);

    // Emulation state
    SetItemColumnImage(_Index, COLUMN_EMULATION_STATE, m_EmuStateImageIndex[rISOFile.GetEmuState()]);

    // Country
    SetItemColumnImage(_Index, COLUMN_COUNTRY, m_FlagImageIndex[rISOFile.GetCountry()]);

    // File size
    SetItem(_Index, COLUMN_SIZE, NiceSizeFormat(rISOFile.GetFileSize()), -1);

    // Game ID
    SetItem(_Index, COLUMN_ID, rISOFile.GetUniqueID(), -1);

    // Background color
    SetBackgroundColor();

    // Item data
    SetItemData(_Index, ItemIndex);
}
예제 #8
0
BOOL CDlgZhiFu::OnInitDialog()
{
	CDialogEx::OnInitDialog();

	// TODO:  在此添加额外的初始化
	SetBackgroundColor(RGB(255,255,255),TRUE);
	return TRUE;  // return TRUE unless you set the focus to a control
	// 异常: OCX 属性页应返回 FALSE
}
예제 #9
0
파일: DialogLook.cpp 프로젝트: DRIZO/xcsoar
void
DialogLook::Initialise(const Font &caption_font,
                       const Font &_text_font,
                       const Font &_small_font,
                       const Font &button_font,
                       const Font &list_font,
                       const Font &list_font_bold)
{
  caption.text_color = COLOR_BLACK;
  caption.font = &caption_font;

#ifdef EYE_CANDY
  caption.background_bitmap.Load(IDB_DIALOGTITLE);
#endif

  caption.background_color = IsDithered() ? COLOR_BLACK : COLOR_XCSOAR_DARK;
  caption.inactive_background_color = COLOR_GRAY;

  if (IsDithered())
    SetBackgroundColor(COLOR_WHITE);
  else
    SetBackgroundColor(Color(0xe2, 0xdc, 0xbe));
  text_color = COLOR_BLACK;

  text_font = &_text_font;
  small_font = &_small_font;
  button.Initialise(button_font);

  focused.background_color = COLOR_XCSOAR_DARK;
  focused.text_color = COLOR_WHITE;
  focused.border_pen.Set(Layout::FastScale(1) + 2, COLOR_BLACK);

  list.background_color = COLOR_WHITE;
  list.text_color = COLOR_BLACK;
  list.selected.background_color = IsDithered()
    ? COLOR_VERY_LIGHT_GRAY : COLOR_XCSOAR_LIGHT;
  list.selected.text_color = COLOR_BLACK;
  list.focused.background_color = IsDithered() ? COLOR_BLACK : COLOR_XCSOAR;
  list.focused.text_color = COLOR_WHITE;
  list.pressed.background_color = COLOR_YELLOW;
  list.pressed.text_color = COLOR_BLACK;
  list.font = &list_font;
  list.font_bold = &list_font_bold;
}
예제 #10
0
BOOL CDlgMemoAdd::OnInitDialog()
{
	CDialogEx::OnInitDialog();

	// TODO:  在此添加额外的初始化
	//SetBackgroundColor(DialogSubBackgroundColor,TRUE);
	m_DateTime_ctlTime.SetFormat(_T("yyyy-MM-dd HH:mm"));

	SetBackgroundColor(DialogSubBackgroundColor,TRUE);
	m_Button_ctlSave.LoadStdImage(IDB_PNG_SAVE, _T("PNG"));
	m_Button_ctlCancel.LoadStdImage(IDB_PNG_CANCEL, _T("PNG"));

	m_Static_ctl1.SetBackgroundColor(DialogSubBackgroundColor,TRUE);
	//m_Static_ctl1.SetTextColor(StaticCaptionColor,TRUE);

	m_Static_ctl2.SetBackgroundColor(DialogSubBackgroundColor,TRUE);
	//m_Static_ctl2.SetTextColor(StaticCaptionColor,TRUE);

	m_Static_ctl3.SetBackgroundColor(DialogSubBackgroundColor,TRUE);
	//m_Static_ctl3.SetTextColor(StaticCaptionColor,TRUE);

	m_Static_ctl4.SetBackgroundColor(DialogSubBackgroundColor,TRUE);
	//m_Static_ctl4.SetTextColor(StaticCaptionColor,TRUE);*/

	/*m_Static_ctl5.SetBackgroundColor(DialogSubBackgroundColor,TRUE);
	m_Static_ctl5.SetTextColor(StaticCaptionColor,TRUE);*/


	try{
		CppSQLite3DB db;
		db.open(CBoBoDingApp::g_strDatabasePath);
		CString strSQL=_T("select distinct * from CategoryMemo order by ID asc;");
		CppSQLite3Query q = db.execQuery(strSQL);
		CString strCategoryName;
		while(!q.eof())
		{
			strCategoryName=(q.fieldValue(_T("CategoryName")));
			if (strCategoryName.Compare(_T("+"))!=0)
			{
				m_Combo_ctlCategory.AddString(strCategoryName);
			}
			
			q.nextRow();

		}
	}

	catch (CppSQLite3Exception& e)
	{

		//AfxMessageBox(e.errorMessage());
	}
	m_Combo_ctlCategory.SetCurSel(0);
	return TRUE;  // return TRUE unless you set the focus to a control
	// 异常: OCX 属性页应返回 FALSE
}
예제 #11
0
void CRichEditExtn::OnKillFocus(CWnd* pNewWnd)
{
  m_bIsFocused = FALSE;
  m_lastposition = LineIndex();
  GetSel(m_nStartChar, m_nEndChar);
  CRichEditCtrl::OnKillFocus(pNewWnd);

  SetBackgroundColor(FALSE, crefNoFocus);
  Invalidate(TRUE);
}
BOOL BiliLogin::OnInitDialog()
{
	CDialogEx::OnInitDialog();

	// TODO:  在此添加额外的初始化
	ModifyStyleEx(0, WS_EX_LAYERED /*| WS_EX_TRANSPARENT*/);
	SetLayeredWindowAttributes(0, 190, LWA_ALPHA);
	SetBackgroundColor(RGB(230, 250, 250));
	return TRUE;  // return TRUE unless you set the focus to a control
	// 异常:  OCX 属性页应返回 FALSE
}
예제 #13
0
TWindow::TWindow(ERect frame, const char *title, e_window_type type, euint32 flags, euint32 workspace)
	: EWindow(frame, title, type, flags, workspace)
{
	EView *view = new TView(frame.OffsetToCopy(E_ORIGIN), NULL, E_FOLLOW_ALL, E_WILL_DRAW | E_FRAME_EVENTS);
	AddChild(view);

	SetBackgroundColor(view->ViewColor());

#if TEST_STATUSBAR
	SetPulseRate(100000);
#endif
}
예제 #14
0
void CRichInfo::PreSubclassWindow()
{
  SetBackgroundColor(FALSE,GetSysColor(COLOR_3DFACE));

  // Set the control to word wrap the text
  SetTargetDevice(NULL,0);

  // Notify the parent window of the control's required size
  SetEventMask(ENM_REQUESTRESIZE);

  CRichEditCtrl::PreSubclassWindow();
}
예제 #15
0
void CGameListCtrl::InsertItemInReportView(long _Index)
{
	// When using wxListCtrl, there is no hope of per-column text colors.
	// But for reference, here are the old colors that were used: (BGR)
	// title: 0xFF0000
	// company: 0x007030
	int ImageIndex = -1;

	GameListItem& rISOFile = *m_ISOFiles[_Index];

	// Insert a first row with nothing in it, that will be used as the Index
	long ItemIndex = InsertItem(_Index, wxEmptyString);

	// Insert the platform's image in the first (visible) column
	SetItemColumnImage(_Index, COLUMN_PLATFORM, m_PlatformImageIndex[rISOFile.GetPlatform()]);

	if (rISOFile.GetBitmap().IsOk())
		ImageIndex = m_imageListSmall->Add(rISOFile.GetBitmap());

	// Set the game's banner in the second column
	SetItemColumnImage(_Index, COLUMN_BANNER, ImageIndex);

	wxString name = StrToWxStr(rISOFile.GetName());

	int disc_number = rISOFile.GetDiscNumber() + 1;
	if (disc_number > 1 && name.Lower().find(wxString::Format("disc %i", disc_number)) == std::string::npos
	                    && name.Lower().find(wxString::Format("disc%i", disc_number)) == std::string::npos)
	{
		name = wxString::Format(_("%s (Disc %i)"), name.c_str(), disc_number);
	}

	SetItem(_Index, COLUMN_TITLE, name, -1);
	SetItem(_Index, COLUMN_MAKER, StrToWxStr(rISOFile.GetCompany()), -1);

	// Emulation state
	SetItemColumnImage(_Index, COLUMN_EMULATION_STATE, m_EmuStateImageIndex[rISOFile.GetEmuState()]);

	// Country
	SetItemColumnImage(_Index, COLUMN_COUNTRY, m_FlagImageIndex[rISOFile.GetCountry()]);

	// File size
	SetItem(_Index, COLUMN_SIZE, NiceSizeFormat(rISOFile.GetFileSize()), -1);

	// Game ID
	SetItem(_Index, COLUMN_ID, rISOFile.GetUniqueID(), -1);

	// Background color
	SetBackgroundColor();

	// Item data
	SetItemData(_Index, ItemIndex);
}
예제 #16
0
파일: display.c 프로젝트: suborb/reelvdr
void Display::SetMode(Display::Mode NewMode) {
    // (re-)set display mode.
    
    if (display!=NULL && NewMode==mode) return;
    // No change, nothing to do

    // OSD origin, centered on VDR OSD
    int x0=Setup.OSDLeft+(Setup.OSDWidth-ttSetup.OSDwidth)/2;
    int y0=Setup.OSDTop +(Setup.OSDHeight-ttSetup.OSDheight)/2;
    
    switch (NewMode) {
    case Display::Full:
        // Need to re-initialize *display:
        Delete();
        // Try 3BPP display first:
        display=new cDisplay3BPP(x0,y0,ttSetup.OSDwidth,ttSetup.OSDheight);
        if (!display->Valid()) {
            // Failed, possibly out of memory 
            delete display;
            // Try 2BPP display
            display=new cDisplay2BPP(x0,y0,ttSetup.OSDwidth,ttSetup.OSDheight);
        }
        break;
    case Display::HalfUpper:
        // Shortcut to switch from HalfUpper to HalfLower:
        if (mode==Display::HalfLower) {
            // keep instance.
            ((cDisplay3BPPHalf*)display)->SetUpper(true);
            break;
        }
        // Need to re-initialize *display:
        Delete();
        display=new cDisplay3BPPHalf(x0,y0,ttSetup.OSDwidth,ttSetup.OSDheight,true);
        break;
    case Display::HalfLower:
        // Shortcut to switch from HalfUpper to HalfLower:
        if (mode==Display::HalfUpper) {
            // keep instance.
            ((cDisplay3BPPHalf*)display)->SetUpper(false);
            break;
        }
        // Need to re-initialize *display:
        Delete();
        display=new cDisplay3BPPHalf(x0,y0,ttSetup.OSDwidth,ttSetup.OSDheight,false);
        break;
    }           
    mode=NewMode;
    // If display is invalid, clean up immediately:
    if (!display->Valid()) Delete();
    // Pass through OSD black transparency
    SetBackgroundColor((tColor)ttSetup.configuredClrBackground);    
}
예제 #17
0
void CRichEditExtn::OnSetFocus(CWnd* pOldWnd)
{
  m_bIsFocused = TRUE;
  CRichEditCtrl::OnSetFocus(pOldWnd);
  if (m_lastposition >= 0) {
    int iLine = LineFromChar(m_lastposition);
    LineScroll(iLine);
    SetSel(m_nStartChar, m_nEndChar); 
  }

  SetBackgroundColor(FALSE, m_crefInFocus);
  Invalidate(TRUE);
}
예제 #18
0
BOOL CDlgExpressage::OnInitDialog()
{
	CDialogEx::OnInitDialog();
	SetBackgroundColor(RGB(255,255,255),TRUE);
	// TODO:  在此添加额外的初始化
	//m_Explorer_ctlExpressage.MoveWindow(0,0,532,314);
	//m_Explorer_ctlExpressage.Navigate(_T("http://www.kuaidi100.com/frame/app/index2.html"),NULL,NULL,NULL,NULL);
	m_Explorer_ctlExpressage.Navigate(_T("http://www.boboding.com/bobodingsoft/Expressage.html"),NULL,NULL,NULL,NULL);

	//m_Explorer_ctlExpressage
	return TRUE;  // return TRUE unless you set the focus to a control
	// 异常: OCX 属性页应返回 FALSE
}
예제 #19
0
CUISimpleBG::CUISimpleBG( unsigned int _uId,
                          float _fPosX, float _fPosY,
                          float _fWidth, float _fHeight )
: IUInterface( _uId, _fPosX, _fPosY, _fWidth, _fHeight ),
  m_bMoving( false )
{
    // Text Color
    SetForegroundColor( 1.0f, 1.0f, 1.0f, 1.0f );
    // Background
    SetBackgroundColor( 0.2f, 0.7f, 0.2f, 0.4f );
    // Border
    SetBorderColor( 1.0f, 1.0f, 1.0f, 1.0f );
}
예제 #20
0
void ConfigureCommonScreen( void ) {
    //GetDefaultState( &screenSize_x, &screenSize_y, &screenColorDepthBit );
    screenSize_x = 1024;
    screenSize_y = 768;
    screenColorDepthBit = 32;

    captionLocation_x = screenSize_x / 2;
    captionLocation_y = screenSize_y / 15;

    SetGraphMode( screenSize_x, screenSize_y, screenColorDepthBit );

    ChangeWindowMode( TRUE );
    SetBackgroundColor( 0, 0, 0 );
}
예제 #21
0
BOOL CSettingStyleDlg::OnInitDialog()
{
	CDialogEx::OnInitDialog();
	UpdateData(true);
	// TODO:  Add extra initialization here
	// For flat design, set background to white
	SetBackgroundColor(RGB(255, 255, 255));
	m_uiStyle = 0;
	m_uiColor = 0;

	UpdateData(false);
	return TRUE;  // return TRUE unless you set the focus to a control
	// EXCEPTION: OCX Property Pages should return FALSE
}
예제 #22
0
avtRayCompositer::avtRayCompositer(avtRayFunction *rf)
{
    rayfoo    = rf;
    unsigned char b[3];
    b[0] = b[1] = b[2] = 255;
    SetBackgroundColor(b);
    backgroundMode = BACKGROUND_SOLID;
    gradBG1[0] = 0.;
    gradBG1[1] = 0.;
    gradBG1[2] = 1.;
    gradBG2[0] = 0.;
    gradBG2[1] = 0.;
    gradBG2[2] = 0.;
    opaqueImage = NULL;
}
예제 #23
0
tcOOBView::tcOOBView(wxWindow *parent, 
                     const wxPoint& pos, const wxSize& size, 
                     const wxString& name,
					 tc3DWindow2* graphicsHost) :
	tcXmlWindow(parent, pos, size, "xml/oobview.xml", name, graphicsHost),
	mpMapView(0),
	mnSelectedKey(NULL_INDEX),
	mbMouseDrag(false),
	mfRowSpacing(12.0f),
	mfYOffset(40.0f),
	mfXOffset(5.0f),
	mfXIndent(15.0f),
    maxNameWidth(120.0f),
	displayMode(SHOW_OWN),
    yOffset(0)
{
    mpSimState = tcSimState::Get();

    SetBorderDraw(true);

    if (tcOptions::Get()->renderSurfaceLevel > 1)
    {
        SetUseRenderSurface(true);
        SetRenderSurfaceUpdateInterval(3);
    }

    fontSize = 12;

    leaderIcon = tc3DWindow2::LoadTexture("star.png");
    showIcon = tc3DWindow2::LoadTexture("plus_yellow.png");
    hideIcon = tc3DWindow2::LoadTexture("minus_yellow.png");

    SetBackgroundColor(Vec4(0, 0, 0, 0.8f));
    SetBackgroundDraw(true);

    const int scrollBarWidth = 12;
	scrollBar = new tcScrollBar(this, wxPoint(mnWidth-scrollBarWidth-2, 2), wxSize(scrollBarWidth, mnHeight-5));
	scrollBar->SetBackgroundAlpha(0.7f);
    if (tcOptions::Get()->renderSurfaceLevel > 1)
    {
        scrollBar->SetUseRenderSurface(true);
        scrollBar->SetRenderSurfaceUpdateInterval(3);
    }       
    scrollBar->SetBarFraction(1.5);
    scrollBar->SetActive(true);

    BuildCategoryInfo();
}
예제 #24
0
파일: LogViewRE.cpp 프로젝트: bver/ancho
LRESULT CLogView::OnCreate(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/)
{
  DefWindowProc();

  SetReadOnly();
  SetFont(AtlGetDefaultGuiFont());
  SetBackgroundColor(LOG_BGCOLOR);

  CHARFORMAT cf = {0};
  cf.cbSize = sizeof(CHARFORMAT);
  cf.crTextColor = LOG_DEFAULTCOLOR;
  cf.yHeight = 200;
  cf.dwMask = CFM_COLOR | CFM_SIZE;
  SetDefaultCharFormat(cf);
  return 0;
}
예제 #25
0
BOOL CDlgProjectNew::OnInitDialog()
{
	CDialogEx::OnInitDialog();

	// TODO:  在此添加额外的初始化
	//SetBackgroundColor(DialogBackgroundColor,TRUE);
	SetBackgroundColor(DialogSubBackgroundColor,TRUE);
	m_Button_ctlSave.LoadStdImage(IDB_PNG_SAVE, _T("PNG"));
	m_Button_ctlCancel.LoadStdImage(IDB_PNG_CANCEL, _T("PNG"));

	m_Combo_ctlProjectClass.AddString(_T("收入"));
	m_Combo_ctlProjectClass.AddString(_T("支出"));
	m_Combo_ctlProjectClass.SetCurSel(0);
	return TRUE;  // return TRUE unless you set the focus to a control
	// 异常: OCX 属性页应返回 FALSE
}
예제 #26
0
BOOL CDlgKeyboard::OnInitDialog()
{
	CDialogEx::OnInitDialog();
	SetBackgroundColor(DialogSubBackgroundColor,TRUE);
	// TODO:  在此添加额外的初始化
	m_Static_ctlKeyboard.SetBackWnd(this);	
	m_Static_ctlKeyboard.SetColourForeGround(RGB(12,123,0));
	m_Static_ctlKeyboard.SetColourFaded(RGB(255,255,255));
	m_Static_ctlKeyboard.SetDrawFaded(TRUE);
	m_Static_ctlKeyboard.SetDrawTransparent(true);
	m_Static_ctlKeyboard.SetSymbolParams(0, 3, 0, 2);
	

	m_Static_ctlLeft.SetBackWnd(this);	
	m_Static_ctlLeft.SetColourForeGround(RGB(12,123,0));
	m_Static_ctlLeft.SetColourFaded(RGB(255,255,255));
	m_Static_ctlLeft.SetDrawFaded(TRUE);
	m_Static_ctlLeft.SetDrawTransparent(true);
	m_Static_ctlLeft.SetSymbolParams(0, 3, 0, 2);

	m_Static_ctlRight.SetBackWnd(this);	
	m_Static_ctlRight.SetColourForeGround(RGB(12,123,0));
	m_Static_ctlRight.SetColourFaded(RGB(255,255,255));
	m_Static_ctlRight.SetDrawFaded(TRUE);
	m_Static_ctlRight.SetDrawTransparent(true);
	m_Static_ctlRight.SetSymbolParams(0, 3, 0, 2);

	m_Static_ctlKeyboard.Append(_T("0"));
	m_Static_ctlLeft.Append(_T("0"));
	m_Static_ctlRight.Append(_T("0"));


	hMod=::LoadLibrary(_T("BobodingHook.dll"));
	if(hMod!=NULL)
	{
		pGetKeyBoardCount=(GETKEYBOARDCOUNTPROC)::GetProcAddress(hMod,"GetKeyBoardCount");
		pGetLButtonCount=(GETLBUTTONCOUNTPROC)::GetProcAddress(hMod,"GetLButtonCount");
		pGetRButtonCount=(GETRBUTTONCOUNTPROC)::GetProcAddress(hMod,"GetRButtonCount");
		pStartHook=(STARTHOOKPROC)::GetProcAddress(hMod,"StartHook");
		pStopHook=(STOPHOOKPROC)::GetProcAddress(hMod,"StopHook");
		pResetMouseCount=(RESETMOUSECOUNTPROC)::GetProcAddress(hMod,"ResetMouseCount");
		pResetKeyBoardCount=(RESETKEYBOARDCOUNTPROC)::GetProcAddress(hMod,"ResetKeyBoardCount");
	}
	OnStartHook();
	return TRUE;  // return TRUE unless you set the focus to a control
	// 异常: OCX 属性页应返回 FALSE
}
예제 #27
0
//控件绑定
VOID CRichEditMessage::PreSubclassWindow()
{
	__super::PreSubclassWindow();

	//设置滚动
	m_SkinScrollBar.InitScroolBar(this);

	//设置颜色
	SetBackgroundColor(FALSE,RGB(255,255,255));

	//设置控件
	SetEventMask(ENM_LINK);
	SetAutoURLDetect(FALSE);
	SetOptions(ECOOP_OR,ECO_AUTOWORDSELECTION);

	return;
}
예제 #28
0
std::shared_ptr<touchmind::model::node::NodeModel>
touchmind::model::node::NodeModel::Create(touchmind::selection::SelectionManager *pSelectionManager) {
  ASSERT(pSelectionManager != nullptr);
  auto node = std::make_shared<NodeModel>();
  node->SetSelectionManager(pSelectionManager);

  auto defaultProp = pSelectionManager->GetDefaultPropertyModel();
  node->SetBackgroundColor(defaultProp->UpdateProperty_GetNodeBackgroundColor());
  node->SetNodeShape(defaultProp->UpdateProperty_GetNodeShape());

  auto path = node->GetPathModel();
  path->SetSelectionManager(pSelectionManager);
  path->SetColor(defaultProp->UpdateProperty_GetLineColor());
  path->SetWidth(defaultProp->UpdateProperty_GetLineWidth());
  path->SetStyle(defaultProp->UpdateProperty_GetLineStyle());
  return node;
}
예제 #29
0
void
DialogLook::Initialise()
{
  caption.background_color = Color(0, 77, 124);
  caption.text_color = COLOR_BLACK;

  SetBackgroundColor(Color(0xe2, 0xdc, 0xbe));
  text_color = COLOR_BLACK;

  focused.text_color = COLOR_BLACK;
  focused.border_pen.set(Layout::FastScale(1) + 2, COLOR_BLACK);

  list.background_color = COLOR_WHITE;
  list.text_color = COLOR_BLACK;
  list.selected.background_color = COLOR_LIGHT_GRAY;
  list.selected.text_color = COLOR_BLACK;
}
예제 #30
0
BOOL CPhotoFrameDlg::OnInitDialog()
{
	CDialogEx::OnInitDialog();
	SetBackgroundColor(RGB(255, 255, 255));
		
	for (int index = 0; index < (int)PHOTO_EFFECT_NUM; index++)
	{
		EffectFactoryBox.AddString(STRING_PHOTO_EFFECT[index]);
	}

	for (int index = 0; index < (int)PHOTO_SPECIAL_EFFECT_NUM; index++)
	{
		SpecialEffectFactoryBox.AddString(STRING_PHOTO_SPECIAL_EFFECT[index]);
	}


	return TRUE;
}