Click here to Skip to main content
15,899,679 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: How to get caption of a popup menu Pin
kflrei7-Jun-06 19:24
kflrei7-Jun-06 19:24 
AnswerRe: How to get caption of a popup menu Pin
Viorel.7-Jun-06 21:04
Viorel.7-Jun-06 21:04 
Questionmysql problem wuth date Pin
p_7-Jun-06 18:30
p_7-Jun-06 18:30 
AnswerRe: mysql problem wuth date Pin
Laxman Auti7-Jun-06 18:49
Laxman Auti7-Jun-06 18:49 
GeneralRe: mysql problem wuth date Pin
p_7-Jun-06 19:20
p_7-Jun-06 19:20 
GeneralRe: mysql problem wuth date Pin
Laxman Auti7-Jun-06 19:26
Laxman Auti7-Jun-06 19:26 
GeneralRe: mysql problem wuth date Pin
p_7-Jun-06 20:21
p_7-Jun-06 20:21 
QuestionTo call crystal report and display in PDF Format Pin
vinushru7-Jun-06 18:29
vinushru7-Jun-06 18:29 
AnswerRe: To call crystal report and display in PDF Format Pin
Hamid_RT7-Jun-06 19:21
Hamid_RT7-Jun-06 19:21 
GeneralRe: To call crystal report and display in PDF Format Pin
vinushru7-Jun-06 20:54
vinushru7-Jun-06 20:54 
Questionhelp with WritePrivateProfileString Pin
fury 847-Jun-06 17:44
fury 847-Jun-06 17:44 
AnswerRe: help with WritePrivateProfileString Pin
Laxman Auti7-Jun-06 18:25
Laxman Auti7-Jun-06 18:25 
Questionhow to change pixel size to centimeter size? Pin
samfromcn7-Jun-06 17:29
samfromcn7-Jun-06 17:29 
AnswerRe: how to change pixel size to centimeter size? Pin
_AnsHUMAN_ 7-Jun-06 18:07
_AnsHUMAN_ 7-Jun-06 18:07 
AnswerRe: how to change pixel size to centimeter size? Pin
Michael Dunn7-Jun-06 19:22
sitebuilderMichael Dunn7-Jun-06 19:22 
Questionproblem with setwindowtext() Pin
swatgodjr7-Jun-06 17:00
swatgodjr7-Jun-06 17:00 
AnswerRe: problem with setwindowtext() Pin
Hamid_RT7-Jun-06 19:04
Hamid_RT7-Jun-06 19:04 
GeneralRe: problem with setwindowtext() Pin
swatgodjr7-Jun-06 19:44
swatgodjr7-Jun-06 19:44 
sure not a problem, i will post the whole function, hope that will be enough to help solve the issue.

afx_msg void CEditDialog::OnEdit()<br />
{<br />
	elements s;<br />
	int size = sizeof(elements);<br />
	bool found = false;<br />
<br />
	//MessageBox(" This Area is Still under Construction", "Debug", MB_ICONINFORMATION);<br />
	CComboBox *pSelection;<br />
	pSelection = (CComboBox *)GetDlgItem(IDC_SELECTION);<br />
	CEdit *pNameText;<br />
	pNameText = (CEdit *) GetDlgItem(IDC_ENAME);<br />
	CEdit *pSymbolText;<br />
	pSymbolText = (CEdit *) GetDlgItem(IDC_ESYMBOL);<br />
	CEdit *pAtomicText;<br />
	pAtomicText = (CEdit *) GetDlgItem(IDC_EATOMIC);<br />
	CEdit *pPeriodText;<br />
	pPeriodText = (CEdit *) GetDlgItem(IDC_EPERIOD);<br />
	CEdit *pGroupText;<br />
	pGroupText = (CEdit *) GetDlgItem(IDC_EGROUP);<br />
	CEdit *pElectronText;<br />
	pElectronText = (CEdit *) GetDlgItem(IDC_EELECTRON);<br />
<br />
	int iCurSel = pSelection->GetCurSel();<br />
<br />
	if(iCurSel == CB_ERR)<br />
	{<br />
		MessageBox(" Please Select an Item.", "Error", MB_ICONWARNING);<br />
<br />
		return;<br />
	}<br />
<br />
	char lpszText[32];<br />
	pSelection->GetLBText(iCurSel, lpszText);<br />
<br />
	access.Open(file, CFile::modeCreate | CFile::modeNoTruncate | CFile::modeReadWrite);<br />
<br />
	do{<br />
		access.Read(reinterpret_cast< char * > (&s), sizeof(elements));<br />
		MessageBox(lpszText, "debug", MB_ICONINFORMATION);<br />
		if(strcmp(s.element, lpszText) == 0)<br />
		{<br />
			access.Seek(-(long)size, CFile::current);<br />
			MessageBox("Found", "debug", MB_ICONINFORMATION);<br />
			found = true;<br />
			pNameText->SetWindowText("test");<br />
		}<br />
	}while(found != true);<br />
	access.Close();<br />
}


all the code works as expected except the setwindowtext, anythign i put for it to output causes a crash(please excuse my sloppy code).
GeneralRe: problem with setwindowtext() Pin
Steve Echols7-Jun-06 20:06
Steve Echols7-Jun-06 20:06 
GeneralRe: problem with setwindowtext() Pin
Hamid_RT7-Jun-06 20:13
Hamid_RT7-Jun-06 20:13 
GeneralRe: problem with setwindowtext() Pin
Steve Echols7-Jun-06 21:42
Steve Echols7-Jun-06 21:42 
GeneralRe: problem with setwindowtext() Pin
Hamid_RT7-Jun-06 22:02
Hamid_RT7-Jun-06 22:02 
GeneralRe: problem with setwindowtext() Pin
Hamid_RT7-Jun-06 20:09
Hamid_RT7-Jun-06 20:09 
GeneralRe: problem with setwindowtext() Pin
swatgodjr7-Jun-06 20:27
swatgodjr7-Jun-06 20:27 
QuestionSTL sort problem Pin
_anil_7-Jun-06 15:56
_anil_7-Jun-06 15:56 

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.