Click here to Skip to main content
15,910,471 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Multiple monitor support for MFC application Pin
Anu_Bala7-Feb-12 23:23
Anu_Bala7-Feb-12 23:23 
QuestionVS 2010 MFC derived CListbox with dynamically addedCtoolbar Pin
Fallen1235-Feb-12 10:05
Fallen1235-Feb-12 10:05 
AnswerRe: VS 2010 MFC derived CListbox with dynamically addedCtoolbar Pin
Eugen Podsypalnikov5-Feb-12 20:32
Eugen Podsypalnikov5-Feb-12 20:32 
GeneralRe: VS 2010 MFC derived CListbox with dynamically addedCtoolbar Pin
Fallen1235-Feb-12 23:48
Fallen1235-Feb-12 23:48 
GeneralRe: VS 2010 MFC derived CListbox with dynamically addedCtoolbar Pin
Fallen1238-Feb-12 1:51
Fallen1238-Feb-12 1:51 
GeneralRe: VS 2010 MFC derived CListbox with dynamically addedCtoolbar Pin
Jochen Arndt8-Feb-12 2:04
professionalJochen Arndt8-Feb-12 2:04 
GeneralRe: VS 2010 MFC derived CListbox with dynamically addedCtoolbar Pin
Fallen1238-Feb-12 2:44
Fallen1238-Feb-12 2:44 
GeneralRe: VS 2010 MFC derived CListbox with dynamically addedCtoolbar Pin
Jochen Arndt8-Feb-12 3:19
professionalJochen Arndt8-Feb-12 3:19 
Fallen123 wrote:
The first answer in this tree was Just "place on dialog or view surface"

That should be best way.

May be this notes are useful:
You added a picture box as placeholder. I would use a simple control (e.g. static text) as placeholder. This should have the same size as your overlayed bar and be hidden by default. The only reason to add a member var for this control would be to get its size. Don't touch this var/control elsewhere (especially, don't try to delete it).

An overlayed control should be created on the heap from within OnInitDialog() (you tried to use a member var):
C++
// In the header:
CMyBar* m_pBar;
// In OnInitDialog():
m_pBar = new CMyBar;
m_pBar->Create(this, WS_CHILD, ...);
// Don't forget to delete it when the dialog closes

You may also check if you can implement your bar using a CDialogBar derived class. This is perfect for such tasks and provides auto delete.
GeneralRe: VS 2010 MFC derived CListbox with dynamically addedCtoolbar Pin
Fallen1238-Feb-12 4:04
Fallen1238-Feb-12 4:04 
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 
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 

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.