|
|
I've been looking through some documentation recently but I couldn't find a way to make a shell extension managing the 'paste' message.
If you have a link to some helpful doc, I would be really grateful.
The goal is to manage the copies in a more advanced way,
like in this example :
http://supercopier.sfxteam.org/uploads/scdeplier.png
I've already done something like this in an old project of mine (a minimalistic file explorer), but this time I want it to be in Windows' file explorer.
Thanks in advance, and happy 4th of July to all Americans
|
|
|
|
|
Hi, All
I want to do this actions
My frame has spliter contains three view ( view 1, view 2, view 3)
when resize frame or scroll spliter i want to fix view 3, only resize view 1 or view 2.
please, tell me how to do this.
thank for reading.
.: Your success is also mine :.
|
|
|
|
|
Hi all,
From CDialog i have to Show a CFormView. How we can achieve this.
please help me out.
Uday.
|
|
|
|
|
Uday Janaswamy wrote: From CDialog i have to Show a CFormView. How we can achieve this.
What do you mean? Is your application dialog based, sdi or mdi?
|
|
|
|
|
hi chen,
i have to show a FormView from CDialog. By Default CDialog is Created by me by the wizard. then i derived a CFormView and respective Class for that view.
Now i have to show the Form View which i have created.
please let me know if you can.
thanks,
uday.
|
|
|
|
|
You can add one frame on dialog and create view with CFormView
same:
pMainFrame = (CFrameWnd*) RUNTIME_CLASS(CFrameWnd)->CreateObject();
CSingleDocTemplate* pDocTemplate;
pDocTemplate = new CSingleDocTemplate(128,
RUNTIME_CLASS(CDocument),
RUNTIME_CLASS(CFrameWnd),
RUNTIME_CLASS(CFormView));
CCreateContext sContext;
sContext.m_pCurrentDoc = (CDocument*) RUNTIME_CLASS(CDocument)->CreateObject();
sContext.m_pCurrentFrame = NULL;
sContext.m_pLastView = NULL;
sContext.m_pNewDocTemplate = pDocTemplate;
sContext.m_pNewViewClass = RUNTIME_CLASS(CFormView);
m_pMainFrame ->Create(strCssEditorClass, _T(""), WS_CHILD, CRect(0,0,1,1), this, NULL, 0, &sContext);
pMainFrame ->MoveWindow(0,0,200,200);
pMainFrame ->ShowWindow(SW_SHOW);
// OnInitDialog()
.: Your success is also mine :.
|
|
|
|
|
hi,
i am getting null value when i use the above code please help me out.
//================================================================
CFrameWnd *pMainFrame = (CFrameWnd*)RUNTIME_CLASS(kiranfrm)->CreateObject();
if(pMainFrame->m_hWnd == NULL)
{
//I am getting Null value here so i cant able to create a Handle.
}
//================================================================
Steps what i have done.
1) Create a Dialog and place a Button and in the Click even i pasted what you have mentioned.
2) Create a CForm and create CFormClass,CFormDoc Class,CFrameWnd Class.
//here is the Total Code please see it
CFrameWnd *pMainFrame = (CFrameWnd*)RUNTIME_CLASS(kiranfrm)->CreateObject();
if(pMainFrame->m_hWnd == NULL)
{
MessageBox("hellow");
return ;
}
CSingleDocTemplate* pDocTemplate;
pDocTemplate = new CSingleDocTemplate(128,
RUNTIME_CLASS(kirandoc),
RUNTIME_CLASS(kiranfrm),
RUNTIME_CLASS(kiran));
CCreateContext sContext;
sContext.m_pCurrentDoc = (CDocument*) RUNTIME_CLASS(kirandoc)->CreateObjec();
sContext.m_pCurrentFrame = NULL;
sContext.m_pLastView = NULL;
sContext.m_pNewDocTemplate = pDocTemplate;
sContext.m_pNewViewClass = RUNTIME_CLASS(kiran);
pMainFrame ->Create("", _T(""), WS_CHILD, CRect(0,0,1,1), this, NULL, 0, &sContext);
pMainFrame ->MoveWindow(0,0,200,200); //Error
pMainFrame ->ShowWindow(SW_SHOW); //Error
because m_hWnd is NULL.
-- modified at 9:09 Tuesday 4th July, 2006
|
|
|
|
|
Sorry !
you add this code
CString strClass= AfxRegisterWndClass(CS_VREDRAW|CS_HREDRAW, ::LoadCursor(NULL, IDC_ARROW), (HBRUSH)::GetStockObject(WHITE_BRUSH), ::LoadIcon(NULL, IDI_APPLICATION));
pMainFrame ->Create(strClass, _T(""), WS_CHILD, CRect(0,0,1,1), this, NULL, 0, &sContext);
pMainFrame ->MoveWindow(0,0,200,200);
pMainFrame ->ShowWindow(SW_SHOW);
Huynhnb
.: Your success is also mine :.
|
|
|
|
|
hi,
You are really great. Keep it up!!!!!!!!!!!!!.
uday.
|
|
|
|
|
Hi,
Every thing is Ok, But with this Code i am only able to see the Form View Embeded in the Dialog. Could you please provide me the solution for showing in different Window.
Here is the Code.
//========================================================================
void CMydlgDlg::OnButton1()
{
CFrameWnd *pMainFrame = (CFrameWnd*)RUNTIME_CLASS(kiranfrm)->CreateObject();
CSingleDocTemplate* pDocTemplate;
pDocTemplate = new CSingleDocTemplate(IDI_ICON1,
RUNTIME_CLASS(kirandoc),
RUNTIME_CLASS(kiranfrm),
RUNTIME_CLASS(kiran));
CCreateContext sContext;
sContext.m_pCurrentDoc = (CDocument*) RUNTIME_CLASS(kirandoc)->CreateObject();
sContext.m_pCurrentFrame = NULL;
sContext.m_pLastView = NULL;
sContext.m_pNewDocTemplate = pDocTemplate;
sContext.m_pNewViewClass = RUNTIME_CLASS(kiran);
CString strClass= AfxRegisterWndClass(CS_VREDRAW|CS_HREDRAW, ::LoadCursor(NULL, IDC_ARROW), (HBRUSH)::GetStockObject(WHITE_BRUSH), ::LoadIcon(NULL, IDI_APPLICATION));
pMainFrame ->Create(strClass, _T(""), WS_CHILD, CRect(0,0,1,1), this, NULL, 0, &sContext);
pMainFrame ->MoveWindow(200,100,300,300);
pMainFrame ->ShowWindow(SW_SHOW);
}
//========================================================================
Please help me out.
Uday
|
|
|
|
|
if you want to go from one dialog to CFormView see
CFrameWnd* pFrame = (CFrameWnd*)AfxGetApp()->m_pMainWnd;<br />
CPictureView* pView = (CPictureView *) pFrame->GetActiveView();
and use from pView->variables or functions
whitesky
|
|
|
|
|
Hello
I have a webcam and I want to get and save a snapshot from it to a .bmp file,do you know how can I do it?
thanks
|
|
|
|
|
DirectShow? You can have a look at the AMCap sample that comes with the SDK. You can just connect up the Capture filter -> Sample Grabber filter -> Null Renderer to get a bitmap from the Sample Grabber. There are various articles on DirectShow on CodeProject, just look them up.
|
|
|
|
|
hello
i have edit control in one dialog and i want to display this edit control value in the other dialog box edit control on buton click.
i have use this code.
Button is in First Dialog Box.
void CTeltikDlg::OnBnClickedButton1()
{
CString str;
GetDlgItemText(IDC_EDIT1,str);
Cdlgbox dlg;
dlg.DoModal();
dlg.SetDlgItemText(IDC_EDIT1,str);
}
but its giving Assertion Error.
what i have to use.
thanx
|
|
|
|
|
Use CMain* pmain=(CMain*)GetParent();
pmain->GetDlgItemText(IDC_EDIT1,str);
etc.....//Main is the class from where you are calling this second dialog
I haven't tried this code on the machine right now but hope it works and helps you
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
thanx
but i think there is aproblem i use this code like this
CString str;
GetDlgItemText(IDC_EDIT1,str);
Cdlgbox dlg;
dlg.DoModal();
CTeltikDlg* pmain=(CTeltikDlg*)GetParent();
pmain->GetDlgItemText(IDC_EDIT1,str);
CTeltikDlg ---- its a my first Dialog Class name.
its not showing the text even though when i close the second dialog it give me Assertion Error Too.
|
|
|
|
|
CTeltikDlg* pmain=(CTeltikDlg*)GetParent(); pmain->GetDlgItemText(IDC_EDIT1,str);
// Use this code in the second dialog. Do not forget to include the header file for the first dialog
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
hi
thanx for replying me.
its working now
thank u very much.
|
|
|
|
|
Hi Aashish
i will u the answer but one thing which i want ot clear to u that we r not very far.
i'm from Delhi.can i get ur email id or cell no.so we can be a gud friend.becoz i like people of my field.
my person id is
amit_avesh@yahoo.co.in
now back to ur question
i'm not getting why r u not getting answer.i have defined in the OninDialog of the other class.
or tell me what u exactly want to do.
thanx
|
|
|
|
|
The most straightforward way is to store the value in your edit control variable of your second dialog. e.g.
Cdlgbox dlg;
dlg.m_sEditControlValue = str;
dlg.DoModal(); And in OnInitDialog() method of your second dialog, you have to set the value into the edit box by calling SetWindowText(...) or another easy way is just to call UpdateData(FALSE).
|
|
|
|
|
Hi,
I am trying to make a custom treeview in C++ to display the shell's namespace.
It works great for all folders except physical drives and remote or network folders. I can't get the correct icons for these folders. I am using the following code snippet to load the icons for the specified folder: (Only need to obtain the icon index)
//Retrieve the icon closed for the folder
if(SHGetFileInfo((LPCSTR)lpItemIDList1,0,&fileInfo,sizeof(SHFILEINFO),SHGFI_PIDL|SHGFI_SMALLICON|SHGFI_SYSICONINDEX)==NULL)
{
lpMalloc->Free(lpItemIDList1);
lpEnumIDList->Release();
if(lpSubFolder)
{
lpSubFolder->Release();
}
return FALSE;
}
lpTreeNode->ImageIndex=fileInfo.iIcon;
//Retrieve the icon opened for the folder
if(SHGetFileInfo((LPCSTR)lpItemIDList1,0,&fileInfo,sizeof(SHFILEINFO),SHGFI_OPENICON|SHGFI_PIDL|SHGFI_SMALLICON|SHGFI_SYSICONINDEX)==NULL)
{
lpMalloc->Free(lpItemIDList1);
lpEnumIDList->Release();
if(lpSubFolder)
{
lpSubFolder->Release();
}
return FALSE;
}
lpTreeNode->SelectedIndex=fileInfo.iIcon;
The pointer lpItemIDList1 points to a piddle that contains the absolute location of the specified folder. (Relative to the root aka desktop folder)
I am only trying to display folders.
Thanks
|
|
|
|
|
I am trying to read from a text file and output the data to a CSV file. Can anybody help me with this please?
Cheers Phil
|
|
|
|
|
Are you using MFC? Then go though the class CStdioFile, which gives easy functions to read and write text files.
|
|
|
|
|
I'm using Visual C++. Would it work in the same way?
|
|
|
|
|