User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the C++ section within the Software Development category of DaniWeb, a massive community of 426,011 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 1,611 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our C++ advertiser: Programming Forums
Views: 261 | Replies: 7 | Solved
Reply
Join Date: Dec 2007
Posts: 141
Reputation: TheBeast32 is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 4
TheBeast32's Avatar
TheBeast32 TheBeast32 is offline Offline
Junior Poster

Dialog resource error

  #1  
Jul 22nd, 2008
Hi, I have been trying to make a dialog, but I keep getting an error. I'm using Dev-C++ 4.9.9.2, and I get this error "[Resource error] syntax error". Here's my code for the dialog:

IDD_CONNECT DIALOG DISCARDABLE 0, 0, 300, 250
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Connect"
FONT 8, "MS Sans Serif"
BEGIN
    DEFPUSHBUTTON   "Connect",IDOK,174,18,50,14
    PUSHBUTTON      "Cancel",IDCANCEL,174,35,50,14
    GROUPBOX        "Connect Information...",IDC_STATIC,7,7,225,52
    CTEXT           "Enter the host/IP to connect to and click connect",
                    IDC_STATIC,16,18,144,33
END
"I'm not dumb. I just have a command of thoroughly useless information."
- Calvin, of Calvin and Hobbes
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Aug 2005
Location: near St Louis, Missouri, USA
Posts: 11,174
Reputation: Ancient Dragon has much to be proud of Ancient Dragon has much to be proud of Ancient Dragon has much to be proud of Ancient Dragon has much to be proud of Ancient Dragon has much to be proud of Ancient Dragon has much to be proud of Ancient Dragon has much to be proud of Ancient Dragon has much to be proud of Ancient Dragon has much to be proud of 
Rep Power: 38
Solved Threads: 930
Moderator
Featured Poster
Ancient Dragon's Avatar
Ancient Dragon Ancient Dragon is online now Online
Most Valuable Poster

Re: Dialog resource error

  #2  
Jul 22nd, 2008
You should be asking these people. I don't think Dev-C++ knows how to compile the resource files, but there are several free resource compilers available via google.
I think it's about time we voted for senators with breasts. After all, we've been voting for boobs long enough. ~Clarie Sargent, Arizona senatorial candidate
Those who are too smart to engage in politics are punished by being governed by those who are dumber. ~Plato
Reply With Quote  
Join Date: Dec 2007
Posts: 141
Reputation: TheBeast32 is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 4
TheBeast32's Avatar
TheBeast32 TheBeast32 is offline Offline
Junior Poster

Re: Dialog resource error

  #3  
Jul 22nd, 2008
It can compile the input box dialog here: http://www.codeproject.com/KB/dialog/w32inputbox_1.aspx. That uses resources, so I don't think that's the problem. If you don't have a code project account, I have attached the files. The dev-c++ compiled file is program1.exe.
Last edited by TheBeast32 : Jul 22nd, 2008 at 9:59 pm.
Attached Files
File Type: zip files.zip (124.3 KB, 7 views)
"I'm not dumb. I just have a command of thoroughly useless information."
- Calvin, of Calvin and Hobbes
Reply With Quote  
Join Date: Dec 2007
Posts: 141
Reputation: TheBeast32 is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 4
TheBeast32's Avatar
TheBeast32 TheBeast32 is offline Offline
Junior Poster

Re: Dialog resource error

  #4  
Jul 23rd, 2008
It's not program1.exe, I made a mistake. It's project1.exe.
"I'm not dumb. I just have a command of thoroughly useless information."
- Calvin, of Calvin and Hobbes
Reply With Quote  
Join Date: Nov 2007
Posts: 882
Reputation: mitrmkar is a jewel in the rough mitrmkar is a jewel in the rough mitrmkar is a jewel in the rough mitrmkar is a jewel in the rough 
Rep Power: 5
Solved Threads: 180
mitrmkar mitrmkar is offline Offline
Practically a Posting Shark

Re: Dialog resource error

  #5  
Jul 23rd, 2008
#include <winresrc.h> in the .rc file, that way the definitions of e.g. DS_MODALFRAME and WS_POPUP will be known. In addition to that, add #define IDC_STATIC -1 in the resource.h file.
Reply With Quote  
Join Date: Aug 2005
Location: near St Louis, Missouri, USA
Posts: 11,174
Reputation: Ancient Dragon has much to be proud of Ancient Dragon has much to be proud of Ancient Dragon has much to be proud of Ancient Dragon has much to be proud of Ancient Dragon has much to be proud of Ancient Dragon has much to be proud of Ancient Dragon has much to be proud of Ancient Dragon has much to be proud of Ancient Dragon has much to be proud of 
Rep Power: 38
Solved Threads: 930
Moderator
Featured Poster
Ancient Dragon's Avatar
Ancient Dragon Ancient Dragon is online now Online
Most Valuable Poster

Re: Dialog resource error

  #6  
Jul 23rd, 2008
I got that *.zip file and tried to compile it, but Dev-C++ reports error that it cannot exec 'cc1'. It compiles the *.cpp files ok, but pukes at the resource file(s).
I think it's about time we voted for senators with breasts. After all, we've been voting for boobs long enough. ~Clarie Sargent, Arizona senatorial candidate
Those who are too smart to engage in politics are punished by being governed by those who are dumber. ~Plato
Reply With Quote  
Join Date: Dec 2007
Posts: 141
Reputation: TheBeast32 is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 4
TheBeast32's Avatar
TheBeast32 TheBeast32 is offline Offline
Junior Poster

Re: Dialog resource error

  #7  
Jul 23rd, 2008
That's weird. It works for me. I'll try doing what you said.
"I'm not dumb. I just have a command of thoroughly useless information."
- Calvin, of Calvin and Hobbes
Reply With Quote  
Join Date: Dec 2007
Posts: 141
Reputation: TheBeast32 is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 4
TheBeast32's Avatar
TheBeast32 TheBeast32 is offline Offline
Junior Poster

Re: Dialog resource error

  #8  
Jul 23rd, 2008
Yes! It works! Thank you.
"I'm not dumb. I just have a command of thoroughly useless information."
- Calvin, of Calvin and Hobbes
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb C++ Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the C++ Forum

All times are GMT -4. The time now is 1:02 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC