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

C / C++ / MFC

 
GeneralRe: Copying and executing code of a function Pin
Code-o-mat23-Apr-11 7:37
Code-o-mat23-Apr-11 7:37 
GeneralRe: Copying and executing code of a function Pin
barneyman23-Apr-11 23:12
barneyman23-Apr-11 23:12 
GeneralRe: Copying and executing code of a function Pin
Code-o-mat24-Apr-11 5:26
Code-o-mat24-Apr-11 5:26 
GeneralRe: Copying and executing code of a function Pin
Bashilein24-Apr-11 6:57
Bashilein24-Apr-11 6:57 
GeneralRe: Copying and executing code of a function Pin
Code-o-mat24-Apr-11 7:11
Code-o-mat24-Apr-11 7:11 
GeneralRe: Copying and executing code of a function Pin
Bashilein25-Apr-11 22:21
Bashilein25-Apr-11 22:21 
GeneralRe: Copying and executing code of a function Pin
Code-o-mat26-Apr-11 7:39
Code-o-mat26-Apr-11 7:39 
QuestionReferring CChildFrame variable Pin
Anu_Bala21-Apr-11 22:46
Anu_Bala21-Apr-11 22:46 
Hi,
In my application im loading DialogBar in mainfrmae,the dialogbar contains buttons and one ComboBox, i using that ComboBox in another class.Below is the code:
In MainFrm.h:
CSysWindow m_SysWnd; //CSysWindow is DialogBar class.

For that combobox i added one class as CAlarmGlobal
In SysWindow.h:
CAlarmCombo oAlrmCombo;  //CAlarmCombo derived from CComboBox

In MainFrm.cpp,in OnCreate() i add that dialogbar to mainframe
if (!m_SysWnd.Create(this, IDD_SYS,
			CBRS_TOP|CBRS_FLYBY|CBRS_TOOLTIPS, IDD_SYS))
		{
			return -1;  
  		}


In another class im reffering this ComboBox by using this code
CAlarmCombo *pSysBox = (CAlarmCombo *)((CMainFrame *)AfxGetMainWnd())->m_SysWnd.GetDlgItem(IDC_SYSALARM); //Combobox ID
	if(pSysBox){}

Like the sameway i want to give the dialogbar in childframe and i want to use tht in differnt class.
So i want to know how can i get the DialogBar class(CSyswindow) object in someother class.
Now im doing the same for ChildFrame

In ChildFrm.h:
CSysWindow m_Recent; //CSysWindow is DialogBar class


In ChildFrame.cpp,OnCreate()
if( !m_Recent.Create(this, IDD_RECENTALARMS, CBRS_BOTTOM |CBRS_FLYBY|CBRS_SIZE_DYNAMIC, IDD_RECENTALARMS ))
		{
		return -1;      // fail to create
		}


I want tot know,Is there anyway to refer the childframe like this
((CMainFrame *)AfxGetMainWnd())->m_SysWnd.GetDlgItem(IDC_SYSALARM);


Pls help me.
Anu

QuestionExtended Keys in WM_KEYDOWN and WM_KEYUP ? Pin
nitin321-Apr-11 22:25
nitin321-Apr-11 22:25 
AnswerRe: Extended Keys in WM_KEYDOWN and WM_KEYUP ? Pin
Hans Dietrich21-Apr-11 23:12
mentorHans Dietrich21-Apr-11 23:12 
GeneralRe: Extended Keys in WM_KEYDOWN and WM_KEYUP ? Pin
nitin321-Apr-11 23:30
nitin321-Apr-11 23:30 
Questionis there any variable change event to notify in MFC Pin
manoharbalu21-Apr-11 22:18
manoharbalu21-Apr-11 22:18 
AnswerRe: is there any variable change event to notify in MFC Pin
Richard MacCutchan21-Apr-11 22:53
mveRichard MacCutchan21-Apr-11 22:53 
AnswerRe: is there any variable change event to notify in MFC Pin
Hans Dietrich21-Apr-11 23:14
mentorHans Dietrich21-Apr-11 23:14 
AnswerRe: is there any variable change event to notify in MFC Pin
Albert Holguin22-Apr-11 8:36
professionalAlbert Holguin22-Apr-11 8:36 
QuestionIncremental search method for CEditview or CRicheditView Pin
ganesh.dp21-Apr-11 20:58
ganesh.dp21-Apr-11 20:58 
AnswerRe: Incremental search method for CEditview or CRicheditView Pin
Mattias G21-Apr-11 22:05
Mattias G21-Apr-11 22:05 
Questionhow to detect a variable change in MFC Pin
manoharbalu21-Apr-11 18:55
manoharbalu21-Apr-11 18:55 
AnswerRe: how to detect a variable change in MFC Pin
«_Superman_»21-Apr-11 20:19
professional«_Superman_»21-Apr-11 20:19 
GeneralRe: how to detect a variable change in MFC Pin
manoharbalu21-Apr-11 21:05
manoharbalu21-Apr-11 21:05 
GeneralRe: how to detect a variable change in MFC Pin
barneyman22-Apr-11 0:24
barneyman22-Apr-11 0:24 
GeneralRe: how to detect a variable change in MFC Pin
Stefan_Lang26-Apr-11 1:24
Stefan_Lang26-Apr-11 1:24 
QuestionWriting a Questionnaire using C++ Pin
Member 786165621-Apr-11 3:18
Member 786165621-Apr-11 3:18 
AnswerRe: Writing a Questionnaire using C++ Pin
CPallini21-Apr-11 3:25
mveCPallini21-Apr-11 3:25 
AnswerRe: Writing a Questionnaire using C++ Pin
HimanshuJoshi21-Apr-11 4:29
HimanshuJoshi21-Apr-11 4:29 

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.