Jump to content
  • Advertisement

Archived

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

Enselic

ListBox -> Text File

This topic is 5635 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 won't get it why this won't work! Anyone?
    
osFile.open( "test.txt" );//ofn.lpstrFile );


for( i = 0; i < ListBox_GetCount( g_hList ); i++ )
{
	ListBox_GetText( g_hWnd, i, (LPTSTR)szListText );

	osFile << szListText << endl;
}
    
EDIT: To be more specific, there is no compilation error. I have include windows.x. I think that GetText is not used that way but i don't know. The szListText is a 100 byte buffer so theres no problem there... The file is created but only contains crap! ("...ÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌ...") [edited by - Enselic on January 20, 2003 11:45:16 AM]

Share this post


Link to post
Share on other sites
Advertisement
Why are you trying to use

  
ListBox_GetText( g_hWnd, i, (LPTSTR)szListText );


Shouldnt it be

  
ListBox_GetText( g_hList, i, (LPTSTR)szListText ); ?

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!