Click here to Skip to main content
15,902,276 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Getting window name in different language. Pin
CPallini19-Sep-10 6:10
mveCPallini19-Sep-10 6:10 
GeneralRe: Getting window name in different language. Pin
Luc Pattyn19-Sep-10 6:16
sitebuilderLuc Pattyn19-Sep-10 6:16 
GeneralRe: Getting window name in different language. Pin
CPallini19-Sep-10 6:25
mveCPallini19-Sep-10 6:25 
QuestionRe: Getting window name in different language. Pin
CPallini19-Sep-10 6:07
mveCPallini19-Sep-10 6:07 
AnswerRe: Getting window name in different language. Pin
Luc Pattyn19-Sep-10 6:21
sitebuilderLuc Pattyn19-Sep-10 6:21 
GeneralRe: Getting window name in different language. Pin
CPallini19-Sep-10 6:26
mveCPallini19-Sep-10 6:26 
GeneralRe: Getting window name in different language. Pin
gateway2320-Sep-10 20:45
gateway2320-Sep-10 20:45 
QuestionListbox control not accessible in another class?? Pin
AmbiguousName19-Sep-10 1:48
AmbiguousName19-Sep-10 1:48 
hello guys...I added ListBox control on the form, so it accessible in MyProjDlg.cpp only. Now I want to add something to this ListBox from some other class "MyClass.cpp". So I made a function setter() in MyProjDlg.h like this....
#pragma once
#include "afxwin.h"

class MyProjDlg: public CDialog{
   //construction
   public:
           .....
   //implementation
   protected:
           .....

   public:
	afx_msg void OnAdd();
	afx_msg void OnDelete();
	afx_msg void OnShow();
	void setter(LPSTR str);  //here is the function I manually added...
	CListBox ListVar;
};

and gave its its implementation in MyProjDlg.cpp
void setter(LPSTR str) {
        //to keep things simple, messagebox is hown here..
	MessageBox(NULL,str,"",NULL);
}

and used it in MyClass.cpp like this..
LPSTR str = "Rumble in the Bronx"
for (int i=0; i<5; i++) {
     setter(str);
}


problem is,setter()it is not accessible in the MyClass.cpp....whyConfused | :confused:
AnswerRe: Listbox control not accessible in another class?? Pin
Richard MacCutchan19-Sep-10 2:07
mveRichard MacCutchan19-Sep-10 2:07 
AnswerRe: Listbox control not accessible in another class?? [modified] Pin
AmbiguousName19-Sep-10 2:37
AmbiguousName19-Sep-10 2:37 
GeneralRe: Listbox control not accessible in another class?? Pin
Richard MacCutchan19-Sep-10 7:21
mveRichard MacCutchan19-Sep-10 7:21 
AnswerRe: Listbox control not accessible in another class?? Pin
Luc Pattyn19-Sep-10 3:54
sitebuilderLuc Pattyn19-Sep-10 3:54 
AnswerRe: Listbox control not accessible in another class?? Pin
AmbiguousName19-Sep-10 4:05
AmbiguousName19-Sep-10 4:05 
GeneralRe: Listbox control not accessible in another class?? Pin
Luc Pattyn19-Sep-10 4:18
sitebuilderLuc Pattyn19-Sep-10 4:18 
Questionconnection dde server to excel Pin
zon_cpp18-Sep-10 20:45
zon_cpp18-Sep-10 20:45 
Questionfstream, fail() Pin
James_72218-Sep-10 18:48
James_72218-Sep-10 18:48 
AnswerRe: fstream, fail() Pin
Aescleal18-Sep-10 21:10
Aescleal18-Sep-10 21:10 
QuestionUnsigned/Signed Pin
Fareed Rizkalla18-Sep-10 6:32
Fareed Rizkalla18-Sep-10 6:32 
AnswerRe: Unsigned/Signed Pin
Tim Craig18-Sep-10 7:03
Tim Craig18-Sep-10 7:03 
GeneralRe: Unsigned/Signed Pin
oggenok6418-Sep-10 9:00
oggenok6418-Sep-10 9:00 
GeneralRe: Unsigned/Signed Pin
josda100020-Sep-10 11:20
josda100020-Sep-10 11:20 
AnswerRe: Unsigned/Signed PinPopular
Chris Losinger18-Sep-10 10:01
professionalChris Losinger18-Sep-10 10:01 
QuestionHow to move rectangle with mouse Pin
raju_shiva18-Sep-10 1:10
raju_shiva18-Sep-10 1:10 
AnswerRe: How to move rectangle with mouse Pin
Richard MacCutchan18-Sep-10 2:58
mveRichard MacCutchan18-Sep-10 2:58 
AnswerRe: How to move rectangle with mouse Pin
«_Superman_»19-Sep-10 20:57
professional«_Superman_»19-Sep-10 20:57 

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.