Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

GekkoCube

Trouble with listboxes (MFC)!

This topic is 6156 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I have a dialog with a ListBox, IDC_TILE_LLIST. All of the following code(s) have been added to the overrided OnInitDialog() function at one time or another - all with little or no success. ----------------------------- CWnd *cwnd = GetDlgItem(IDC_TILE_LIST); cwnd->DlgDirList(_T("c:\\"), IDC_TILE_LIST, 0, DDL_EXCLUSIVE); note: This doesnt list files inside the ListBox. ----------------------------- ----------------------------- this->DlgDirList(_T("c:\\"), IDC_TILE_LIST, 0, DDL_EXCLUSIVE); note: This doesnt do it either. ----------------------------- Basically, I have a dialog with a listbox (which i created as a resource)..and I would like to display a list of files from a certain directory into that listbox! I can list strings one at a time into the list - it''s no problem. But I would like to display all files at one time and be able to select one or more files. My class, which im trying to do all this in, is derived from CDialog. Please help me if you can! Thank you. ~ I''''m a wannabe programmer ~

Share this post


Link to post
Share on other sites
Advertisement
Did you try the ''Dir'' function, as in:

  
cwnd->Dir(0x10, "*.*");


Should list all the names of files and directories in the current directory.

Share this post


Link to post
Share on other sites
yeah!!
I found this out the hard way - trial and error!
But thanks for the help.
I have one more question.

I gots this othe problem.
I would like to display a bitmap inside a static picture box.


// Documentation says when this is called it automatically draws
// to the static box.
// When i do this, the box turns white (for all bitmaps).
SetBitmap( bmp.GetBitmap() );

bmp.GetBitmap() returns a HBITMAP.


~ I''''m a wannabe programmer ~

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!