OSDGetNextPathName
AndFileHBITMAP

This function allows getting full path to the next selected file in the list and loads the image from it.

OSDRET OSDGetNextPathNameAndFileHBITMAP »
(HANDLE hDialog, OSD_POSITION* pos, char* buf, »
int* size, HBITMAP* hBmp);

* The red "»"mark in the sample means line folding. This is only done for convenient display of the source code at our website. When reproducing this sample, delete this mark and join the code lines separated by it.

Parameters

  • hDialog - Dialog window descriptor.
  • pos - Points at the file descriptor received when calling OSDGetStartPosition() (OSD_POSITION type is equivalent to standard POSITION type).
  • buf - Points at the text buffer used to save file path to.
  • size - When the function is called, it specifies text buffer size. When the function quits its work, it specifies length of the saved path. If 0 is returned, end of file list is encountered.
  • hBmp - Points at HBITMAP used to load the image to. Returns NULL if the function fails.
  • Returned value - Returns operation result of OSDRET type.

Notes

OSDGetNextPathName() and OSDGetNextFileHBITMAP() functions are also used to work with the file list.

Sample

OSDGetNextPathNameAndFileHBITMAP»
(hDialog,&position,szFileBuff,&nSize,&hBitmap);

* The red "»"mark in the sample means line folding. This is only done for convenient display of the source code at our website. When reproducing this sample, delete this mark and join the code lines separated by it.