Click here to Skip to main content
15,887,947 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: how to get a short file name before file creation? Pin
pasztorpisti11-Jul-12 10:37
pasztorpisti11-Jul-12 10:37 
GeneralRe: how to get a short file name before file creation? Pin
Richard MacCutchan11-Jul-12 22:54
mveRichard MacCutchan11-Jul-12 22:54 
QuestionRe: how to get a short file name before file creation? Pin
David Crow11-Jul-12 3:13
David Crow11-Jul-12 3:13 
AnswerRe: how to get a short file name before file creation? Pin
jschell11-Jul-12 8:37
jschell11-Jul-12 8:37 
GeneralRe: how to get a short file name before file creation? Pin
David Crow11-Jul-12 9:50
David Crow11-Jul-12 9:50 
GeneralRe: how to get a short file name before file creation? Pin
jschell12-Jul-12 10:19
jschell12-Jul-12 10:19 
GeneralRe: how to get a short file name before file creation? Pin
Le@rner31-Jul-12 1:28
Le@rner31-Jul-12 1:28 
QuestionPure virtual methods Pin
Rocky65110-Jul-12 23:12
Rocky65110-Jul-12 23:12 
Hello,
I develop add-ons for MS Flight Simulator and I use the poorly documented SDK for this. The SDK provides a .h file in which an interface class is defined (with pure virtual methods only), something like this:
C++
class IPanelCCallback {
public:
	virtual IPanelCCallback* QueryInterface (PCSTRINGZ pszInterface) = 0;
	virtual bool  ConvertStringToProperty (PCSTRINGZ keyword, SINT32* pID) = 0;
	virtual bool  ConvertPropertyToString (SINT32 id, PPCSTRINGZ pKeyword) = 0;
};

In my code, I use this interface like this:
C++
IPanelCCallback* pCallBack = panel_get_registered_c_callback("fs9gps");
...
SINT32 id;
pCallBack->ConvertStringToProperty(propertyName, &id);

Everything works fine, but I don't understand why... I thought the linker would stop with an "undefined symbol" error because the IPanelCCallback methods, such as ConvertStringToProperty, are declared as pure virtual but defined nowhere, and I don't use any library for linking. With such an interface class, I thought I would have to defined a subclass of IPanelCCallback and define the ConvertStringToProperty method. My code works, so I shouldn't complain, but I would like to know more about the use of interface classes, this is a subject I don't know much.

Any information is greatly welcome !!

Thank you,
Eric
GeneralRe: Pure virtual methods Pin
pasztorpisti11-Jul-12 0:27
pasztorpisti11-Jul-12 0:27 
AnswerRe: Pure virtual methods Pin
jschell11-Jul-12 8:40
jschell11-Jul-12 8:40 
QuestionSTL Containers store a copy? Pin
piul9-Jul-12 22:49
piul9-Jul-12 22:49 
AnswerRe: STL Containers store a copy? Pin
Richard MacCutchan9-Jul-12 23:07
mveRichard MacCutchan9-Jul-12 23:07 
GeneralRe: STL Containers store a copy? Pin
piul9-Jul-12 23:20
piul9-Jul-12 23:20 
AnswerRe: STL Containers store a copy? Pin
Aescleal10-Jul-12 7:11
Aescleal10-Jul-12 7:11 
GeneralRe: STL Containers store a copy? Pin
Stefan_Lang10-Jul-12 23:10
Stefan_Lang10-Jul-12 23:10 
GeneralRe: STL Containers store a copy? Pin
Richard MacCutchan11-Jul-12 3:05
mveRichard MacCutchan11-Jul-12 3:05 
QuestionProcess Pin
sarfaraznawaz9-Jul-12 21:25
sarfaraznawaz9-Jul-12 21:25 
AnswerRe: Process Pin
Code-o-mat9-Jul-12 23:21
Code-o-mat9-Jul-12 23:21 
GeneralRe: Process Pin
sarfaraznawaz11-Jul-12 2:27
sarfaraznawaz11-Jul-12 2:27 
GeneralRe: Process Pin
Code-o-mat11-Jul-12 3:12
Code-o-mat11-Jul-12 3:12 
GeneralRe: Process Pin
sarfaraznawaz11-Jul-12 21:14
sarfaraznawaz11-Jul-12 21:14 
QuestionTooltips can't display in CMainFrame::CFrameWnd Pin
ussthamcn9-Jul-12 3:55
ussthamcn9-Jul-12 3:55 
AnswerRe: Tooltips can't display in CMainFrame::CFrameWnd Pin
ussthamcn10-Jul-12 3:04
ussthamcn10-Jul-12 3:04 
QuestionRe: Tooltips can't display in CMainFrame::CFrameWnd Pin
David Crow10-Jul-12 4:53
David Crow10-Jul-12 4:53 
QuestionHow to Undo/Redo drawing operation in a dialog based application.? Pin
mbatra319-Jul-12 1:55
mbatra319-Jul-12 1:55 

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.