Click here to Skip to main content
16,005,236 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: How can I convert a float to a 4 byte char array? Pin
Michael Dunn1-Sep-02 7:00
sitebuilderMichael Dunn1-Sep-02 7:00 
AnswerRe: How can I convert a float to a 4 byte char array? Pin
Stephane Rodriguez.1-Sep-02 7:19
Stephane Rodriguez.1-Sep-02 7:19 
Generalpointer to matrix Pin
BlackSmith1-Sep-02 6:35
BlackSmith1-Sep-02 6:35 
GeneralRe: pointer to matrix Pin
Michael Dunn1-Sep-02 6:43
sitebuilderMichael Dunn1-Sep-02 6:43 
QuestionShould I use the IDE to add functions/variable to my classes or do it manually? Pin
Raskolnikov1-Sep-02 5:16
Raskolnikov1-Sep-02 5:16 
AnswerRe: Should I use the IDE to add functions/variable to my classes or do it manually? Pin
Maximilien1-Sep-02 5:55
Maximilien1-Sep-02 5:55 
Generallength of slider on toolbar Pin
ns1-Sep-02 5:09
ns1-Sep-02 5:09 
GeneralTrying to make two sliders on toolbar Pin
ns1-Sep-02 6:53
ns1-Sep-02 6:53 
And getting only one. Also cant sem to set length no matter what I do..
int CSlider1::OnCreate(LPCREATESTRUCT lpCreateStruct) 
{
	if (CToolBar::OnCreate(lpCreateStruct) == -1)
		return -1;
	
	// TODO: Add your specialized creation code here

	    if (!LoadToolBar (IDR_TOOLBAR1))
        return -1;
	// DC to select font into
	CClientDC dc(this);
	
	
	// CFont object used to set the desired control fonts


	// TEXTMETRIC is Useful to measure and place the controls
	// in the desired positions

	TEXTMETRIC tm;
	dc.GetTextMetrics(&tm);
	int cxChar = tm.tmAveCharWidth;
	int cyChar = tm.tmHeight + tm.tmExternalLeading;



    CRect rect;

	//################# Red set of spinners #################

	// Edit Red //

	SetButtonInfo (0, ID_SLIDER, TBBS_SEPARATOR, cxChar * 12);

//		SetButtonInfo (0, ID_SLIDER, TBBS_SEPARATOR, 2500);
	GetItemRect (0, &rect);
        rect.bottom = rect.top + (cyChar + 2);
//	rect.left=0;
//	rect.right = 2000;
	
	if (!m_Slider1.Create(WS_CHILD | WS_VISIBLE | WS_TABSTOP |// dwStyle
						TBS_HORZ | TBS_AUTOTICKS |
						//TBS_NOTICKS |
						TBS_BOTTOM,
						rect,					// rect
						this,		// CWnd* pParentWnd
						ID_SLIDER))		// UINT  nID
	
	return -1;


		SetButtonInfo (1, ID_SLIDER2, TBBS_SEPARATOR, cxChar * 12);

//		SetButtonInfo (0, ID_SLIDER, TBBS_SEPARATOR, 2500);
	       GetItemRect (1, &rect);
               rect.bottom = rect.top + (cyChar + 2);



		if (!m_Slider2.Create(WS_CHILD | WS_VISIBLE | WS_TABSTOP |// dwStyle
						TBS_HORZ | TBS_AUTOTICKS |
						//TBS_NOTICKS |
						TBS_BOTTOM,
						rect,					// rect
						this,		// CWnd* pParentWnd
						ID_SLIDER2))		// UINT  nID
	
	return -1;

	
	return 0;
}



and in mainframe:

BOOL CMainFrame::CreateSlider1()
{

	//##########################################//
	// Creation

	if (!m_wndSlider.CreateEx(this, TBSTYLE_FLAT , WS_CHILD | WS_VISIBLE | CBRS_BOTTOM
	| CBRS_GRIPPER | CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_FIXED))

		return FALSE;

	m_wndSlider.LoadToolBar (IDR_TOOLBAR1);
	m_wndSlider.SetWindowText(_T("RGB Spinners: From 0 to 255  _&_ Slider 0 to 255"));
	m_wndSlider.EnableDocking (CBRS_ALIGN_TOP | CBRS_ALIGN_BOTTOM);
	DockControlBar(&m_wndSlider);
	
    return TRUE;

}

GeneralA question about #define WIN32 and "sbrk" Pin
George Ma1-Sep-02 1:11
George Ma1-Sep-02 1:11 
GeneralRe: A question about #define WIN32 and "sbrk" Pin
Stephane Rodriguez.1-Sep-02 2:12
Stephane Rodriguez.1-Sep-02 2:12 
GeneralRe: A question about #define WIN32 and "sbrk" Pin
George Ma1-Sep-02 4:03
George Ma1-Sep-02 4:03 
GeneralRe: A question about #define WIN32 and "sbrk" Pin
Stephane Rodriguez.1-Sep-02 4:19
Stephane Rodriguez.1-Sep-02 4:19 
GeneralRe: A question about #define WIN32 and "sbrk" Pin
George Ma2-Sep-02 3:31
George Ma2-Sep-02 3:31 
GeneralWho can help me on "How to install a device driver in a program" Pin
wabc1-Sep-02 0:24
wabc1-Sep-02 0:24 
GeneralA question about "size_t" Pin
George Ma31-Aug-02 21:05
George Ma31-Aug-02 21:05 
GeneralRe: A question about "size_t" Pin
Lasse31-Aug-02 22:51
Lasse31-Aug-02 22:51 
GeneralRe: A question about "size_t" Pin
George Ma31-Aug-02 23:57
George Ma31-Aug-02 23:57 
GeneralRe: A question about "size_t" Pin
markkuk1-Sep-02 0:03
markkuk1-Sep-02 0:03 
GeneralRe: A question about "size_t" Pin
Lasse1-Sep-02 8:12
Lasse1-Sep-02 8:12 
GeneralRe: A question about "size_t" Pin
Michael Dunn1-Sep-02 9:01
sitebuilderMichael Dunn1-Sep-02 9:01 
GeneralRe: A question about "size_t" Pin
BlackSmith1-Sep-02 11:12
BlackSmith1-Sep-02 11:12 
GeneralRe: A question about "size_t" Pin
George Ma2-Sep-02 3:37
George Ma2-Sep-02 3:37 
GeneralSOAPCLIENT_SEND_ERROR and ERROR_IO_PENDING Pin
Eugene Plokhov31-Aug-02 19:56
Eugene Plokhov31-Aug-02 19:56 
GeneralPretranslatemeassage Pin
Mazdak31-Aug-02 19:03
Mazdak31-Aug-02 19:03 
GeneralRe: Pretranslatemeassage Pin
Chris Losinger31-Aug-02 19:14
professionalChris Losinger31-Aug-02 19:14 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.