Click here to Skip to main content
15,895,370 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: How to connect to database in MFC? Pin
cx_jin5-Nov-07 22:09
cx_jin5-Nov-07 22:09 
AnswerRe: How to connect to database in MFC? Pin
cx_jin7-Nov-07 15:18
cx_jin7-Nov-07 15:18 
Questionhelp me Pin
SnaKeBeD5-Nov-07 21:06
SnaKeBeD5-Nov-07 21:06 
AnswerRe: help me Pin
Hamid_RT5-Nov-07 21:08
Hamid_RT5-Nov-07 21:08 
GeneralRe: help me Pin
Nelek5-Nov-07 21:16
protectorNelek5-Nov-07 21:16 
GeneralRe: help me Pin
Hamid_RT5-Nov-07 21:27
Hamid_RT5-Nov-07 21:27 
AnswerRe: help me Pin
ThatsAlok5-Nov-07 21:21
ThatsAlok5-Nov-07 21:21 
QuestionUrgent please help , problem with relative path and win32 / MFC appliction Pin
xanagan6665-Nov-07 20:30
xanagan6665-Nov-07 20:30 
My MFC program has many line of code that using relative path like
("./data/test.jpg")

I alway reset the current directory after using CFileDialog so that
the ralative path - code in my program alway work ,
by doing something like this.

<br />
char currentDir[MAX_PATH];<br />
GetCurrentDirectory(currentDir);<br />
 ---- browse for file ------<br />
SetCurrentDirectory(currentDir);<br />


I has recently intregrated WinHelp in my program.

The problem is when user using WinHelp print function and selected those virtual printer like (Microsoft document writer) and browse for save path ,

My application's
current directory also change and since WinHelp doesn't block my application
(It a modeless dialog or something) I cant use the reset current directory method above.

Since my time is very limit , The only solution I came up here is

-------1.save the current directory into some static variable immediately after launching program

-------2.before calling and file access function that may invole relative path,
call SetCurrentDirectory(); with the saved directory

Will this solution alway work ?

since converting any relative part to absolute part is not an option now (some data are store in database as relative path)

I have to apologize for my very poor english and thank for answer in advance.
Xanagan
AnswerRe: Urgent please help , problem with relative path and win32 / MFC appliction [modified] Pin
Nelek5-Nov-07 20:49
protectorNelek5-Nov-07 20:49 
GeneralRe: Urgent please help , problem with relative path and win32 / MFC appliction Pin
xanagan6665-Nov-07 21:13
xanagan6665-Nov-07 21:13 
GeneralRe: Urgent please help , problem with relative path and win32 / MFC appliction Pin
Nelek5-Nov-07 21:21
protectorNelek5-Nov-07 21:21 
AnswerRe: Urgent please help , problem with relative path and win32 / MFC appliction Pin
Llasus5-Nov-07 20:50
Llasus5-Nov-07 20:50 
GeneralRe: Urgent please help , problem with relative path and win32 / MFC appliction Pin
xanagan6665-Nov-07 21:33
xanagan6665-Nov-07 21:33 
Questionmaking two DLLs into one DLL Pin
George_George5-Nov-07 20:29
George_George5-Nov-07 20:29 
AnswerRe: making two DLLs into one DLL Pin
ThatsAlok5-Nov-07 21:24
ThatsAlok5-Nov-07 21:24 
GeneralRe: making two DLLs into one DLL Pin
George_George5-Nov-07 21:44
George_George5-Nov-07 21:44 
GeneralRe: making two DLLs into one DLL Pin
ThatsAlok5-Nov-07 22:44
ThatsAlok5-Nov-07 22:44 
AnswerRe: making two DLLs into one DLL Pin
toxcct6-Nov-07 3:17
toxcct6-Nov-07 3:17 
GeneralRe: making two DLLs into one DLL Pin
Mark Salsbery6-Nov-07 5:17
Mark Salsbery6-Nov-07 5:17 
GeneralRe: making two DLLs into one DLL Pin
toxcct6-Nov-07 5:26
toxcct6-Nov-07 5:26 
JokeRe: making two DLLs into one DLL Pin
Nelek6-Nov-07 21:16
protectorNelek6-Nov-07 21:16 
GeneralRe: making two DLLs into one DLL Pin
toxcct6-Nov-07 21:23
toxcct6-Nov-07 21:23 
QuestionMenu Item? Pin
gunaarun5-Nov-07 19:52
gunaarun5-Nov-07 19:52 
AnswerRe: Menu Item? Pin
Rajesh R Subramanian5-Nov-07 20:29
professionalRajesh R Subramanian5-Nov-07 20:29 
AnswerRe: Menu Item? Pin
Hamid_RT5-Nov-07 20:53
Hamid_RT5-Nov-07 20:53 

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.