Пример #1
0
void CPropSlider::OnMouseMove(UINT nFlags, CPoint point)
{
	if (nFlags == 1)
	{
		SetFocus();
		OnUpdateValue();
	}
	CSliderCtrl::OnMouseMove(nFlags, point);
}
Пример #2
0
AutoPauseSettingsDialog::AutoPauseSettingsDialog(wxWindow* parent, u32 *entry)
	: wxDialog(parent, wxID_ANY, "Auto Pause Setting")
	, m_presult(entry)
{
	m_entry = *m_presult;
	//SetSizeHints(wxSize(400, -1), wxDefaultSize);
	SetMinSize(wxSize(400, -1));

	wxBoxSizer* s_main = new wxBoxSizer(wxVERTICAL);

	m_entry_convert.clear();
	m_entry_convert.str("");
	m_entry_convert << "Specify ID of System Call or Function Call below. You need to use a Hexadecimal ID.";

	wxStaticText* s_description = new wxStaticText(this, wxID_ANY, m_entry_convert.str(), wxDefaultPosition, wxDefaultSize, 0);
	s_description->Wrap(400);
	s_main->Add(s_description, 0, wxALL, 5);

	wxBoxSizer* s_config = new wxBoxSizer(wxHORIZONTAL);

	m_id = new wxTextCtrl(this, wxID_STATIC, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0);
	s_config->Add(m_id, 1, wxALL | wxEXPAND, 5);
	s_config->Add(new wxButton(this, wxID_OK, wxT("&OK"), wxDefaultPosition, wxDefaultSize, 0), 0, wxALL, 5);
	s_config->Add(new wxButton(this, wxID_CANCEL, wxT("&Cancel"), wxDefaultPosition, wxDefaultSize, 0), 0, wxALL, 5);

	s_main->Add(s_config, 0, wxEXPAND, 5);

	m_current_converted = new wxStaticText(this, wxID_ANY, wxT("Currently it gets an id of \"Unset\"."), wxDefaultPosition, wxDefaultSize, 0);
	s_main->Add(m_current_converted, 0, wxALL, 5);

	m_entry_convert.clear();
	m_entry_convert.str("");
	m_entry_convert << std::hex << std::setw(8) << std::setfill('0') << m_entry;
	m_id->SetValue(m_entry_convert.str());

	SetTitle("Auto Pause Setting: "+m_entry_convert.str());

	Bind(wxEVT_BUTTON, &AutoPauseSettingsDialog::OnOk, this, wxID_OK);
	Bind(wxEVT_TEXT, &AutoPauseSettingsDialog::OnUpdateValue, this, wxID_STATIC);

	SetSizerAndFit(s_main);
	//SetSize(wxSize(400, -1));
	Layout();
	Centre(wxBOTH);

	wxCommandEvent ce;
	OnUpdateValue(ce);
}
Пример #3
0
BOOL CPropSlider::OnMouseWheel(UINT nFlags, short zDelta, CPoint pt)
{
	OnUpdateValue();
	return CSliderCtrl::OnMouseWheel(nFlags, zDelta, pt);
}
Пример #4
0
void CPropSlider::OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags)
{
	OnUpdateValue();
	CSliderCtrl::OnKeyDown(nChar, nRepCnt, nFlags);
}
Пример #5
0
void CPropSlider::OnNMReleasedcapture(NMHDR *pNMHDR, LRESULT *pResult)
{
	OnUpdateValue();
	*pResult = 0;
}