473,320 Members | 1,861 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

C code to BCB

Hi,
I have wrote some program in C, and now I want to include it in my BCB
project. Here's my problems:

1.) How can I remove some text from a TMemo component (just like key
Del) from a button. It's near to: Tmemo!->CutFromClipboard; and so but,
how to delete text?

2.) How to use scrollbars? How to integrate them with TMemo?, to scroll
the text in TMemo using those scrollbars?

3.) How can I put all my ImageList to a file and read those icons from
ImageLists in my program, so I would have 2 files: program.exe and
icons.dll(or other ext.)?

4.) How can I read Captions to Menu, Context Menu from a file, so I
would have two files: program.exe and language.ini(or other ext)? I want
to have multi-language program.

5.) The most difficult problem now (for me).
I have some text in TMemo, and now I want to encypt it. I have my
encryption function written in ANSI C. How to run my function, so after
it, encrypted text wil be show in Tmemo? How to get a pass as a String
or char* from a TEdit, or TmaskEdit? Where should I put my function
(into which file)?

If you want to, I can send the source code of my program in C and BCB
source.

I have BCB Personal 6.

Thanks in advance.

--
Best regards, Piotr Turkowski
http://www.elfiaknieja.tk/
Nov 14 '05 #1
1 1997

"Piotr Turkowski" <pi***@ust.tke.pl> wrote in message
I have wrote some program in C, and now I want to include it in
my BCB project. Here's my problems:
Most of this stuff is very platform-specific. You need to ask in an ng that
deals with BCB (whatever that stands for).
5.) The most difficult problem now (for me).
I have some text in TMemo, and now I want to encypt it. I have my > encryption function written in ANSI C. How to run my function, so > after
it, encrypted text wil be show in Tmemo? How to get a pass as a String or char* from a TEdit, or TmaskEdit? Where should I
put my function (into which file)?

This is partly relevant to comp.lang.c.

Supose you have a function

void encrypt(char *str)

This can be written in pure ANSI C and thus should be placed in a file with
other portable ANSI C functions.

Now you need to look at your TMemo/Edit functions, and see whether they
store a copy of the string you pass them, or whether they operate on the
string itself.
If they operate on the string itself then at any time you can call encypt()
on the string, force a display update, and the data should appear encrypted.
If they take a local copy of the string, then either you must pass them an
encrypted string as you initilse the object, or you have to tell them in
some way that the text has changed, and make them take a copy of your
encypted string. The details of how you would do this are off-topic here,
however.
Nov 14 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

51
by: Mudge | last post by:
Please, someone, tell me why OO in PHP is better than procedural.
9
by: bigoxygen | last post by:
Hi. I'm using a 3 tier FrontController Design for my web application right now. The problem is that I'm finding to have to duplicate a lot of code for similar functions; for example, listing...
4
by: jason | last post by:
Hello. Newbie on SQL and suffering through this. I have two tables created as such: drop table table1; go drop table table2; go
16
by: Dario de Judicibus | last post by:
I'm getting crazy. Look at this code: #include <string.h> #include <stdio.h> #include <iostream.h> using namespace std ; char ini_code = {0xFF, 0xFE} ; char line_sep = {0x20, 0x28} ;
109
by: Andrew Thompson | last post by:
It seems most people get there JS off web sites, which is entirely logical. But it is also a great pity since most of that code is of such poor quality. I was looking through the JS FAQ for any...
5
by: ED | last post by:
I currently have vba code that ranks employees based on their average job time ordered by their region, zone, and job code. I currently have vba code that will cycle through a query and ranks each...
0
by: Namratha Shah \(Nasha\) | last post by:
Hey Guys, Today we are going to look at Code Access Security. Code access security is a feature of .NET that manages code depending on its trust level. If the CLS trusts the code enough to...
18
by: Joe Fallon | last post by:
I have some complex logic which is fairly simply to build up into a string. I needed a way to Eval this string and return a Boolean result. This code works fine to achieve that goal. My...
37
by: Alan Silver | last post by:
Hello, Newbie here, so please forgive what is probably a basic question ... I see a lot of discussion about "code behind", which if I have understood correctly, means that the script code goes...
171
by: tshad | last post by:
I am just trying to decide whether to split my code and uses code behind. I did it with one of my pages and found it was quite a bit of trouble. I know that most people (and books and articles)...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.