|
thanks for reply,
i found a code to get the dsw, it appears in one of the add ins here is code project (in the project http://www.codeproject.com/macro/restoreclassviewaddin2.asp?target=restore%7Cclass%7Cview#xxxx )
here is the code:
CString CCommands::GetWorkspacePath()
{
CWinApp* pApp = AfxGetApp();
CString szWorkspace;
POSITION posdt = pApp->GetFirstDocTemplatePosition();
while (NULL != posdt)
{
CDocTemplate* pdt = pApp->GetNextDocTemplate(posdt);
if (0 == strcmp("CProjectWorkspaceDocTemplate",
pdt->GetRuntimeClass()->m_lpszClassName))
{
POSITION posdoc = pdt->GetFirstDocPosition();
if (NULL == posdoc) break;
CDocument* pdoc = pdt->GetNextDoc(posdoc);
if (NULL == pdoc) break;
szWorkspace = pdoc->GetPathName();
if (0 == szWorkspace.GetLength()) break;
}
}
return szWorkspace;
}
the problem is this code doesn't work for me !!!
the line
POSITION posdt = pApp->GetFirstDocTemplatePosition();
returns null for posdt
i've debug the project restoreclassviewaddin2, and there it works! it returns the full path for the dsw...
can any1 help me here???
thanks in advanced
Yaron
Ask not what your application can do for you,
Ask what you can do for your application
|
|
|
|
|
Hi,
I'm new to COM tech. My few COM experiences are just a few OLE Automation samples in MFC. But now I have a Project that will require me calling an object mtd across machine boundary.
Can I achieve this in MFC 7.0? If yes how?
Thanks in advance!
What would life be without programmers and salesmen?
|
|
|
|
|
Kene wrote:
DCOM/COM+ without ATL?
Why without ATL ?
Christian
I have drunk the cool-aid and found it wan and bitter. - Chris Maunder
|
|
|
|
|
Christian Graus wrote:
Why without ATL ?
My first taste of VC++ some years back was with MFC. I was particular thrilled about the wizards. Since then, I've been used to doing things in MFC style.
You can still help me out by giving me steps I can take to achieve results (either in MFC or ATL).
Surely any advise or help will be appreciated
What would life be without programmers and salesmen?
|
|
|
|
|
Kene wrote:
Since then, I've been used to doing things in MFC style.
As has been pointed out ( and this is where I was headed ), VC7 has a new version of ATL, and there's no reason you can't use it with MFC.
Christian
I have drunk the cool-aid and found it wan and bitter. - Chris Maunder
|
|
|
|
|
MFC7 and ATL7 are best buddies nowadays. At least the source code is hinting it (MFC and ATL shares a lot of code)
--
Intellectualize my blackness[^]
|
|
|
|
|
Does somebody has an idea how it is possible to change button color. I am wondering it does not have such a property.
Raima
|
|
|
|
|
I think 'WM_CTLCOLOR' is helpful to you.
|
|
|
|
|
|
Please prompt me,how to convert the raw WAV data into WMA format?
Which API fuctions are needed?
Rap off for you,for me,for our human.
|
|
|
|
|
hi,
Does movefileex (with DELAY_UNTIL_REBOOT) use registry ? I want to replace the registry hive system on restart with this function (for a backup app).
thanks for any help
regards
hari
Hari Krishnan
|
|
|
|
|
pranavamhari wrote:
Does movefileex (with DELAY_UNTIL_REBOOT) use registry ?
Yes.
Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?
|
|
|
|
|
Hi VC++ experts,
I want to get the full path of a file(For example c:\Mytrial\Sample\Display.txt )by just giving the file name(For example Display.txt)as input
The File may be present at anyone of the drives in my PC (Any random directory path). I want to find the full path of the file by running a C++ or VC++ code from some other drive in the same PC and giving just the file name as input( For example Display.txt ) to the code.
I tried with CFileFind class without success. Any VC++ experts help me by sending some sample code.
By
T.V.Sankar
|
|
|
|
|
Try _fullpath
Tim Smith
I'm going to patent thought. I have yet to see any prior art.
|
|
|
|
|
|
Yes you can do it but in a different concept...
You can get what you want if the file is in the path.. But there could be a problem if more than one file with the same name is in the path.
Any way here is the sol.
1.Get the evironment string path
2.Seperate the string that are ; seperated for each path.
3.Look into that path.
regards.
My God is more powerfull Than Your God. (the line that divides the world)
|
|
|
|
|
While you do provide a solution to a subset of the original problem, a reliable solution is unattainable (as Michael has already pointed out).
Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?
|
|
|
|
|
I stand by my solution again. The original problem can not be solved as micheal has stated i agree with that. But no one had provided any solution. It can not be done is easy to answer but if you can provide solution for atleast part of the problem may be it is what the the original author of the question was looking for.
My God is more powerfull Than Your God. (the line that divides the world)
|
|
|
|
|
Anyone know of a function that will convert romanji (either ascii or unicode) to hiragana???
|
|
|
|
|
|
|
|
|
I have learn Programming in C for 2 years. But, i wonder how to direct the printer to print the output required?(Command in source code.)
|
|
|
|
|
You're wanting to print something, but I can't tell what. Can you elaborate?
Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?
|
|
|
|