|
Where/What is "CopyFile" - not in VC7++ nore internal/external of cmd.exe for Win2k.
|
|
|
|
|
MSDN :
BOOL CopyFile(
LPCTSTR lpExistingFileName,
LPCTSTR lpNewFileName,
BOOL bFailIfExists
);
Parameters
lpExistingFileName
Pointer to a null-terminated string that specifies the name of an existing file.
lpNewFileName
Pointer to a null-terminated string that specifies the name of the new file.
bFailIfExists
Specifies how this operation is to proceed if a file of the same name as that specified by lpNewFileName already exists. If this parameter is TRUE and the new file already exists, the function fails. If this parameter is FALSE and the new file already exists, the function overwrites the existing file and succeeds.
Return Values
If the function succeeds, the return value is nonzero.
If the function fails, the return value is zero. To get extended error information, call GetLastError .
I'm quite sure this will be in VC7++ also
~RaGE();
|
|
|
|
|
dear all,
how do i get the Handle of a window which is started due to CreateProcess(...)
also, can i get the handles to all the child windows of this window
thanx all
|
|
|
|
|
Retrieve the information from the LPPROCESS_INFORMATION used in Create_Process, and use them as parameter from OpenProcess, which retrieves a HANDLE.
To retrieve the child windows, you can use :
CWnd* GetWindow( UINT nCmd ) const;
~RaGE();
|
|
|
|
|
You can get the handle of the primary thread of the newly created process from the LPPROCESS_INFORMATION.
By using the handle of the Window, you can enumerate all the child windows by using the FindWindowEx() API.
[ It is possible to represent everything in this universe by using 0 and 1 ]
|
|
|
|
|
Hi Friends,
i have created an exe and a dll.. the dll will be loaded initially.. it's an MDi application.. i would like to update the main menu whenever a window is opened... let me know how o handle this situation..
regards,
naveen
|
|
|
|
|
The menu's displayed in the MDI are kept in the CDocTemplate::m_hMenuShared member var of the CDocTemplate objects you registered in the InitInstance of your application. If you want to modify these, you need to pass the HMENU in that variable to a function in the DLL which will modify the menu and add/remove the required menu options.
An article of mine may be of interest here:
Plug in architecture for MFC[^] This handles MDI apps and menu modifications etc.
Roger Allen
Sonork 100.10016
Were you different as a kid? Did you ever say "Ooohhh, shiny red" even once? - Paul Watson 11-February-2003
|
|
|
|
|
Hi,
I am developing with Visual C++.NET on XP, and want to build a version to run on Win98. The software crashes on startup in 98.
Does anyone know where I can look for information on this?
I am using the Setup utility and am not sure if I need to include different versions of the C Run Time libraries for the Win 98 install. At the moment I am installing MSCVR70D.dll and VC_CRT.msm because these are the detected dependencies.
Thanks,
Joanne
|
|
|
|
|
MSCVR70D.dll is a debug-build library, is this the intent? Do you install debug version of your application? You may send me the EXE and/or the installation package if you want me to resolve this problem.
Regards,
BB
|
|
|
|
|
You can buy, download,... the software from IBM: "Rational Purify Plus 2002 5.20.468" it has a function that tells you which functions are allowed in each OS that you tell him...
P.E.: if you tell him to an alyse your software for win98 it will tell you if there are functions not allowed.
Hope this helps.
|
|
|
|
|
Thanks, I will try that out. If I still have no luck I will send BB the files to analyse.
Joanne
|
|
|
|
|
I want to rename a directory which is not empty.But I met a very strange problem.The function run well sometime and failed sometimes?
Whe it is failed,there will be a shared error.how can I resolved it?I am eager to do this job.Thank you very much.
I am I,Who is who,I am who,Who am I
|
|
|
|
|
I suspect a program may be accessing a file or more in that directory.
Kuphryn
|
|
|
|
|
am a newby to c++ and need to write a program with a 1-D array that generates random numbers. the users must be able to specify the number of random number (is this possible?) and the program must then generate "x" random numbers (negative numbers included). any help would be truly appreciated.
cheers

|
|
|
|
|
Sounds like you want to generate a list of radom numbers given a user supplied size.
#include "stdlib.h"
int* CreateArrayOfRadomNumbers(int nSize)
{
int* pArray = new int[nSize];
if( NULL == pArray )
return NULL;
for( int i=0; i<nsize; ++i="" )
="" {
="" parray[i]="rand();
" }
="" return="" parray;
}
<pre\="">
|
|
|
|
|
Just remember to be sure to delete your array when you're don as to avoid any memory leaks!!!
i.e.
void foo()
{
int* myArray = CreateArrayOfRadomNumbers(12);
delete[] myArray;
}
- Nitron
"Those that say a task is impossible shouldn't interrupt the ones who are doing it." - Chinese Proverb
|
|
|
|
|
I think you just did his homework for him
Gary Kirkham
A working Program is one that has only unobserved bugs
I thought I wanted a career, turns out I just wanted paychecks
|
|
|
|
|
thank you so much.. i am truly in your debt..
"It has something to do with luck, a lot to do with our grit and our fight, but for whatever reason, we're a tough team to put out," - Kobe Bryant, LA Lakers..
|
|
|
|
|
Hello,
I'm working on a project that has an About box with a System Info tab. The current code to retrieve Windows version is a few years out of date, and only covers 3.1, 95, 98, and NT; my XP shows up as NT. How can I update this to also correctly show Me, 2000, and XP?
Thanks!
Elisabeth
-----
CString str, str2, str3;
char szBuf[100];
DWORD dwPlatform, dwMajor, dwMinor;
m_sysinfo.GetWindowsVersion( &dwPlatform, &dwMajor, &dwMinor );
str = "";
switch( dwPlatform )
{
case VER_PLATFORM_WIN32s:
str += "Win32s on Windows 3.1 ";
break;
case VER_PLATFORM_WIN32_WINDOWS:
str += "Windows ";
if( dwMinor == 0 )
{
str += "95 ";
BOOL bVal = 0;
m_sysinfo.IsOSR2( &bVal );
if( bVal )
{
str += "OSR2 ";
}
}
else if( dwMinor == 1 )
str += "98 ";
break;
case VER_PLATFORM_WIN32_NT:
{
str += "Windows NT ";
BOOL bVal = 0;
m_sysinfo.IsNTServer( &bVal );
if( bVal )
{
str += "Server ";
}
}
break;
default:
str += "Unknown ";
}
|
|
|
|
|
|
|
|
at the release of VS.NET 2003 they demo'd how you could use the IDE form editor with C++ projects now, including all that cool anchoring stuff. My understanding is that this is only available for managed C++ projects, not for MFC. Is this right?
|
|
|
|
|
Unfortunately, that is true. But you can use unmanaged code in a managed project. I haven't gotten into that yet.
Do Lipton employees get coffee breaks?
|
|
|
|
|
Hello...I have a form with some edit controls boxes and buttons. There are two modes (1 and 2). In mode 1 some edits controls should be available for editing, and a button visible and available; and other controls should be unavailable for editing and another button not visible.
Changing to mode 2 invert the availability.
My problem is that I do not know if this is possible to do it at runtime. If this is possible, how do I do it?
I know where to put the code to enable and unenable the controls, but I would like to know what are the visual c++ statements to do this.
Can anyone give me a hand?
What I meant is how can I change the edit control styles and button control styles, specifically WS_TABSTOP and WM_ENABLE? This at run time
Thanks
Eric Manuel Rosales Pena Alfaro
PhD student
Unversity of Essex
Wivenhoe Park
Colchester, CO4 3SQ
Essex, Uk
email: emrosa@essex.ac.uk
tel: +44-01206-87311
|
|
|
|