/* Yritys käyttää Drop-viestejä. */ #define wm_querydropobject 0x22b // Create drop-file memory block and initialize it ScreenToClient(hWndSubject, &ptMousePos); hDrop = DragCreateFiles(&ptMousePos, 0*fInNonClientArea); if (hDrop == NULL) { MessageBox(hWnd, "Insufficient memory to drop file(s).", _szAppName, MB_OK); return 0; } // Append each full pathname to // the drop-file memory block for (x = 0; x < wNumFiles; x++) { GetSinglePathName(szAllFileNames, x, szDropPathName, sizeof(szDropPathName)); // Append pathname to end of drop-file memory block hDropT = DragAppendFile(hDrop, szDropPathName); if (hDropT == NULL) { MessageBox(hWnd, "Insufficient memory to drop file(s).", _szAppName, MB_OK); GlobalFree(hDrop); hDrop = NULL; return 0; } else { hDrop = hDropT; } }