|
I am looking for some code that will copy all the files in one folder to another some where else?
|
|
|
|
|
system("cmd.exe /c xcopy * destination");
Replace destination with the destination of your choice.
|
|
|
|
|
wont that just copy the file cmd.exe not a folder?
|
|
|
|
|
No, it will run CMD.EXE (the command processor) and the /C is perform automatically a command, in this case XCOPY *.* destination.
-- LuisR
──────────────
Luis Alonso Ramos
Chihuahua, Mexico
www.luisalonsoramos.com
"Do not worry about your difficulties in mathematics, I assure you that mine are greater." -- Albert Einstein
|
|
|
|
|
|
Hi, i was looking for it to be a console app? if that is possable because i dont know much about the workings of windows yet
|
|
|
|
|
// main goes here
system("xcopy src dest");
have a look at xcopy syntax (xcopy /?)
Regards,
Venet.
Donec eris felix, multos numerabis amicos.
|
|
|
|
|
|
Hi,
I am trying to call some methods from a dll provided by IBM as part of it's emulator API (PCSAPI).IBM's documentation recommends implicit linking. I lost the original lib file so I made one with with the implib utility that comes with Borland C++ Builder. This works fine in C++ Builder but VC++ says the lib file is corrupted.
[rant]Almost everything works in BCB and alomost nothing works in VC++. I cant use BCB because my company refuses to buy BCB[/rant]
I got a GPF when I tried explicit linking using the procedure name. How can I create a lib file for use with VC++ ?
Sahir
|
|
|
|
|
You could use the LoadLibrary function and get a pointer to the functions you need to call... its not as good as having the .lib but it solves the problem.
Mauricio Ritter - Brazil
Sonorking now: 100.13560 MRitter
|
|
|
|
|
I tried that. I was able to get the procedure address too. But when I tried to call the function I got an access violation. I even tried writing an intermediary DLL in Borland C++ Builder. When I call the intermediary DLL I still get an access violation. This must be why IBM recommends implicit linking. Is there some utility which will create a lib file from a DLL?
|
|
|
|
|
I want to use some compare string functions,so I find strcmp,wcscmp,_mbscmp .It seems that they are case sensetive.How can I manage them that they become case insensitive?For example there is no differenece between "Ma" and "ma" and all M and m be the same?
Mazy
"If I go crazy then will you still
Call me Superman
If I’m alive and well, will you be
There holding my hand
I’ll keep you by my side with
My superhuman might
Kryptonite"Kryptonite-3 Doors Down
|
|
|
|
|
_stricmp()
CPUA 0x5041
Sonork 100.11743 Chicken Little
"So it can now be written in stone as a testament to humanities achievments "PJ did Pi at CP"." Colin Davies
Within you lies the power for good - Use it!
|
|
|
|
|
Thanks.Thats exactly what I want.
Mazy
"If I go crazy then will you still
Call me Superman
If I’m alive and well, will you be
There holding my hand
I’ll keep you by my side with
My superhuman might
Kryptonite"Kryptonite-3 Doors Down
|
|
|
|
|
I have a formview class and I want to catch press key events.I overriden KeyUp and KeyDown in it but it seems that they do not fired when I press keyboard keys.How can I catch press key in my form view class?
Mazy
"If I go crazy then will you still
Call me Superman
If I’m alive and well, will you be
There holding my hand
I’ll keep you by my side with
My superhuman might
Kryptonite"Kryptonite-3 Doors Down
|
|
|
|
|
Those are the correct events. What keys are you trying to catch ? Maybe you need to catch them in your MainFrame ( I would not have thought so, but I can't really remember much MFC )
Christian
We're just observing the seasonal migration from VB to VC. Most of these birds will be killed by predators or will die of hunger. Only the best will survive - Tomasz Sowinski 29-07-2002 ( on the number of newbie posters in the VC forum )
Cats, and most other animals apart from mad cows can write fully functional vb code. - Simon Walton - 6-Aug-2002
|
|
|
|
|
Christian Graus wrote:
Maybe you need to catch them in your MainFrame
No,I want them in my View Class.
Christian Graus wrote:
What keys are you trying to catch ?
I want delete key,but I test them for all of my keys and they didn't fired.
Mazy
"If I go crazy then will you still
Call me Superman
If I’m alive and well, will you be
There holding my hand
I’ll keep you by my side with
My superhuman might
Kryptonite"Kryptonite-3 Doors Down
|
|
|
|
|
Mazdak wrote:
No,I want them in my View Class.
I'm sure you do. I want a million dollars. I am saying that I *think* you may have no choice but to catch them in your mainframe class. I could be wrong, but if I am right, I am saying you're stuck with it. You should probably wait until someone who is still lumbered with MFC can give you a better reply, because as I said, I have not been for some time.
Christian
We're just observing the seasonal migration from VB to VC. Most of these birds will be killed by predators or will die of hunger. Only the best will survive - Tomasz Sowinski 29-07-2002 ( on the number of newbie posters in the VC forum )
Cats, and most other animals apart from mad cows can write fully functional vb code. - Simon Walton - 6-Aug-2002
|
|
|
|
|
Overriding ::PreTranslateMessage may help,
And I swallow a small raisin.
|
|
|
|
|
thanks.It works.
Mazy
"If I go crazy then will you still
Call me Superman
If I’m alive and well, will you be
There holding my hand
I’ll keep you by my side with
My superhuman might
Kryptonite"Kryptonite-3 Doors Down
|
|
|
|
|
Does anyone know how to host the web browser control in an sdi app in the client rectangle using only straight com interfaces? I dont want to use htmlview
|
|
|
|
|
Then pick inside the CHtmlView code, which is MFC code provided in vcdir\mfc,
And I swallow a small raisin.
|
|
|
|
|
put the webbrowser control to the window.
classwizard generates a wrapper class for the ActiveX object.
it's usually called WebBrowser2
use its Create method to put it on the window
|
|
|
|
|
Hi all,
I have a dialog based application in which i'm loading a picture in to a static control during run time using the load image function.The problem is that after displaying the image, if i minimise and then maximise my dialog or if i switch over focus to another window and come back to my dialog the picture from my dialog dis appears. The code used for displaying bitmap is given below.Can anyone tell me what's wrong with this?
##########################################
//In Dialog Header
RECT rectStaticClient;
CDC m_dcMem; // Compatible Memory DC for dialog
HBITMAP m_hBmpOld; // Handle of old bitmap to save
HBITMAP m_hBmpNew; // Handle of new bitmap from file
BITMAP m_bmInfo; // Bitmap Information structure
CPoint m_pt; // Position for upper left corner of bitmap
CSize m_size;
##########################################
CMyDialog::OnInitDialog()
{
CClientDC dc(this);
m_dcMem.CreateCompatibleDC( &dc );
return true;
}
##########################################
CMyDialog::OnDisplay()
{
m_st3.GetClientRect( &rectStaticClient );
m_size.cx = rectStaticClient.right; // zero based
m_size.cy = rectStaticClient.bottom; // zero based
m_st3.ClientToScreen( &rectStaticClient );
ScreenToClient( &rectStaticClient );
m_pt.x = rectStaticClient.left;
m_pt.y = rectStaticClient.top;
CClientDC dc(this);
GetObject( m_hBmpNew , sizeof(BITMAP), &m_bmInfo );
VERIFY(m_hBmpOld = (HBITMAP)SelectObject(m_dcMem, m_hBmpNew ) );
dc.StretchBlt( m_pt.x, m_pt.y, m_size.cx, m_size.cy,
&m_dcMem, 0, 0, m_bmInfo.bmWidth-1, m_bmInfo.bmHeight-1,
SRCCOPY );}
With regards
|
|
|
|
|