Click here to Skip to main content
15,886,873 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: WinSock2 / Threads Pin
Fareed Rizkalla30-Apr-10 13:10
Fareed Rizkalla30-Apr-10 13:10 
QuestionProblem implementing FIR code(nuhertz) [modified] Pin
browneyes8628-Apr-10 10:26
browneyes8628-Apr-10 10:26 
AnswerRe: Problem implementing FIR code(nuhertz) Pin
LittleYellowBird28-Apr-10 21:59
LittleYellowBird28-Apr-10 21:59 
GeneralRe: Problem implementing FIR code(nuhertz) Pin
browneyes8629-Apr-10 2:11
browneyes8629-Apr-10 2:11 
GeneralRe: Problem implementing FIR code(nuhertz) Pin
LittleYellowBird29-Apr-10 4:27
LittleYellowBird29-Apr-10 4:27 
AnswerRe: Problem implementing FIR code(nuhertz) Pin
Stuart Dootson29-Apr-10 2:40
professionalStuart Dootson29-Apr-10 2:40 
QuestionRe: Problem implementing FIR code(nuhertz) Pin
David Crow29-Apr-10 2:48
David Crow29-Apr-10 2:48 
Questionproblem with CSplitButton::SetDropDownMenu method Pin
A&Ms28-Apr-10 9:47
A&Ms28-Apr-10 9:47 
Hi,
I have created a dialog based application in visual studio 2010 and I have added a CSplitButton Control to my dialog through resource editor, also I have made a menu in resource editorwith the ID of IDR_MENU_BUTTON_FILE and a sud menu after all, my code looks like the following code:
BOOL CMyDialogDlg::OnInitDialog()
{
	CSplitButton* pCtrlSpiltBtn = (CSplitButton*)this->GetDlgItem(IDC_SPLITBUTTON1);
	pCtrlSpiltBtn ->SetDropDownMenu(IDR_MENU_BUTTON_FILE, 0);
}

however the pCtrlSpiltBtn get initialized correctly and every thing is OK. but
pCtrlSpiltBtn ->SetDropDownMenu(IDR_MENU_BUTTON_FILE, 0);

fails when I trace the case I found that this line call the following methods of MFC classes.
void CSplitButton::SetDropDownMenu(UINT nMenuId, UINT nSubMenuId)
{
	Cleanup();
	m_nMenuId = nMenuId;
	m_nSubMenuId = nSubMenuId;
}

void CSplitButton::SetDropDownMenu(CMenu* pMenu)
{
	Cleanup();
	m_pMenu = pMenu;
}

void CSplitButton::Cleanup()
{
	if (m_pMenu)
	{
		delete m_pMenu;
	}
	m_pMenu = NULL;
	m_nMenuId = (UINT)-1;
	m_nSubMenuId = (UINT)-1;
}

and the m_pMenu pointer is always initialized and while the line
delete m_pMenu;

get executed all the application ruining fails.
Please help me solve the case, what should I do?
QuestionJPEG 2 PDF Creation [modified] Pin
Game-point28-Apr-10 6:36
Game-point28-Apr-10 6:36 
QuestionRe: JPEG 2 PDF Creation Pin
David Crow28-Apr-10 7:48
David Crow28-Apr-10 7:48 
AnswerRe: JPEG 2 PDF Creation Pin
Game-point28-Apr-10 8:02
Game-point28-Apr-10 8:02 
Questionrun , show and application in my project and handle its forms Pin
iman_kh28-Apr-10 3:44
iman_kh28-Apr-10 3:44 
AnswerRe: run , show and application in my project and handle its forms Pin
Chris Losinger28-Apr-10 4:18
professionalChris Losinger28-Apr-10 4:18 
AnswerRe: run , show and application in my project and handle its forms Pin
Xeqtr28-Apr-10 7:29
Xeqtr28-Apr-10 7:29 
QuestionHow to open a file with UNICODE filename on Windows? Pin
zengkun10028-Apr-10 3:24
zengkun10028-Apr-10 3:24 
AnswerRe: How to open a file with UNICODE filename on Windows? Pin
Richard MacCutchan28-Apr-10 3:29
mveRichard MacCutchan28-Apr-10 3:29 
GeneralRe: How to open a file with UNICODE filename on Windows? Pin
zengkun10028-Apr-10 13:25
zengkun10028-Apr-10 13:25 
GeneralRe: How to open a file with UNICODE filename on Windows? Pin
Richard MacCutchan28-Apr-10 22:18
mveRichard MacCutchan28-Apr-10 22:18 
GeneralRe: How to open a file with UNICODE filename on Windows? Pin
zengkun10029-Apr-10 3:44
zengkun10029-Apr-10 3:44 
AnswerRe: How to open a file with UNICODE filename on Windows? Pin
Fareed Rizkalla28-Apr-10 3:58
Fareed Rizkalla28-Apr-10 3:58 
GeneralRe: How to open a file with UNICODE filename on Windows? Pin
zengkun10028-Apr-10 13:09
zengkun10028-Apr-10 13:09 
QuestionIShellItem / Win32 Pin
Fareed Rizkalla28-Apr-10 3:07
Fareed Rizkalla28-Apr-10 3:07 
Questionvc++ exe failing to run Pin
rupeshkp72828-Apr-10 1:27
rupeshkp72828-Apr-10 1:27 
AnswerRe: vc++ exe failing to run Pin
Cedric Moonen28-Apr-10 1:30
Cedric Moonen28-Apr-10 1:30 
AnswerRe: vc++ exe failing to run Pin
rupeshkp72828-Apr-10 1:43
rupeshkp72828-Apr-10 1:43 

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.