Click here to Skip to main content
15,936,046 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: [C++ Error] exception(15): E2141 Declaration syntax error Pin
Nemanja Trifunovic11-Sep-09 8:06
Nemanja Trifunovic11-Sep-09 8:06 
GeneralThanks to all concerned somehow I got my source labeled variable.cpp.c Pin
gordon305611-Sep-09 8:20
gordon305611-Sep-09 8:20 
GeneralRe: Thanks to all concerned somehow I got my source labeled variable.cpp.c Pin
Nemanja Trifunovic11-Sep-09 8:48
Nemanja Trifunovic11-Sep-09 8:48 
GeneralRe: [C++ Error] exception(15): E2141 Declaration syntax error Pin
UKM_Student11-Sep-09 8:11
UKM_Student11-Sep-09 8:11 
GeneralThanks UKM_Student I'm looking at code blocks right now Pin
gordon305611-Sep-09 8:37
gordon305611-Sep-09 8:37 
QuestionOdd bug in CMFCToolbarComboBoxButton class Pin
Santanu Lahiri11-Sep-09 5:17
Santanu Lahiri11-Sep-09 5:17 
AnswerRe: Odd bug in CMFCToolbarComboBoxButton class Pin
PatrikE20-Oct-09 4:42
PatrikE20-Oct-09 4:42 
GeneralRe: Odd bug in CMFCToolbarComboBoxButton class [modified] Pin
Santanu Lahiri20-Oct-09 10:00
Santanu Lahiri20-Oct-09 10:00 
Yes, I finally got frustrated enough to think up alternatives. I had already coded to find the CMFCToolbarComboBoxButton object (Code from MSDN actually), so now I went ahead and code along the following lines:

if (pSrcCombo != NULL)
{
    ASSERT_VALID(pSrcCombo);
    CMFCToolBarComboBoxEdit *pEdit = (CMFCToolBarComboBoxEdit *) pSrcCombo->GetEditCtrl();
    if (pEdit)
    {
        CString strSelItem=_T("");
        pEdit->GetWindowText (strSelItem);
        pSrcCombo->AddItem (strSelItem);
        ...
    }
}

Using the Edit Control seems to have solved the problem for me. At the MFCToolbarComboBoxButton level, there is no option for a fix that I have found. Perhaps subclassing the control and intercepting the GetText() call may work, but I have not tried it.

modified on Tuesday, October 20, 2009 4:07 PM

AnswerSOLUTION!!: Odd bug in CMFCToolbarComboBoxButton class Pin
PatrikE20-Oct-09 5:27
PatrikE20-Oct-09 5:27 
GeneralRe: SOLUTION!!: Odd bug in CMFCToolbarComboBoxButton class Pin
Santanu Lahiri20-Oct-09 10:07
Santanu Lahiri20-Oct-09 10:07 
QuestionHow to unlock locked file using Win32 API? [modified] Pin
JoeSchmoe00711-Sep-09 4:55
JoeSchmoe00711-Sep-09 4:55 
QuestionRe: How to unlock locked file using Win32 API? Pin
David Crow11-Sep-09 5:17
David Crow11-Sep-09 5:17 
AnswerFile is still locked after application is shut down. Pin
JoeSchmoe00711-Sep-09 5:30
JoeSchmoe00711-Sep-09 5:30 
GeneralRe: File is still locked after application is shut down. Pin
David Crow11-Sep-09 5:58
David Crow11-Sep-09 5:58 
GeneralRe: File is still locked after application is shut down. Pin
Nemanja Trifunovic11-Sep-09 8:08
Nemanja Trifunovic11-Sep-09 8:08 
AnswerRe: How to unlock locked file using Win32 API? Pin
Stuart Dootson11-Sep-09 21:37
professionalStuart Dootson11-Sep-09 21:37 
AnswerRe: How to unlock locked file using Win32 API? Pin
kilt14-Sep-09 2:21
kilt14-Sep-09 2:21 
QuestionBeginner's Question 2 Pin
UKM_Student11-Sep-09 4:37
UKM_Student11-Sep-09 4:37 
AnswerRe: Beginner's Question 2 Pin
David Crow11-Sep-09 4:41
David Crow11-Sep-09 4:41 
GeneralRe: Beginner's Question 2 Pin
UKM_Student11-Sep-09 4:44
UKM_Student11-Sep-09 4:44 
GeneralRe: Beginner's Question 2 Pin
David Crow11-Sep-09 4:48
David Crow11-Sep-09 4:48 
GeneralRe: Beginner's Question 2 Pin
UKM_Student11-Sep-09 4:56
UKM_Student11-Sep-09 4:56 
GeneralRe: Beginner's Question 2 Pin
UKM_Student11-Sep-09 4:55
UKM_Student11-Sep-09 4:55 
GeneralRe: Beginner's Question 2 Pin
David Crow11-Sep-09 5:13
David Crow11-Sep-09 5:13 
GeneralRe: Beginner's Question 2 Pin
UKM_Student11-Sep-09 5:23
UKM_Student11-Sep-09 5:23 

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.