|
int SHFileOperation( LPSHFILEOPSTRUCT lpFileOp
);
|
|
|
|
|
Thank u zhang.I'm using SHFileoperation but it says "Cannot copy file.Filename is too long". My folder name is only 8 characters.What could be the problem?
Thanks,
Dipeka
Dipeka.A.J
|
|
|
|
|
SHFILEOPSTRUCT FileOp;
FileOp.hwnd=m_hWnd; //设置句柄
//设置操作方式,拷贝用FO_COPY,删除用 FO_DELETE
FileOp.wFunc=FO_COPY;
FileOp.pFrom="E:\\11"; //源文件路径
FileOp.pTo="E:\\22"; //目标文件路径
FileOp.fFlags=FOF_ALLOWUNDO; //允许恢复
FileOp.hNameMappings=NULL;
FileOp.lpszProgressTitle="copy"; //设置标题
SHFileOperation(&FileOp); //执行外壳拷贝
|
|
|
|
|
pFrom and pTo should be double NULL terminated.
http://blog.joycode.com/jiangsheng
http://blog.csdn.net/jiangsheng
Command what is yours
Conquer what is not
---Kane
|
|
|
|
|
hi
if u dont want to use SHFileOperation.
U can use CFileFind & CopyFile()
Jetli
Constant Thing In World Is Change.
|
|
|
|
|
I just want to make a about dialog which very like Adobe Reader's about dialog. So I want to make a auto smooth roll edit control's text.
But use the SendMessage(m_edit.GetSafeHwnd(), EM_LINESCROLL, 0, 1) only could roll the text one line by one line. How can I make the roll smooth, just like the adobe reader's about dialog?!
Pls any comment is welcome! Thanks a lot.
|
|
|
|
|
There are scrolling text controls on this site, or you can write your own.
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|
|
Yes, I have found the CreditsDlg which is a terrific about dialog!!
|
|
|
|
|
I'm creating a simple MFC dialog based app for an installer. I've created images to put in the installer, and written code to load the images ( which are imported as resources from bmp files ), etc. But when I finally went to compile, I got these errors:
RDCInstaller fatal error LNK1123: failure during conversion to COFF: file invalid or corrupt
RDCInstaller fatal error CVT1100: duplicate resource. type:BITMAP, name:-1, language:0x0C09
and when I check the resources, I find my three bitmaps have all been renamed to "-1". I've looked at the .rc file, and nothing seems amiss ( at least not according to my distant memories on the subject ).
Does anyone have any idea what may be going on here ?
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|
|
Fixed it. Dunno what was going on, but I removed and readded resources a few times and it worked. When I clicked on the resource name initially, it was changing them all to the same name, I reckon that had something to do with it. Sucks tho.
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|
|
Does any one can help me to implement saving a single document in vc++,which in turn will save many other documents which are child to the previous.And ofcourse, the parent document will be able to be opened later on but not the child directly.On opening the parent document it should take care to open the child documents as needed to serve any specific event.
|
|
|
|
|
Any one can show me step wise how to implement a double right click on a specified item in vc++(in single document MFC application).
|
|
|
|
|
simple wise :
press "ctrl + w" into MFC ClassWizard , selected the project and class name , objects id which you will added the message in Message Maps tab . select WM_RBUTTONDBLCLK and press add Function .
OR , write code
in .h
/////////////////////.....
afx_msg void OnRButtonDblClk(UINT nFlags, CPoint point);
.........................
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
in cpp
...........
ON_WM_RBUTTONDBLCLK()
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
sorry for my poor english
|
|
|
|
|
I am trying to use a template class :
.h file
template <typename T>
class MyList
{
public:
MyList();
virtual ~MyList();
bool Insert(T **head, T *newNode);
private :
T *next;
int size;
};
.cpp file
#include "MyList.h"
template <typename T>MyList<T>::MyList()
{
}
template <typename T>MyList<T>::~MyList()
{
}
template <typename T>bool MyList<T>::Insert(T **head, T *newNode)
{
if(newNode==NULL)
return false;
r
if(*head==NULL){
*head = newNode ;
*head->next =NULL;
}
else{
T *temp;
temp=*head;
while(temp->next){
temp=temp->next;
}
temp->next=newNode;
newNode->next=0;
}
return true ;
}
Now i try to use this outside :
#<code>include <iostream.h>
#include "Project.h"
#include "MyList.h"
void main()
{
MyList<int> t1;
}</code>
I get a linker error :
Linking...
main.obj : error LNK2001: unresolved external symbol "public: virtual __thiscall MyList<int>::~MyList<int>(void)" (??1?$MyList@H@@UAE@XZ)
main.obj : error LNK2001: unresolved external symbol "public: __thiscall MyList<int>::MyList<int>(void)" (??0?$MyList@H@@QAE@XZ)
Debug/CEepromParserTest.exe : fatal error LNK1120: 2 unresolved externals
I dont know what is wrong here !
|
|
|
|
|
|
In addition, iostream.h is not standard C++. You should include iostream. Same goes for just about all standard headers.
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|
|
Hi all,
I'm thinking how to do a localization of dialogs of quite a big MFC project in VS6. I was searching msdn and also this message board, but I did not find exactly what I was looking for.
Here is the situation:
I did extract more than thousand of strings from the dialogs that I need to translate. I made nice .h file like this:
...
#define IDL_1 "string_one"
#define IDL_2 "string_two"
...
Then I did put these IDL_xxx instead of strings into .rc files. Everything went fine until I made a change to some dialog. When I made a change in the dialog (eg. I changed caption of a window and saved the dialog), VS then replaced all my IDL_xxx in the .rc file with strings from my .h file (this file contains all my strings). So if I make a change to this .h file that change will no longer reflect in this .rc file and I have to extract strings from this .rc file again and put those IDL_xxx back again and so on.
So instead of
...
LTEXT IDL_23, IDC_STATIC,128,
...
VS did put string:
...
LTEXT "Number of inputs:",IDC_STATIC,128,
...
Is there some way how to prevent VS doing this ? (because it is not a problem if VS changed just the string I edited, but the problem is that VS6 did replace all my IDL_xxx in the whole .rc file)
Or is there any way how to do it some other way? Imagine you have a file with strings and you want to put this strings into dialogs (.rc files)
My idea was to use one file for one language and one for the other one. So I made one file lang_eng.h and lang_cz.h and one file lang_select.h where I choose which language I want to use for compilation using #ifdef etc.
I also read something about string tables but I didn't find a way how to connect this strings from string tables to my dialogs.
Any ideas?
rasto
|
|
|
|
|
|
Do you mean creating different file with strings for each .RC file?
Anyway, I have tried this, and it did not solved the problem of automatic replacing IDL_xxx with strings.
Maybe there is another way how to do it. I can put all strings to string table(s) and then connect these strings somehow with my controls,labels etc. on my dialogs. But I dont know how to connect these strings from string table(s) to my controls on the dialogs (texts on buttons etc), because when I edit dialogs in resource editor I can change eg. string on the button OK, but I dont know how to use the strings from string table.
Any help?
thanks,
rasto
|
|
|
|
|
rastompk wrote:
But I dont know how to connect these strings from string table(s) to my controls on the dialogs
you can always do it manually:
CString csLabelText;
csLabelText.LoadString(buttonLabelID);
pCtrl->SetWindowText(csLabelText);
Image Toolkits | Image Processing | Cleek
|
|
|
|
|
thanks, and but I have one more question. How can I easy access (actually, I just need to change the text on the control) my controls on the dialog which I create using .RC file? I mean I know there is classwizard, but is there a way how to do it simplier? Because imagine that I have more than thousand strings I want to change.
|
|
|
|
|
Hi all,
How does RDP render client keyboard and mouse events on the server side and how does it send desktop image from server to client. I know these are thru virtual keyboard, mouse drivers and video driver but are the virtual drivers associated with each interactive window station?? Can nybody help me this?? BTW is there any website which can be of any help for me.
|
|
|
|
|
|
hi!
can anybody give me a hint how i can check if my cddrive is currently burning a disc? i know win xp comes with an api to burn discs, but is there a notification of some kind when the cddrive starts burning? thanx
|
|
|
|
|
search MSND with keyword MCI.
|
|
|
|