| |

VerySource

 Forgot password?
 Register
Search
View: 954|Reply: 5

How to read the specified content in the file into ComboBox1?

[Copy link]

1

Threads

3

Posts

4.00

Credits

Newbie

Rank: 1

Credits
4.00

 Germany

Post time: 2020-1-30 23:40:01
| Show all posts |Read mode
One file reads as follows:
0x02 Tab1 0x00 AAAA 0x00 BBB 0x00 CCCCCCCCC 0x01
        DDD 0x00 EEE 0x00 FFF
0x02 Tab2 0x00 GGG 0x00 HHH 0x00 IIIIIII 0x01
        JJJ 0x00 KKK 0x00 LLL
0x03 Tab3 0x00 MMM 0x00 NN 0x00 OOOO 0x01
        PPP 0x00 QQQ 0x00 RRR


0x00 represents the delimiter between characters
0x01 represents the line separator
0x02 represents the table separator

How to search out data like Tab1, Tab2, Tabe3 and fill it into ComboBox1? ?
How to write new data to the specified table, such as writing a few more rows to Tab2?
Brothers, please help, thank you!
Reply

Use magic Report

0

Threads

45

Posts

32.00

Credits

Newbie

Rank: 1

Credits
32.00

 Invalid IP Address

Post time: 2020-3-20 09:30:01
| Show all posts
After reading out data like Tab1
ComboBox1-> Items-> Add (Data); // AnsiString Data

How to write new data to the specified table, such as writing a few more rows to Tab2? I don't quite understand what you mean
Reply

Use magic Report

1

Threads

3

Posts

4.00

Credits

Newbie

Rank: 1

Credits
4.00

 China

 Author| Post time: 2020-3-22 16:15:01
| Show all posts
For example, write data to the third row of the Tab2 table
Reply

Use magic Report

0

Threads

2

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 China

Post time: 2020-3-22 17:45:01
| Show all posts
These are the basis of the C language, there is no technical difficulty, you should do it yourself

Involves string manipulation and file worrying, both are simple
Reply

Use magic Report

0

Threads

4

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-7-20 13:15:01
| Show all posts
Read the value to judge, find out the tab1 you want, and then use ComboBox1->Items->Add() to add the drop-down box, and then Open
Table tab1, insert data with Insert.
Reply

Use magic Report

1

Threads

3

Posts

4.00

Credits

Newbie

Rank: 1

Credits
4.00

 China

 Author| Post time: 2020-8-2 11:00:01
| Show all posts
There are two structures, that is, Tab is assigned to char szTableName[255];
typedef struct tagTAliasRow
{
     char szAlias[255];
     char szAddress[16];
     char *lpszDescription;
     bool bSelected;
     tagTAliasRow *pNext;
     tagTAliasRow *pPrevious;
}TAliasRow;

//The corresponding internal data structure of a single variable definition table
typedef struct tagTAliasTable
{
     bool bSelected;
     char szTableName[255];
     struct tagTAliasRow *pAliasRows;
     tagTAliasTable *pNext;
     tagTAliasTable *pPrevious;
}TAliasTable;
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list