|
I am doing exactly the same thing as you suggested, however its not working out
|
|
|
|
|
So just to be clear here are the settings I'm using to get this to work
(for the Release configuration)
Configuration Properties->General
Output Directory = Release
Intermediate Directory = Release
Configuration Properties->C/C++
Object File Name = $(IntDir)/
Configuration Properties->Linker->General
Output File = $(ProjectDir)OutPut/$(ProjectName).exe
Is that what you're using?
|
|
|
|
|
in short I want to automatically copy files needed for my application from a central "repository" to the output folder (debug or release )of my application when it is build, and also, if the application is build, and a file is changed in the "repository" copy the modified file to the output folder of the application.
I have a custom build command in my VC6 project that does a xcopy of some files to the output directory of my project.
in VC6 :
command :
copy $(InputPath) $(IntDir)\$(InputName).exe
xcopy /D /e /y C:\folder\*.* ..\..\bin\debug\
output :
$(IntDir)\$(InputName).exe
..\..\bin\debug\
if I try to do the same thing in VS.net 2003, in the I get the following error :
my_project : error PRJ0032 : The 'Outputs' property for the project-level custom build step contained '..\..\bin\debug\' which evaluates out to '..\..\bin\debug\'.
Am I doing the right thing at the right place ?
Thanks.
Maximilien Lincourt
Your Head A Splode - Strong Bad
|
|
|
|
|
Do you know what the current directory is when the custom build step is executed? I would guess the current directory when executed in VC6 is different than VC2003.
One thing you could try is hard-code "..\..\bin\debug\" to the full path and see if that works.
|
|
|
|
|
I've got a problem.
I Want that when you press the button (see link plz) open a pdf file with the instructions of use.
http://www.imagecash.net/image.php?file=265709030
I can open file use this code
<br />
ShellExecute(this->m_hWnd,"open",<br />
"C:\\motor.pdf","","",SW_SHOW );
But this program is to use for many people, and the path changes computer to computer.
How can I solve this?
How can I make a setup that includes MFC files with microsoft visual studio 6?
thx
|
|
|
|
|
You can open the file Open dialog
Ask the user to select the file to open
Get the path from that fileopen dialog.
and then use ShellExecute with that path
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
Holy cow !! When posting, inform people that your link contains not worksafe contents !
marcogja wrote: But this program is to use for many people, and the path changes computer to computer.
That seems logical no ? It won't start a search on your computer to find the required file. Supply the file with the program and put it in a specific folder where it can be found, that's the standard solution.
marcogja wrote: How can I make a setup that includes MFC files with microsoft visual studio 6?
Does that have something to do with your previous question ? If yes, I don't understand.
Cédric Moonen
Software developer
Charting control
|
|
|
|
|
marcogja wrote: can open file use this codeShellExecute(this->m_hWnd,"open","C:\\motor.pdf","","",SW_SHOW );
either keep that path in any inifile or ask user about file path when ever you Application run!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
J have an application in MFC. There is one dialog window.
I want to hide the icon "close" which is inthe right upper corner of the window. What I have to do in my programm?
Regards
|
|
|
|
|
take the properties of the dialog in resources..
in the style tab uncheck the System menu check box..;)
nave
|
|
|
|
|
Yes, I know, thank you, but I want to know how to do it in the code source.
Regards
|
|
|
|
|
When u want to remove the close menu.
write
ModifyStyle( WS_SYSMENU,0 );
nave
|
|
|
|
|
When you want the Sysmenu to be visible
SetWindowLong(GetSafeHwnd(),GWL_STYLE,WS_SYSMENU | GetWindowLong(GetSafeHwnd(),GWL_STYLE));
RedrawWindow(NULL, NULL,RDW_ERASE | RDW_INVALIDATE | RDW_FRAME | RDW_ALLCHILDREN); When you don't want the Sysmenu to be visible
SetWindowLong(GetSafeHwnd(),GWL_STYLE,~WS_SYSMENU & GetWindowLong(GetSafeHwnd(),GWL_STYLE));
RedrawWindow(NULL, NULL,RDW_ERASE | RDW_INVALIDATE | RDW_FRAME | RDW_ALLCHILDREN); Hope this helps you
Knock out 'T' from CAN'T ,
You 'CAN' if you think you 'CAN'
|
|
|
|
|
i am trying to read the path of installation of adobe acrobat from the registry( is there any other way), in order to launch it in my program. i have tried RegQueryInfoKey to get the value from
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\AppPaths\AcroRd32.exe
from the default string in this key. were the path is.
but i am unable to read the value.
please help
|
|
|
|
|
Hi,
In which way do you want to read out any value using RegQueryInfoKey ?
To read value use RegQueryValueEx.
-----------
Mila
|
|
|
|
|
thanks for pointin out... but i have used RegQueryValueEx as well. but i am not sure if i am doin it correctly.
but nothin worked.
|
|
|
|
|
HKEY hKey = NULL;
LONG lRet = NULL;
char szProductType[1024] = { '\0' };
DWORD dwBufLen=1024;
lRet = RegOpenKeyEx( HKEY_LOCAL_MACHINE, "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\App Paths\\AcroRd32.exe", 0, KEY_QUERY_VALUE, &hKey );
if( lRet != ERROR_SUCCESS ) return FALSE;
lRet = RegQueryValueEx( hKey, "", NULL, NULL, (LPBYTE) szProductType, &dwBufLen);
RegCloseKey( hKey );
It has to work properly - if not check which error codes returns RegOpenKeyEx & then RegQueryValueEx.
-----------
Mila
|
|
|
|
|
i tried that too. the return valur in both the function is 2 and the data in szProductType is 00000s. i am usin RegQueryInfoKey funtion before the code sent by u. is that an error?
|
|
|
|
|
check that registry path looks like:
"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\App Paths\\AcroRd32.exe"
and NOT
"SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\AcroRd32.exe"
- this is very popular mistake
-----------
Mila
|
|
|
|
|
this is how i am usin it:
lRet = RegOpenKeyEx( HKEY_LOCAL_MACHINE, (LPCWSTR)("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\App Paths\\AcroRd32.exe"), 0, KEY_QUERY_VALUE, &hKey );
lRet = RegQueryValueEx( hKey, (LPCWSTR)"", NULL, NULL, (LPBYTE) szProductType, &dwBufLen);
as the complier was givin error for the 2nd parameter in both the functions in had to include (LPCWSTR) as a type castin measure
there was an pointer in the szProductType but in it was an array of zeros.
|
|
|
|
|
if you using UNICODE version of functions you should give wide text path:
lRet = RegOpenKeyEx( HKEY_LOCAL_MACHINE, (LPCWSTR)(L"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\App Paths\\AcroRd32.exe"), 0, KEY_QUERY_VALUE, &hKey );
the same thing will be in case RegQueryValueEx. In wide version
lRet = RegQueryValueExW( hKey, L"", NULL, NULL, (LPBYTE) szProductType, &dwBufLen);
... and all ... good luck!
-----------
Mila
|
|
|
|
|
iLL eFFect wrote: i am trying to read the path of installation of adobe acrobat from the registry( is there any other way),
Why not just use AssocQueryString(..., ".pdf", "open", szPath, ...) ?
"The largest fire starts but with the smallest spark." - David Crow
|
|
|
|
|
please elaborate on that. i dont know how to use it.
|
|
|
|
|
|
iLL eFFect wrote: AcroRd32.exe
is it Key or Data from which you have to reterive value!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|