Click here to Skip to main content
15,898,134 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionCRichEditCtrl - problem with SetTargetDevice and TO_ADVANCEDTYPOGRAPHY Pin
szczepi15-Nov-08 8:57
szczepi15-Nov-08 8:57 
QuestionReferencing lib file Pin
Christian Flutcher15-Nov-08 7:25
Christian Flutcher15-Nov-08 7:25 
AnswerRe: Referencing lib file Pin
Mark Salsbery15-Nov-08 7:30
Mark Salsbery15-Nov-08 7:30 
GeneralRe: Referencing lib file Pin
Christian Flutcher16-Nov-08 6:56
Christian Flutcher16-Nov-08 6:56 
GeneralRe: Referencing lib file Pin
Mark Salsbery16-Nov-08 7:08
Mark Salsbery16-Nov-08 7:08 
GeneralRe: Referencing lib file Pin
Christian Flutcher16-Nov-08 7:12
Christian Flutcher16-Nov-08 7:12 
GeneralRe: Referencing lib file Pin
Mark Salsbery16-Nov-08 7:22
Mark Salsbery16-Nov-08 7:22 
GeneralRe: Referencing lib file Pin
Jijo.Raj16-Nov-08 7:34
Jijo.Raj16-Nov-08 7:34 
Christian Flutcher wrote:
I can copy the someheader.h to my application directory, but this file is a facade header file which contains includes to several other files. So compiler is complaining about those missing ones. Is it a good practice to give fully qualified path for the includes?


You should not use hardcoded path in your source. Assume if you go to another machine and there the headers exist in another directory, either you've to edit the source or copy the headers to hardcoded path. Well, the solutions are as follows.

Solution 1
1) Include the header by just filename - #include "someheader.h"
2) Declare an environment variable - SOME_HEADER_PATH with path as C:\Somepath.
3) Restart visual studio IDE for making the new env var in effect.
4) Take Visual Studio project settings, C/C++ tab, Preprocessor settings category.
5) In "Additional include directories" add - $(SOME_HEADER_PATH).
6) Now recompile the project.

Here you've moved the directory dependency to an external env var. And if you move to some other machine, just make sure that the env var in that machine holds the right path to your Somepath.

Solution 2
1) Include the header by just filename - #include "someheader.h"
2) Take menu, Tools > Options > Directories tab.
3) Now add C:\somepath to the include directory search list.
4) you are done.

Well, depends on your requirement choose the best. Well, I recommend the first. Smile | :)

Regards,
Jijo.

_____________________________________________________

http://weseetips.com[^] Visual C++ tips and tricks. Updated daily.

GeneralRe: Referencing lib file Pin
Christian Flutcher17-Nov-08 15:37
Christian Flutcher17-Nov-08 15:37 
QuestionProblems with malloc() and typedef struct Pin
Manfr3d15-Nov-08 3:11
Manfr3d15-Nov-08 3:11 
AnswerRe: Problems with malloc() and typedef struct Pin
Iain Clarke, Warrior Programmer15-Nov-08 3:18
Iain Clarke, Warrior Programmer15-Nov-08 3:18 
GeneralRe: Problems with malloc() and typedef struct Pin
Manfr3d15-Nov-08 4:08
Manfr3d15-Nov-08 4:08 
AnswerRe: Problems with malloc() and typedef struct Pin
cmk15-Nov-08 9:21
cmk15-Nov-08 9:21 
GeneralRe: Problems with malloc() and typedef struct Pin
Manfr3d15-Nov-08 23:22
Manfr3d15-Nov-08 23:22 
GeneralRe: Problems with malloc() and typedef struct Pin
cmk16-Nov-08 8:47
cmk16-Nov-08 8:47 
Questionset focus to a control problem on win32 dialogs [modified] Pin
abdolahzadeh15-Nov-08 2:55
abdolahzadeh15-Nov-08 2:55 
AnswerRe: set focus to a control problem on win32 dialogs Pin
Code-o-mat15-Nov-08 3:36
Code-o-mat15-Nov-08 3:36 
GeneralRe: set focus to a control problem on win32 dialogs Pin
abdolahzadeh16-Nov-08 2:43
abdolahzadeh16-Nov-08 2:43 
AnswerRe: set focus to a control problem on win32 dialogs Pin
Mark Salsbery15-Nov-08 7:27
Mark Salsbery15-Nov-08 7:27 
GeneralRe: set focus to a control problem on win32 dialogs Pin
abdolahzadeh16-Nov-08 2:39
abdolahzadeh16-Nov-08 2:39 
QuestionRe: set focus to a control problem on win32 dialogs Pin
Mark Salsbery16-Nov-08 6:05
Mark Salsbery16-Nov-08 6:05 
AnswerRe: set focus to a control problem on win32 dialogs Pin
abdolahzadeh18-Nov-08 3:51
abdolahzadeh18-Nov-08 3:51 
GeneralRe: set focus to a control problem on win32 dialogs Pin
Phil Outram20-Sep-10 11:02
Phil Outram20-Sep-10 11:02 
QuestionSetRegistryKey problem, when uninstalling Pin
followait15-Nov-08 0:51
followait15-Nov-08 0:51 
AnswerRe: SetRegistryKey problem, when uninstalling Pin
22491715-Nov-08 17:38
22491715-Nov-08 17:38 

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.