473,657 Members | 2,358 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 5797

"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.csolution s.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.u k...

"Luc The Perverse" <sl************ ***********@cc. usu.edu> wrote in message news:43******** *************** @news.csolution s.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
"interprete r" 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.u k...

"Luc The Perverse" <sl************ ***********@cc. usu.edu> wrote in message
news:43******** *************** @news.csolution s.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*****@invali d.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.u k...

"Luc The Perverse" <sl************ ***********@cc. usu.edu> wrote in message
news:43******** *************** @news.csolution s.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
1661
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 there any good, easy-to-use GNU compilers for windows? What do you recommend? Thanks,
3
1710
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
1321
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 feel to be a windows developer. Is there a decent IDE C/C++ compiler for windows, like Borland or Microsoft C++? I plan to write mostly commandline interfaces. But, I want to slowly branch out to making actual Windows apps. Ideally, I'd just...
0
1502
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 help how to use this functions in dev c++ if not can i get any functions which acts in the same way as getch() or clrscr().....etc mean all conio.h functions in turbo c
3
1415
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 then installed Cygwin (I just know to use Windows), gcc and emacs. However, I do not know how to build a multiple-files project with Cygwin, gcc and emacss. Please show me how to do this. Thanks in advance.
4
1885
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 Pidgin Run the following:
1
3140
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 submit local files via the opened RS232 connection to the target.
9
1893
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
3137
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 Windows XP. I find it great. But, assuming that i hadn't put much time into learning about that compiler that i presently use, what would everyone recommend? (and "why?" if possible) I know others exist such as MSVC++, Cygwin, Borland
0
8838
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8739
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8613
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7351
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5638
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4173
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4329
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2740
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1969
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.