GIDForums  

Go Back   GIDForums > Computer Programming Forums > MS Visual C++ / MFC Forum
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 26-Oct-2006, 10:51
cyn8 cyn8 is offline
New Member
 
Join Date: Oct 2006
Posts: 2
cyn8 is on a distinguished road

linking a file in a combo box


I'm currently using a dialog based application. May i know how do i open a file or link to the file by just selecting one of the items listed in the combo box?
For example, my program is to test IC. IC stands for Integrated circuit. The combo box will contain different type of IC. By choosing one of the IC listed in the combo box, i need to link it to a certain text file(contain series of 1 and 0 for testing purposes and different IC has different text files). Later, by clicking 'ok' button, the application will use the text file to send to my hardware. Can anybody help me to explain on how to do this.
Thanks
  #2  
Old 29-Oct-2006, 14:05
TurboPT's Avatar
TurboPT TurboPT is offline
Senior Member
 
Join Date: Feb 2006
Location: Atlanta, GA
Posts: 1,017
TurboPT is a jewel in the roughTurboPT is a jewel in the roughTurboPT is a jewel in the rough

Re: linking a file in a combo box


It isn't clear how you will keep your text files aligned to the IC, but you can use a CFile object to open the file.
__________________
Use the force...read the source!!
WYCIWYG -- what you code is what you get!
  #3  
Old 03-Nov-2006, 09:17
tanvon tanvon is offline
New Member
 
Join Date: Nov 2006
Location: Pakistan
Posts: 4
tanvon is on a distinguished road

Re: linking a file in a combo box


it is better to divide your problem in parts.
1:get selection from combo box
for this you should handle the notification ON_CBN_SELCHANGE
in this handler get the selection with GetLBText()
2: how to relate data
For this purpose you can use GetItemData() and SetItemData()
or GetItemDataPtr() and SetItemDataPtr()


tanvon
I blog my VC++ here tanvon.wordpress.com
 
 

Recent GIDBlogPython ebook by crystalattice

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Airport Log program using 3D linked List : problem reading from file batrsau C Programming Language 11 29-Feb-2008 08:44
Download files in c for windows operating system oozsakarya C Programming Language 5 20-Jun-2006 04:33
File linking and Structure Manipulation lab... lost Elsydeon C++ Forum 8 30-Sep-2005 01:40
CD burner wont burn!! robertli55 Computer Hardware Forum 1 18-Jun-2004 11:53
Yet another CD burner problem: Lite-On LSC-24082K Erwin Computer Hardware Forum 1 22-May-2004 12:28

Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 07:21.


vBulletin, Copyright © 2000 - 2009, Jelsoft Enterprises Ltd.