473,322 Members | 1,610 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,322 software developers and data experts.

Windows Programming in C under DevC++

Hello!

I am looking for a beginners tutorial on how to program for windows in C.
I guess this is windows API?

I have never written outside of VC++ for windows, and can't find any
examples. I don't think that this is a DevC++ specific question.

I have written a simple application which locates duplicate files; it first
compares file sizes, and then runs an SHA-256 (might switch to Adler 32)
hash on the file to see if it matches. (I realize that this has been done
before, I am doing this as a learning project.)

For this project, I am going to need a window, buttons, intercept keystrokes
(for shortcuts), a list box with checkmarks, message boxes (perhaps nested
in a listbox), child windows (just modal dialogs), progess bars, and the
actual detection and scanning part will have to run in its own thread.

GUIs have never been my forté. I cut and paste whenever I can, and
Microsoft makes it worse by requiring that you learn very little about how
the system works.

After I get it working in Windows, then I am going to try again in Linux -
and try to get better at identifying which functions can be identical and
which functions need to be seperate.

I have also considered writing my real functions in C and then using Java as
my front end to eliminate the majority of porting issues. I would still of
course want my EXE file to have an Icon, and I wouldn't know how to do this.

Please point me to some beginners tutorials, or tell me what I should be
searching for on Google.

I will go to Java NG and ask about using Java as a C front end, as I think
this is quite a different question.

--
"It's better to have rocked and lost than never to have rocked at
all." -John Flansburgh
Nov 15 '05 #1
7 5780

"Luc The Perverse" <sl***********************@cc.usu.edu> wrote

I will go to Java NG and ask about using Java as a C front end, as I think
this is quite a different question.

Java provides facilities for linking to C, but you cannot call Java from C,
normally, and certainly not from ANSI stnadard C.

AS for how to use the devC++ libraries, you need to find some documentation.
I don't actually know what devC++ is - it may or may not use Microsoft's
standard Windows API.
Nov 15 '05 #2
Dev Cpp is one of my favourite IDE, among with .NET, but you should be
careful using it because the last beta version is quite instable, after
8 hours working on my project it started to paste code by himself
mangling my code, so take care.
But to answer your question you may try C Builder 5 for developing
GUI's.

A nice windows tutorial can be found in Lcc standard documentation. Or
search any warez site, and you'll find some!

Nov 15 '05 #3

"Luc The Perverse" <sl***********************@cc.usu.edu> wrote in message
news:43***********************@news.csolutions.net ...
Hello!

I am looking for a beginners tutorial on how to program for windows in C.
I guess this is windows API?

I have never written outside of VC++ for windows, and can't find any
examples. I don't think that this is a DevC++ specific question.

I have written a simple application which locates duplicate files; it
first compares file sizes, and then runs an SHA-256 (might switch to Adler
32) hash on the file to see if it matches. (I realize that this has been
done before, I am doing this as a learning project.)

For this project, I am going to need a window, buttons, intercept
keystrokes (for shortcuts), a list box with checkmarks, message boxes
(perhaps nested in a listbox), child windows (just modal dialogs), progess
bars, and the actual detection and scanning part will have to run in its
own thread.

GUIs have never been my forté. I cut and paste whenever I can, and
Microsoft makes it worse by requiring that you learn very little about how
the system works.

After I get it working in Windows, then I am going to try again in Linux -
and try to get better at identifying which functions can be identical and
which functions need to be seperate.

I have also considered writing my real functions in C and then using Java
as my front end to eliminate the majority of porting issues. I would
still of course want my EXE file to have an Icon, and I wouldn't know how
to do this.

Please point me to some beginners tutorials, or tell me what I should be
searching for on Google.

I will go to Java NG and ask about using Java as a C front end, as I think
this is quite a different question.


Um, this is 'off topic' here - and you'll get slapped for asking such
things!

This is a 'standard C' discussion - so, go out and seek a Win32 group.

Tip:

1. go to bed with 'Petzold' (or 'Morris': he of 'Windows: Advanced
Programming and Design')
2. go to bed with a copy of the Win32 API docs

Tip tip - don't shag 'em, read 'em.
Nov 15 '05 #4
Pacher R. Dragos a écrit :
Dev Cpp is one of my favourite IDE, among with .NET, but you should be
careful using it because the last beta version is quite instable, after
8 hours working on my project it started to paste code by himself
mangling my code, so take care.
But to answer your question you may try C Builder 5 for developing
GUI's.

A nice windows tutorial can be found in Lcc standard documentation. Or
search any warez site, and you'll find some!

Lcc-win32 doesn't only provide a tutorial but also a compiler,
a resource editor (there is noone under devC++) and a windowed
debugger. A wizard generates the skeleton of the windows
application for you saving a lot of typing.

But the language is C, not C++. There are some extensions to C
like operator overloading and generic functions but nothing like C++.

http://www.cs.virginia.edu/~lcc-win32

P.S. Do not go to the "warez" sites to get software that
is free anyway. It doesn't make much sense
Nov 15 '05 #5
"pemo" <us************@gmail.com> wrote in message
news:dj**********@news.ox.ac.uk...

"Luc The Perverse" <sl***********************@cc.usu.edu> wrote in message news:43***********************@news.csolutions.net ...
Hello!

I am looking for a beginners tutorial on how to program for windows in C. I guess this is windows API?

Tip:

1. go to bed with 'Petzold' (or 'Morris': he of 'Windows: Advanced
Programming and Design')


Charles Petzold. Programming Windows.

You should consider moving forward into the year 2000 and get his latest
book: Programming Microsoft Window with c# (note that he has had to put
the M$ word in the title, now). You'll need to install the .NET
Framework freebie and the free compiler, and any machine you run your
program on will need to have .NET installed for it to work. But the
benefits are many, as you can write object oriented code, the CLR (the
"interpreter" that runs your code) will let you write in any language MS
has deemed acceptable - so your Java skills can work in .NET, or if you
know VB, Perl, or whatever, they all "compile" into a form that the CLR
can run.

A lot of "old Windows" headaches go away with C# - no more COM COM+ DCOM
ATL crap. I'm just learning it myself, but it seems to be the new way to
turn wiggling your fingers into gold.

--
Mabden
Nov 15 '05 #6
Mabden said:
"pemo" <us************@gmail.com> wrote in message
news:dj**********@news.ox.ac.uk...

"Luc The Perverse" <sl***********************@cc.usu.edu> wrote in message
news:43***********************@news.csolutions.net ...
> Hello!
>
> I am looking for a beginners tutorial on how to program for windows in C. > I guess this is windows API?
>

Tip:

1. go to bed with 'Petzold' (or 'Morris': he of 'Windows: Advanced
Programming and Design')


Charles Petzold. Programming Windows.

You should consider moving forward into the year 2000


That would be a retrograde step, not a forward move.
and get his latest
book: Programming Microsoft Window with c#
This, however, is 2005, not 2000. C# is no longer flavour-of-the-month. C,
however, remains flavour of the millennium.
(note that he has had to put
the M$ word in the title, now). You'll need to install the .NET
Framework freebie


Cruel, cruel. Doesn't Windows slow his machine down enough already?

--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/2005
http://www.cpax.org.uk
email: rjh at above domain (but drop the www, obviously)
Nov 15 '05 #7
"Richard Heathfield" <in*****@invalid.invalid> wrote in message
news:dj**********@nwrdmz02.dmz.ncs.ea.ibs-infra.bt.com...
Mabden said:
"pemo" <us************@gmail.com> wrote in message
news:dj**********@news.ox.ac.uk...

"Luc The Perverse" <sl***********************@cc.usu.edu> wrote in message
news:43***********************@news.csolutions.net ...
> Hello!
>
> I am looking for a beginners tutorial on how to program for
windows in C.
> I guess this is windows API?
>
Tip:

1. go to bed with 'Petzold' (or 'Morris': he of 'Windows: Advanced
Programming and Design')


Charles Petzold. Programming Windows.

You should consider moving forward into the year 2000


That would be a retrograde step, not a forward move.


Ah. Not a Conan O'Brien fan, eh? He does this great bit that he started
around 1997 or so that "looks into the future - all the way to the Year
2000!" It became even funnier when he kept doing it after 2000. On a
personal note, I always use the word modren when I talk about things
that are super-new and sure to be super-outdated almost immediately.
Like, everytime someone shows you their great new phone - "Wow! that's
really modren!" I would probably call .NET modren technology.
and get his latest
book: Programming Microsoft Window with c#


This, however, is 2005, not 2000. C# is no longer

flavour-of-the-month. C, however, remains flavour of the millennium.


C# is the job-of-the-month. You WILL get interviews by saying you have
@+ years of C#. Bet on it. (The @+ was supposed to be 2+, but I liked
the way it looked and I'll probably use it - especially in modren posts
like this one!)
(note that he has had to put
the M$ word in the title, now). You'll need to install the .NET
Framework freebie


Cruel, cruel. Doesn't Windows slow his machine down enough already?


That's what Intel is FOR. The old IBM philosophy: "Hardware will catch
up!" or "Shit rolls downhill!" or something...

--
Mabden
Nov 15 '05 #8

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

Similar topics

4
by: Derek | last post by:
Hi, I am taking introductory C++ in college, and we use MS Visual C++ in class. :-( I want to be independent from Microsoft (or as independent as I can be while developing on Windows!) Are...
3
by: IS | last post by:
I'm using BloodShed DevC++. If you know the program that would be great. Here is what I'm doing: File>New>Source File. Then I enter: #include <iostream.h> int main();
4
by: DaLoverhino | last post by:
Hello, I could just use GNU's stuff and cygwin's commandline stuff to do Windows XP development, but that would be sort of like going outdoor camping in a mobile home. I want to know how it would...
0
by: webking | last post by:
hi friends, i am using devc++ to do c programs but i am unable to use standard turbo c functon such as getch(), clrscr(),getchar () can any one...
3
by: nvinhphu | last post by:
Hello everyone, Before, I used the MS compiler such as MS Visual.NET 2003 to build my C++ program. Recently, together with template techniques, I found that MS compiler was not a good choice. I...
4
by: lumpybanana247 | last post by:
I hope this isnt considered a technical question (then i shouldn't post here) hi, i was building pidgin (the im) and i did everything needed, but this is what the last step says: Build...
1
by: fidel | last post by:
Hello, my target is a small application which: * Start as a small Window * Offers several input fields for RS232-related connection informations (like parity etc...) * A Send-function to...
9
by: Jim Langston | last post by:
Does anyone know of a newsgroup appropriate for discussing DevC++? I looked for a Dev C++ newsgroup and mingw newsgroup but couldn't find one. -- Jim Langston tazmaster@rocketmail.com
4
by: lumpybanana247 | last post by:
Now, I understand this could have several answers, but my simple question is: What is the best free C++ compiler for Windows? For a long time, I have been using MinGW (using Bloodshed DevC++) on...
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
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...
1
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: 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...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.