Click here to Skip to main content
15,912,756 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Running Batch File using CreateProcess Pin
Frank Deo18-Aug-00 7:17
Frank Deo18-Aug-00 7:17 
GeneralmountNtmsMedia Pin
Member 255376217-Aug-00 23:39
Member 255376217-Aug-00 23:39 
GeneralTransparent CRichEditView Pin
der_wolf17-Aug-00 22:40
der_wolf17-Aug-00 22:40 
GeneralTransparent CRichEditView Pin
der_wolf17-Aug-00 22:40
der_wolf17-Aug-00 22:40 
GeneralTwo question(webbrowser) Pin
dooly17-Aug-00 20:57
dooly17-Aug-00 20:57 
GeneralMFC Pin
koteswara17-Aug-00 19:26
koteswara17-Aug-00 19:26 
GeneralRe: MFC Pin
Tonio17-Aug-00 20:26
Tonio17-Aug-00 20:26 
GeneralRe: MFC Pin
Frank Deo18-Aug-00 7:02
Frank Deo18-Aug-00 7:02 
I think I understand what you want to do...try subclassing the dialog listbox controls.

First derive a new class for each of the three listboxes from CListBox.

CMyListBox1
CMyListBox2
CMyListBox3


Then, in your dialog's main header file (mydlg.h, or whatever) change the default from:

CListBox m_ListBox1;
CListBox m_ListBox2;
CListBox m_ListBox3;


to:

CMyListBox1 m_ListBox1;
CMyListBox2 m_ListBox2;
CMyListBox3 m_ListBox3;


Don't forget to #include the CMyListBox(x).h files in your code.

Then, from your dialog's OnInitDialog function, subclass the controls using this code:

VERIFY(m_ListBox1.SubclassDlgItem(IDC_LISTBOX1, this));
VERIFY(m_ListBox2.SubclassDlgItem(IDC_LISTBOX2, this));
VERIFY(m_ListBox3.SubclassDlgItem(IDC_LISTBOX3, this));


Finally, then you can handle the OnSelChange event in your CListBox derived classes. So, you really don't add the function to the dialog class, you make it so you can handle the function from within that class.

Good Luck,
Frank Smile | :)
Generalintrusion into another app Pin
Alexa Polsky17-Aug-00 9:00
sussAlexa Polsky17-Aug-00 9:00 
GeneralLanguage support for dialogs Pin
Chris Vischer17-Aug-00 4:58
Chris Vischer17-Aug-00 4:58 
GeneralRe: Language support for dialogs Pin
Blake Miller22-Aug-00 9:53
Blake Miller22-Aug-00 9:53 
GeneralAccessing to Http header data in IE COM Pin
Ryan Park16-Aug-00 14:12
Ryan Park16-Aug-00 14:12 
GeneralBasic query regarding arrays/data sets Pin
Charlie the Wonderhorse16-Aug-00 11:02
sussCharlie the Wonderhorse16-Aug-00 11:02 
GeneralRe: Basic query regarding arrays/data sets Pin
Philip Nicoletti17-Aug-00 8:30
Philip Nicoletti17-Aug-00 8:30 
GeneralRe: Basic query regarding arrays/data sets Pin
Philip Nicoletti17-Aug-00 13:46
Philip Nicoletti17-Aug-00 13:46 
QuestionMinimizeBox in a PropertySheet? Pin
Mathias16-Aug-00 7:50
Mathias16-Aug-00 7:50 
AnswerRe: MinimizeBox in a PropertySheet? Pin
Frank Deo16-Aug-00 10:40
Frank Deo16-Aug-00 10:40 
GeneralAnother socket failure - in Create() call Pin
Alex Alexapolsky16-Aug-00 3:29
sussAlex Alexapolsky16-Aug-00 3:29 
GeneralRegarding Dial up Pin
Krithivasan M. S16-Aug-00 3:14
Krithivasan M. S16-Aug-00 3:14 
GeneralRe: Regarding Dial up Pin
Member 120896516-Aug-00 13:01
Member 120896516-Aug-00 13:01 
QuestionReboot the PC programatically ? Pin
Adalsteinn B. Bjarnason16-Aug-00 1:21
Adalsteinn B. Bjarnason16-Aug-00 1:21 
AnswerRe: Reboot the PC programatically ? Pin
Benedict Verheyen17-Aug-00 5:16
sussBenedict Verheyen17-Aug-00 5:16 
Generalchanging the default mfc icon Pin
Pierre Koerber16-Aug-00 0:10
sussPierre Koerber16-Aug-00 0:10 
GeneralRe: changing the default mfc icon Pin
Benedict Verheyen17-Aug-00 5:30
sussBenedict Verheyen17-Aug-00 5:30 
GeneralCAsyncSocket-debug assertion failed Pin
Alex Alexapolsky15-Aug-00 22:13
sussAlex Alexapolsky15-Aug-00 22:13 

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.