Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > Possible to do this with Borland C++?

Reply
Thread Tools

Possible to do this with Borland C++?

 
 
laredotornado
Guest
Posts: n/a
 
      09-22-2009
Hi,

I just downloaded a free Borland C++ compiler from

http://www.codegear.com/downloads/free/cppbuilder

I want to write a simple program for Windows platforms that
- launches a program that opens a specific page on a web browser
- has a custom .ico file that appears on the desktop
- requries no setup program (much like PuTty)

My question is, is it possible (and how), would I add a custom .ico
file to my Borland C++ program?

Thanks, - Dave
 
Reply With Quote
 
 
 
 
Victor Bazarov
Guest
Posts: n/a
 
      09-22-2009
laredotornado wrote:
> [..]
> My question is, is it possible (and how), would I add a custom .ico
> file to my Borland C++ program?


Yes, it is possible. How? Ask in the newsgroup dealing with Borland.
They used to be 'borland.public.cpp*'. Also consider that your question
has more to do with Windows than with C++, and there are Windows
programming newsgroups out there, go seek 'em out.

V
--
Please remove capital 'A's when replying by e-mail
I do not respond to top-posted replies, please don't ask
 
Reply With Quote
 
 
 
 
Ross A. Finlayson
Guest
Posts: n/a
 
      09-22-2009
On Sep 21, 7:01*pm, laredotornado <(E-Mail Removed)> wrote:
> Hi,
>
> I just downloaded a free Borland C++ compiler from
>
> http://www.codegear.com/downloads/free/cppbuilder
>
> I want to write a simple program for Windows platforms that
> - launches a program that opens a specific page on a web browser
> - has a custom .ico file that appears on the desktop
> - requries no setup program (much like PuTty)
>
> My question is, is it possible (and how), would I add a custom .ico
> file to my Borland C++ program?
>
> Thanks, - Dave


Oh, this is a C++ group only about C++. You are talking about
resource files. The files have resources attached to them, think
about the Macintosh files with the resources. They are called the
forks of the file. There's a stream fork on the Macintosh file. On
Windows a file name is all the file, but in the Win32 file system.
So, you want to put an icon on the file and load it into the dialog
you build from coordinates. You put the coordinate of the dialog into
the dialog remplate file. It is an rc file, .rc, the resource
compiler file. Sometimes people name them rc2 so the compiler doesn't
think it's a compiler file. The point is that the resource compiler
rc.exe that Borland probably distributes with its C++ compiler, or it
could be their own rc.exe with even whatever file name they want,
Borland made the Turbo C++ compiler which was and is very good.

http://en.wikipedia.org/wiki/Resource_fork
http://en.wikipedia.org/wiki/Resource_(Windows)

You can write programs in C++ to load the dialogs that you can make
with the resource compiler language. It is not difficult to parse,
the resource compiler language. The dialog builders in Visual Studio
make them automatically, saving them as RC files. By default in
Visual Studio resource files are loaded in the resource editor,
renaming them to rc2 sees then they are built as part of the project,
configured in that way, with the text editor.

Then, there are the Win32 functions of a Windows program. For
example, to handle the Windows events from the Dialog, you install
your functions in the windows message processing loop of the Win32
program. For each message that your application gets from Windows, or
however it is so defined, the functions in the message processing loop
are handling the messages from Windows, so that they know what Windows
is doing and Windows knows that the application responds to the
message.

The messages have the two variables after the message type tag. A
Windows message is the code of the tag and two integer variables.
There are differences in the variables in that they are the same
variables for 16, 32, and 64 bit. So, the Windows functions to work
with the Windows messages from windowsx.h should be used, for example
the Message Crackers, and the macros for the message handlers.

http://www.google.com/search?hl=en&s...p&q=windowsx.h

You'll notice that windows.h is included in every C and C++ file that
is calling the functions of Windows. The tags that identify the
messages are in the file. For example, all the Windows Messages begin
with WM_. That helps to find them in the file, because hundreds of
items in the file have WM_ to indicate that they are tags for Windows
Messages.

When a Win32 program is called, generally the programmer needs
something like global variables for their function as the Win32
application. So, in the function, there's a method to get the
"private" variable, user data, as they call it, that is the pointer.
Otherwise they might just use static variables. In C, that means the
program has all the variables maintaining the state. Modern day
Windows also has key/value string mapping for the private variable,
besides just using one pointer to the struct that has all the data for
the application to run, the parameters, but applications before that
use GetWindowsLong function to get the context struct.


typedef tagstruct CONTEXT
{

}
CONTEXT;

and also sometimes the structure is defined there with it's pointer
name also, why not

struct CONTEXT
{

}
Borland has their own windows.h file which probably exactly matches
the information that Borland supports using the Win32 API, where Win32
is the generic name for much of the Windows API, the application
programming interface. Also Watcom had a very good C++ compiler.
Also the lcc Win32 compiler of Jacob Navia compiles source to DLL's
that Windows can use, and uses Windows DLLs.

I have a C++ project it makes a copy/paste buffer.

 
Reply With Quote
 
 
 
Reply

Thread Tools

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
QUERY: Borland C++ 4.5 vs Borland Turbo C++ 1.01 dhruba.bandopadhyay@hotmail.com C++ 1 10-02-2006 10:57 AM
Borland C++ to Visual Studio =?Utf-8?B?RHJpa3Vz?= ASP .Net 3 08-08-2005 08:36 PM
Conversion MS VS.NET 2003 - Borland C#Builder Piotr Karwatka ASP .Net 1 12-15-2004 10:20 PM
Applet JBuilder(Borland) JDeveloper(Oracle) IE 6.0 Falcon Java 5 05-20-2004 08:13 AM
Borland Togethersoft Roul Ravashimka Java 0 05-05-2004 06:42 PM



Advertisments