Click here to Skip to main content
15,889,266 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: How to detect network adapter status in windows2000/xp? Pin
valikac25-Dec-03 7:09
valikac25-Dec-03 7:09 
QuestionSaving Files in Win2000 as normal-user? Pin
fbaumgaertel24-Dec-03 21:21
fbaumgaertel24-Dec-03 21:21 
AnswerRe: Saving Files in Win2000 as normal-user? Pin
valikac25-Dec-03 7:10
valikac25-Dec-03 7:10 
GeneralChanging Windows Fonts Pin
vivek_mastishk24-Dec-03 21:01
vivek_mastishk24-Dec-03 21:01 
GeneralRe: Changing Windows Fonts Pin
Selvam R25-Dec-03 10:50
professionalSelvam R25-Dec-03 10:50 
QuestionAdd help button to dialog? Pin
xxhimanshu24-Dec-03 19:14
xxhimanshu24-Dec-03 19:14 
AnswerRe: Add help button to dialog? Pin
PJ Arends25-Dec-03 9:26
professionalPJ Arends25-Dec-03 9:26 
GeneralCalling functions in a C# dll from C++ code Pin
Member 78143724-Dec-03 17:02
Member 78143724-Dec-03 17:02 
GeneralRe: Calling functions in a C# dll from C++ code Pin
wb24-Dec-03 18:33
wb24-Dec-03 18:33 
GeneralStop keyevents and mesages Pin
Jarek G24-Dec-03 16:45
Jarek G24-Dec-03 16:45 
GeneralRe: Stop keyevents and mesages Pin
Monty224-Dec-03 20:08
Monty224-Dec-03 20:08 
GeneralRe: Stop keyevents and mesages Pin
Robert Kuster24-Dec-03 21:53
Robert Kuster24-Dec-03 21:53 
GeneralRe: Stop keyevents and mesages Pin
Anonymous25-Dec-03 11:25
Anonymous25-Dec-03 11:25 
GeneralUnknown warnings Pin
Burl D24-Dec-03 15:11
Burl D24-Dec-03 15:11 
GeneralRe: Unknown warnings Pin
PJ Arends24-Dec-03 17:02
professionalPJ Arends24-Dec-03 17:02 
GeneralRe: Unknown warnings Pin
Burl D25-Dec-03 5:06
Burl D25-Dec-03 5:06 
QuestionTrouble with Open File dialog? Pin
gamerPotatoe24-Dec-03 10:25
gamerPotatoe24-Dec-03 10:25 
AnswerRe: Trouble with Open File dialog? Pin
kjessee24-Dec-03 10:42
kjessee24-Dec-03 10:42 
GeneralRe: Trouble with Open File dialog? Pin
gamerPotatoe24-Dec-03 10:58
gamerPotatoe24-Dec-03 10:58 
I made the change (thanks for pointing out the typo Wink | ;) ) and here is my code

OnMFile()
{
// TODO: Add your command handler code here

CString m_sMeshName();

CFileDialog m_lpDialog(true);
if(m_lpDialog.DoModal() == IDOK)
{
m_sMeshName = m_lpDialog.GetFileName();
UpdateData(FALSE);
}


}

These are the errors

error C2274: '->' : illegal as right side of '.' operator
error C2446: '==' : no conversion from 'const int' to 'int (__thiscall CFileDialog::*)(void)'
There are no conversions from integral values to pointer-to-member values
error C2040: '==' : 'int (__thiscall CFileDialog::*)(void)' differs in levels of indirection from 'const int'
error C2659: '=' : overloaded function as left operand

The error
error C2274: '->' : illegal as right side of '.' operator

corresponds to the code line:
CFileDialog m_lpDialog(true);

The error
error C2446: '==' : no conversion from 'const int' to 'int (__thiscall CFileDialog::*)(void)'
There are no conversions from integral values to pointer-to-member values
error C2040: '==' : 'int (__thiscall CFileDialog::*)(void)' differs in levels of indirection from 'const int'

corresponds to the line:

if(m_lpDialog.DoModal() == IDOK)

The error:
error C2659: '=' : overloaded function as left operand

corresponds to the line

m_sMeshName = m_lpDialog.GetFileName();

I literally copied this code form a book, but it gives the errors as mentionedFrown | :( what could be wrong ?



GeneralRe: Trouble with Open File dialog? Pin
kjessee24-Dec-03 11:12
kjessee24-Dec-03 11:12 
GeneralTHanks! Need a little help with CString Pin
gamerPotatoe24-Dec-03 19:24
gamerPotatoe24-Dec-03 19:24 
GeneralRe: THanks! Need a little help with CString Pin
Monty224-Dec-03 21:54
Monty224-Dec-03 21:54 
AnswerRe: Trouble with Open File dialog? Pin
Michael Dunn24-Dec-03 12:19
sitebuilderMichael Dunn24-Dec-03 12:19 
Questioncan AddNew() function update original database Pin
Member 78215424-Dec-03 8:46
Member 78215424-Dec-03 8:46 
AnswerRe: can AddNew() function update original database Pin
Monty224-Dec-03 20:11
Monty224-Dec-03 20:11 

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.