Click here to Skip to main content
16,007,126 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: How can I put my dialog in the system tray? Pin
Jörgen Sigvardsson19-Sep-04 10:13
Jörgen Sigvardsson19-Sep-04 10:13 
GeneralRe: How can I put my dialog in the system tray? Pin
Ramkrishna Pawar19-Sep-04 20:25
Ramkrishna Pawar19-Sep-04 20:25 
AnswerRe: How can I put my dialog in the system tray? Pin
Gary R. Wheeler19-Sep-04 14:59
Gary R. Wheeler19-Sep-04 14:59 
QuestionWhy can't I use OnKeyDown in a CDialog? Pin
alex5kov19-Sep-04 7:27
alex5kov19-Sep-04 7:27 
AnswerRe: Why can't I use onkeydown in a CDialog? Pin
Gary R. Wheeler19-Sep-04 15:01
Gary R. Wheeler19-Sep-04 15:01 
GeneralRe: Why can't I use onkeydown in a CDialog? Pin
alex5kov21-Sep-04 7:49
alex5kov21-Sep-04 7:49 
GeneralLinking issue with COM interface and Class IDs Pin
Alexander M.,19-Sep-04 7:21
Alexander M.,19-Sep-04 7:21 
GeneralRe: Linking issue with COM interface and Class IDs [edited] Pin
Michael P Butler19-Sep-04 10:34
Michael P Butler19-Sep-04 10:34 
You'll also need to include the .c file too, as this is the file that defines the value of the CLSID.

Sorry talking crap.

From MSDN

SUMMARY
A GUID must be initialized exactly once. For this reason, there are two different versions of the DEFINE_GUID macro. One version just declares an external reference to the symbol name. The other version actually initializes the symbol name to the value of the GUID. If you receive an LNK2001 error for the symbol name of the GUID, the GUID was not initialized.

You can make sure your GUID gets initialized in one of two ways:

If you are using precompiled header files, include the INITGUID.H header file before defining the GUID in the implementation file where it should be initialized. (AppWizard-generated MFC projects use precompiled headers by default.)
If you are not using precompiled headers, define INITGUID before including OBJBASE.H. (OBJBASE.H is included by OLE2.H.)



Although personally, I'd recommend using the COM smart pointer method via #import as I find it a much cleaner way of using COM

Michael

CP Blog [^]

GeneralRe: Linking issue with COM interface and Class IDs Pin
Michael Dunn19-Sep-04 11:38
sitebuilderMichael Dunn19-Sep-04 11:38 
GeneralOnKillfocus terminates application Pin
GWPATH19-Sep-04 5:44
GWPATH19-Sep-04 5:44 
GeneralRe: OnKillfocus terminates application Pin
Antti Keskinen19-Sep-04 7:06
Antti Keskinen19-Sep-04 7:06 
GeneralRe: OnKillfocus terminates application Pin
GWPATH19-Sep-04 9:46
GWPATH19-Sep-04 9:46 
GeneralISAPI Site Sentry Filter Pin
raed19-Sep-04 4:16
raed19-Sep-04 4:16 
QuestionDBF file format description? Pin
Maer72719-Sep-04 3:16
Maer72719-Sep-04 3:16 
GeneralCListCtrl Icon custum drawing Pin
<marquee>Mourad DEBBAH<marquee>19-Sep-04 1:54
sussMourad DEBBAH19-Sep-04 1:54 
GeneralSelection State in Listcontrol Pin
Neelesh K J Jain19-Sep-04 0:55
Neelesh K J Jain19-Sep-04 0:55 
GeneralCreate a MDI app without child Frame Window on start Up Pin
ic@19-Sep-04 0:40
ic@19-Sep-04 0:40 
GeneralRe: Create a MDI app without child Frame Window on start Up Pin
ensger23-Sep-04 4:56
ensger23-Sep-04 4:56 
GeneralRe: Create a MDI app without child Frame Window on start Up Pin
Anonymous23-Sep-04 9:00
Anonymous23-Sep-04 9:00 
GeneralCRecordset::Edit() (mfc) Pin
010011011019-Sep-04 0:32
010011011019-Sep-04 0:32 
GeneralRe: CRecordset::Edit() (mfc) Pin
Manfred Staiger20-Sep-04 2:00
Manfred Staiger20-Sep-04 2:00 
QuestionHow to remove horizontal scrollar in a multiline edit control ? Pin
Member 20081719-Sep-04 0:27
Member 20081719-Sep-04 0:27 
AnswerRe: How to remove horizontal scrollar in a multiline edit control ? Pin
Member 20081719-Sep-04 1:55
Member 20081719-Sep-04 1:55 
GeneralConvert CString to TCHAR Pin
RedDragon2k19-Sep-04 0:01
RedDragon2k19-Sep-04 0:01 
GeneralRe: Convert CString to TCHAR Pin
010011011019-Sep-04 0:48
010011011019-Sep-04 0:48 

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.