Click here to Skip to main content
15,921,028 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: what is stdin and its friends? Pin
Bob Stanneveld23-Jul-03 2:02
Bob Stanneveld23-Jul-03 2:02 
GeneralShare combobox on different pages Pin
harmendejong22-Jul-03 21:40
harmendejong22-Jul-03 21:40 
GeneralRe: Share combobox on different pages Pin
zeki yugnak22-Jul-03 23:14
zeki yugnak22-Jul-03 23:14 
GeneralRe: Share combobox on different pages Pin
harmendejong22-Jul-03 23:42
harmendejong22-Jul-03 23:42 
GeneralRe: Share combobox on different pages Pin
Ryan Binns22-Jul-03 23:31
Ryan Binns22-Jul-03 23:31 
GeneralRe: Share combobox on different pages Pin
Toni7823-Jul-03 0:14
Toni7823-Jul-03 0:14 
GeneralRe: Share combobox on different pages Pin
harmendejong23-Jul-03 0:41
harmendejong23-Jul-03 0:41 
GeneralRe: Share combobox on different pages Pin
Toni7823-Jul-03 1:19
Toni7823-Jul-03 1:19 
Smile | :) That was just an idea harmendejong so I really don't have any source code (I don't even know if it works).
But here is a general idea of how it might be implemeted (the code has not been tested at all, and it needs to be modified to work).

// You create the combo and then you hide it.
CRect aRect( 0, 0, 10, 10 );
m_cmbMyCombo.Create(WS_CHILD | WS_VISIBLE |
             CBS_DROPDOWNLIST, 
	     aRect, this, IDC_MYCOMBO );
// Add strings (or whatever you want to add)
...
m_cmbMyCombo.ShowWindow( SW_HIDE );

// Somewhere in your dialog 1
// Find the area where the combo needs to go
aRect = SomeArea;
m_cmbMyCombo.SetParent( this );
m_cmbMyCombo.MoveWindow( &aRect );
m_cmbMyCombo.ShowWindow( SW_SHOW );
m_cmbMyCombo.SetFocus(); // This is optional
// The same thing can be done in dialog 2 and so on.


You have to make sure that you hide and show your combo box accordingly. You won't be able to handle the events through the class wizard (unless you create your own combo class derived from CComboBox). Also, you have to make sure that you destroy the combo box at the end.
Sorry, I can't help you anymore because this is something that I haven't tested but I hope that it gives you some ideas on how to proceed.

// Afterall, I realized that even my comment lines have bugs

When one cannot invent, one must at least improve (in bed).-My latest fortune cookie
GeneralRe: Share combobox on different pages Pin
Ryan Binns23-Jul-03 4:11
Ryan Binns23-Jul-03 4:11 
GeneralRe: Share combobox on different pages Pin
David Crow23-Jul-03 3:39
David Crow23-Jul-03 3:39 
Questionhow to create a user name and password for a database ? Pin
vcseeker22-Jul-03 21:35
vcseeker22-Jul-03 21:35 
AnswerRe: how to create a user name and password for a database ? Pin
sorenb23-Jul-03 0:48
sorenb23-Jul-03 0:48 
AnswerRe: how to create a user name and password for a database ? Pin
Alexander M.,23-Jul-03 2:03
Alexander M.,23-Jul-03 2:03 
QuestionHow to prevent binding a Type library to a ATL Attributed DLL ? need help ! Pin
talhalfon22-Jul-03 21:26
talhalfon22-Jul-03 21:26 
GeneralQuestion about file descriptor. Pin
George222-Jul-03 21:24
George222-Jul-03 21:24 
GeneralRe: Question about file descriptor. Pin
Ryan Binns22-Jul-03 23:34
Ryan Binns22-Jul-03 23:34 
GeneralRe: Question about file descriptor. Pin
George223-Jul-03 0:20
George223-Jul-03 0:20 
GeneralRe: Question about file descriptor. Pin
Ryan Binns23-Jul-03 4:17
Ryan Binns23-Jul-03 4:17 
GeneralRe: Question about file descriptor. Pin
George224-Jul-03 2:48
George224-Jul-03 2:48 
QuestionGDI+ in ATL ActiveX control??? Pin
denkor22-Jul-03 20:41
denkor22-Jul-03 20:41 
GeneralFocus Pin
Valeria Bogdevich22-Jul-03 20:17
Valeria Bogdevich22-Jul-03 20:17 
GeneralRe: Focus Pin
Toni7822-Jul-03 20:25
Toni7822-Jul-03 20:25 
GeneralRe: Focus Pin
Toni7822-Jul-03 22:54
Toni7822-Jul-03 22:54 
GeneralRe: Focus Pin
Valeria Bogdevich23-Jul-03 1:42
Valeria Bogdevich23-Jul-03 1:42 
GeneralRe: Focus Pin
Toni7823-Jul-03 1:47
Toni7823-Jul-03 1:47 

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.