Click here to Skip to main content
15,891,976 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: VS 2010 MFC derived CListbox with dynamically addedCtoolbar Pin
Jochen Arndt8-Feb-12 4:20
professionalJochen Arndt8-Feb-12 4:20 
GeneralRe: VS 2010 MFC derived CListbox with dynamically addedCtoolbar Pin
Fallen1238-Feb-12 4:44
Fallen1238-Feb-12 4:44 
GeneralRe: VS 2010 MFC derived CListbox with dynamically addedCtoolbar Pin
Eugen Podsypalnikov8-Feb-12 4:53
Eugen Podsypalnikov8-Feb-12 4:53 
GeneralRe: VS 2010 MFC derived CListbox with dynamically addedCtoolbar Pin
Fallen1239-Feb-12 10:19
Fallen1239-Feb-12 10:19 
GeneralRe: VS 2010 MFC derived CListbox with dynamically addedCtoolbar Pin
Eugen Podsypalnikov9-Feb-12 20:30
Eugen Podsypalnikov9-Feb-12 20:30 
GeneralRe: VS 2010 MFC derived CListbox with dynamically addedCtoolbar Pin
Fallen12310-Feb-12 5:35
Fallen12310-Feb-12 5:35 
AnswerRe: VS 2010 MFC derived CListbox with dynamically addedCtoolbar Pin
Richard MacCutchan5-Feb-12 23:17
mveRichard MacCutchan5-Feb-12 23:17 
GeneralRe: VS 2010 MFC derived CListbox with dynamically addedCtoolbar Pin
Fallen1235-Feb-12 23:38
Fallen1235-Feb-12 23:38 
Yes - I gathered that I could only add it to the dialog. Done that
But then I'd like to redirect Messages from the parent(Dialog) to the child that created it. Tried subclassing but kept getting assert errors in CWnd::Attach that the window isn't null

C++
	if(m_tools.GetSafeHwnd()!=NULL)m_tools.DestroyWindow();
		if(!m_tools.CreateEx(this->GetParent(),TBSTYLE_FLAT,WS_CHILD|WS_VISIBLE))
			MessageBox(_T("Failed to create toolbar\n"));
		if(-1==m_tools.LoadToolBar(IDR_TOOLBAR1))
			MessageBox(_T("Bitmap not loaded"));
	
		if(!m_tools.ShowWindow(SW_SHOW))
			MessageBox(_T("NoShow"));
		m_tools.ModifyStyle(NULL,CBRS_FLOATING | CBRS_TOOLTIPS | CBRS_FLYBY);
		if(!m_tools.IsWindowVisible())
			MessageBox(_T("Invisible"));
		//and move the toolbar to just above the top of the listbox on the parent CDialog
		this->GetWindowRect(&rec);
		rec.top-=100;rec.bottom=rec.top+16;rec.left-=100;rec.right-=100;
		m_tools.MoveWindow(&rec);
//		if(!SubclassDlgItem(m_tools.GetDlgCtrlID(),this->GetParent()))
//		MessageBox(_T("Failed to Link"));


modified 6-Feb-12 6:44am.

GeneralRe: VS 2010 MFC derived CListbox with dynamically addedCtoolbar Pin
Richard MacCutchan6-Feb-12 0:04
mveRichard MacCutchan6-Feb-12 0:04 
GeneralRe: VS 2010 MFC derived CListbox with dynamically addedCtoolbar Pin
Fallen1236-Feb-12 0:35
Fallen1236-Feb-12 0:35 
GeneralRe: VS 2010 MFC derived CListbox with dynamically addedCtoolbar Pin
Richard MacCutchan6-Feb-12 1:14
mveRichard MacCutchan6-Feb-12 1:14 
GeneralRe: VS 2010 MFC derived CListbox with dynamically addedCtoolbar Pin
Fallen1236-Feb-12 2:16
Fallen1236-Feb-12 2:16 
GeneralRe: VS 2010 MFC derived CListbox with dynamically addedCtoolbar Pin
Richard MacCutchan6-Feb-12 3:03
mveRichard MacCutchan6-Feb-12 3:03 
GeneralRe: VS 2010 MFC derived CListbox with dynamically addedCtoolbar Pin
Fallen1236-Feb-12 6:35
Fallen1236-Feb-12 6:35 
QuestionSegFault Pin
chidacode5-Feb-12 7:07
chidacode5-Feb-12 7:07 
AnswerRe: SegFault Pin
Albert Holguin5-Feb-12 8:45
professionalAlbert Holguin5-Feb-12 8:45 
AnswerRe: SegFault Pin
CPallini5-Feb-12 21:57
mveCPallini5-Feb-12 21:57 
GeneralRe: SegFault Pin
Albert Holguin6-Feb-12 10:14
professionalAlbert Holguin6-Feb-12 10:14 
AnswerRe: SegFault Pin
Stephen Hewitt6-Feb-12 4:07
Stephen Hewitt6-Feb-12 4:07 
QuestionTCP/IP problems Pin
ForNow4-Feb-12 16:27
ForNow4-Feb-12 16:27 
AnswerRe: TCP/IP problems Pin
Mohibur Rashid5-Feb-12 4:34
professionalMohibur Rashid5-Feb-12 4:34 
AnswerRe: TCP/IP problems Pin
Albert Holguin5-Feb-12 8:42
professionalAlbert Holguin5-Feb-12 8:42 
GeneralRe: TCP/IP problems Pin
ForNow5-Feb-12 12:14
ForNow5-Feb-12 12:14 
GeneralRe: TCP/IP problems Pin
Albert Holguin5-Feb-12 13:46
professionalAlbert Holguin5-Feb-12 13:46 
GeneralRe: TCP/IP problems Pin
ForNow5-Feb-12 16:05
ForNow5-Feb-12 16:05 

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.