Click here to Skip to main content
16,016,178 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: vptr help? Pin
Stuart Dootson12-Jul-09 8:59
professionalStuart Dootson12-Jul-09 8:59 
GeneralRe: vptr help? Pin
«_Superman_»12-Jul-09 16:52
professional«_Superman_»12-Jul-09 16:52 
QuestionNow playing in vc++ Pin
storyera_storyera12-Jul-09 4:51
storyera_storyera12-Jul-09 4:51 
Questionhow to drag a document to a listctrl from desktop for example (mfc) Pin
johnfafa12-Jul-09 2:26
johnfafa12-Jul-09 2:26 
AnswerRe: how to drag a document to a listctrl from desktop for example (mfc) Pin
Stuart Dootson12-Jul-09 5:23
professionalStuart Dootson12-Jul-09 5:23 
GeneralRe: how to drag a document to a listctrl from desktop for example (mfc) Pin
johnfafa12-Jul-09 22:02
johnfafa12-Jul-09 22:02 
GeneralRe: how to drag a document to a listctrl from desktop for example (mfc) Pin
Stuart Dootson12-Jul-09 22:08
professionalStuart Dootson12-Jul-09 22:08 
GeneralRe: how to drag a document to a listctrl from desktop for example (mfc) Pin
Stuart Dootson12-Jul-09 23:38
professionalStuart Dootson12-Jul-09 23:38 
I really must apologise - I completely missed the easy way of doing file drag-drop when I answered you. All you need to do is this:

  1. Call the CWnd::DragAcceptFiles method for your top-level window (e.g. I called it for a dialog window in the dialog's OnInitDialog)
  2. Override and implement the window's CWnd::OnDropFiles method - here's some code I've knocked together that demonstrates how it works:
    void CMyDlg::OnDropFiles(HDROP hDropInfo)
    {
       const UINT nFiles = DragQueryFile(hDropInfo, (UINT)-1, 0, 0);
       std::vector<CString> files;
       for(UINT i=0;i<nFiles;++i)
       {
          CString thisFile;
          const UINT nChars = DragQueryFile(hDropInfo, i, thisFile.GetBufferSetLength(MAX_PATH), MAX_PATH);
          files.push_back(thisFile);
       }
    
       CDialog::OnDropFiles(hDropInfo);
    }


Again - sorry for giving you misleading advise earlier!

Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p

Questionthe parent of exe files in windows Pin
zon_cpp11-Jul-09 22:33
zon_cpp11-Jul-09 22:33 
AnswerRe: the parent of exe files in windows Pin
Stuart Dootson11-Jul-09 23:48
professionalStuart Dootson11-Jul-09 23:48 
GeneralRe: the parent of exe files in windows Pin
zon_cpp12-Jul-09 0:04
zon_cpp12-Jul-09 0:04 
GeneralRe: the parent of exe files in windows Pin
Stuart Dootson12-Jul-09 0:24
professionalStuart Dootson12-Jul-09 0:24 
QuestionA CLASS TO CONTROL SOME BITMAPS [modified] Pin
Dr.FIA11-Jul-09 19:51
Dr.FIA11-Jul-09 19:51 
AnswerRe: A CLASS TO CONTROL SOME BITMAPS Pin
«_Superman_»11-Jul-09 19:53
professional«_Superman_»11-Jul-09 19:53 
QuestionRe: A CLASS TO CONTROL SOME BITMAPS Pin
Dr.FIA11-Jul-09 20:02
Dr.FIA11-Jul-09 20:02 
QuestionRe: A CLASS TO CONTROL SOME BITMAPS Pin
«_Superman_»11-Jul-09 20:15
professional«_Superman_»11-Jul-09 20:15 
QuestionRe: A CLASS TO CONTROL SOME BITMAPS Pin
Dr.FIA11-Jul-09 20:50
Dr.FIA11-Jul-09 20:50 
QuestionI need help about searching and deleting files? Pin
jon ray11-Jul-09 17:47
jon ray11-Jul-09 17:47 
AnswerRe: I need help about searching and deleting files? Pin
Hamid_RT11-Jul-09 19:43
Hamid_RT11-Jul-09 19:43 
AnswerRe: I need help about searching and deleting files? Pin
«_Superman_»11-Jul-09 19:51
professional«_Superman_»11-Jul-09 19:51 
GeneralRe: I need help about searching and deleting files? Pin
jon ray11-Jul-09 20:09
jon ray11-Jul-09 20:09 
GeneralRe: I need help about searching and deleting files? Pin
«_Superman_»11-Jul-09 20:13
professional«_Superman_»11-Jul-09 20:13 
Questiona Class Decleration ?? Pin
csipahi11-Jul-09 14:30
csipahi11-Jul-09 14:30 
AnswerRe: a Class Decleration ?? Pin
Stuart Dootson11-Jul-09 15:18
professionalStuart Dootson11-Jul-09 15:18 
QuestionInterupting a Loop Pin
KinXen11-Jul-09 14:12
KinXen11-Jul-09 14:12 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.