Posted  by 

Resource File Dev C++

Hello all,

I'm trying to learn how to make just a basic windows app with some buttons and text windows to make the programs I normally create and interface with through DOS a little more interesting.

Sharing the same pristine audio quality as its larger siblings in the Cubase family, Cubase Elements provides the perfect starting point for intuitive song writing, studio-grade recordings and finalizing your mix. Do you want to elevate your sound to a new level? Cubase Elements is your next step. Vst plugins cubase.

Phil, Check the project options and see if additional information is being passed to the compiler from Dev-C. Also check Compiler Options. If you still have problems I suppose you could clear out any registry entries/INI files from Dev-C (assuming some are made) and when you restart the compiler it will create a default configuration. DEV-C is a fully-featured integrated development environment (IDE) for creating, debugging and creating applications written in a popular C programming language. Even though tools for the development of C software have undergone countless upgrades over the years, a large number of developers located all around the world have expressed a wish to continue using DEV-C.

I'm following the tutorials at '>http://www.winprog.org/tutorial and http://www.functionx.com/win32/ .
I can manage to get the most basic stuff like creating windows and adding a menu bar. Next up, I want to try and get dialog boxes, similar to what you might see when you hit the About button on a window. Specifically, http://www.functionx.com/win32/Lesson04.htm outlines what I'm trying to do.

Well, since I understand almost nothing about what exactly the syntax for all of this is, from how to interface with functions to what I need to put in resource files, I'm first trying to copy-paste code and see if it works. Well, as far as I can tell, what I have should be working.

This is what I have in my resource file and when I go to compile, I get a syntax error on line 4, the STYLE line. Nothing I look up or read leads me to believe that the syntax here is incorrect, aside from the fact that this is the code given to me from a tutorial. I even tried deleting the STYLE line just to get something to compile and I get another syntax error on the DEFPUSHBUTTON line.

Source File Declaration Rules In Java

The main code in the .cpp file *should* all be fine, it's taken directly from these tutorials as well, but I'll post it if everything seems fine with this resource file code. Also, I'm compiling in Dev-C++.

If anyone knows what my problem might be and wants to help, I would really appreciate it. This isn't really something I *need* to do but it would be real interesting if I could figure it out.

  • 2 Contributors
  • forum 7 Replies
  • 571 Views
  • 11 Hours Discussion Span
  • commentLatest Postby Frederick2Latest Post

Frederick2189

Dev C++ For Windows 10

Hi Ripture,

Here is some code from Dev-C++ that uses a resource file I dug up from a few years back. I just rebuilt the project as C++ (it was C) and it works. The code also has a menu in it where you can go to the File menu & choose Open and the Open File Dialog Box will present itself. On the Help menu a dialog box from a resource file (.rc) is created. Hope it helps you. The main source is Main.cpp, the project name is Form11, the header is Form11.h and the rc file is Form11.rc. Create the Form11 project and put all the files in that dir. Then include them in the project, that is, Main.cpp, Form11.h and Form11.rc.

I personally deplore the Windows Dialog Engine, and only use windows it creates in the most basic and rudimentary manner. I'd highly recommend going with CreateWindowEx() windows in your Win32 programming.

Edited by Frederick2: n/a

Hi,

I am trying to a play a .wav file in a C++ program.

Dev C++ Program Download

I think my code is OK, but when it plays, it plays the default windows 'error' sound, not my .wav file.

This is the program:

How can i add the .wav file so it is found?

In the Visual Studio 2005 soulution explorer I right click on Resource Files>Add>Resource, but can't find an option for .wav.

Resource File Dev C Download

Thanks for any help!

  • 3 Contributors
  • forum 9 Replies
  • 3,624 Views
  • 1 Year Discussion Span
  • commentLatest Postby pseudorandom21Latest Post

Recommended Answers

Answered by William Hemsworth1,339 in a post from

You forgot the SND_FILENAME argument, change that line to:[CODE]PlaySound((LPCWSTR)'tone.wav', 0, SND_LOOP SND_ASYNC [B][COLOR='Red']SND_FILENAME[/COLOR][/B]);[/CODE]and it should work.

Jump to Post

All 9 Replies

William Hemsworth1,339

You forgot the SND_FILENAME argument, change that line to:

Resource File Dev C Online

and it should work.