Dialog Box Problems

This is a discussion on Dialog Box Problems within the Windows Programming forums, part of the Platform Specific Boards category; You'll need to create a new project but without any spaces in the path(s) to project files, source files, resource ...

  1. #16
    erstwhile
    Join Date
    Jan 2002
    Posts
    2,227
    You'll need to create a new project but without any spaces in the path(s) to project files, source files, resource scripts etc. as Dev-Cpp doesn't like them.
    CProgramming FAQ
    Caution: this person may be a carrier of the misinformation virus.

  2. #17
    Yah. Morgul's Avatar
    Join Date
    Feb 2005
    Posts
    109
    It works now! Yah!

    I had a & character in the project name and it was screwing it up. I would never have realized that was the problem if you hadn't said Dev-C++ didn't like spaces.

    There were some other minor things that needed to be cleared up, such as my resource not liking me using my header with a bunch of definitions in it to define things so I had to make a new header file but no problems there.

    There are two questions i have:
    1. Though I can get it to work by commenting this out, by resource script says I have a problem with the line defining Style:

    Code:
    #include "definitions.hpp"
    
    IDD_DLGJOIN DIALOG 260, 200, 188, 95
    STYLE DS_MODALFRAME | WS_CAPTION | WS_VISIBLE
    CAPTION "Join a Game"
    FONT 8, "Courier New"
    BEGIN
        DEFPUSHBUTTON   "OK", ID_DLGOK, 130, 10, 50, 14
    END
    I must be missing something becuase I see nothing wrong.

    Error message:

    4 C:\Dev-Cpp\OpenGL\DayandNight\dialogdata.rc [Resource error] syntax error
    C:\Dev-Cpp\OpenGL\DayandNight\Makefile.win [Build Error] [DayandNight_private.res] Error 1
    2. In most games today, they have their own styles when it comes to message boxes, dialogboxes, etc., so that when one pops up it is slightly transparent, has a different size, and different colors. Is this done through DialogBoxIndirect, when you create a template in the memory instead of using a resource file? Or is there some other easier way to do it?
    Sic vis pacum para bellum. If you want peace, prepare for war.

  3. #18
    Registered User Codeplug's Avatar
    Join Date
    Mar 2003
    Posts
    4,652
    1) Try "#include<windows.h>" if it's not already

    2) >> Is this done through DialogBoxIndirect, when you create a template...
    No. Here's a thread with a few buzz words for searching with.
    Custom UI
    I'm sure other's have links to tutorials and such.

    gg

  4. #19
    Yah. Morgul's Avatar
    Join Date
    Feb 2005
    Posts
    109
    Alright thanks everyone for your help.
    Sic vis pacum para bellum. If you want peace, prepare for war.

  5. #20
    Yah. Morgul's Avatar
    Join Date
    Feb 2005
    Posts
    109
    What is wrong with this:

    Code:
    PUSHBUTTON 16, 208, 48, 16, "Cancel", CANCEL
    Or this:

    Code:
    EDITTEXT 16, 16, 240, 160, mstrservermsg, READONLY | MULITLINE
    Sorry I thought I was done too...
    Last edited by Morgul; 05-30-2005 at 01:22 PM.
    Sic vis pacum para bellum. If you want peace, prepare for war.

  6. #21
    erstwhile
    Join Date
    Jan 2002
    Posts
    2,227
    The syntax is wrong; check out msdn: resource definition statements.
    CProgramming FAQ
    Caution: this person may be a carrier of the misinformation virus.

  7. #22
    Yah. Morgul's Avatar
    Join Date
    Feb 2005
    Posts
    109
    Thanks a lot, the site I was using was not up to date, I was having trouble finding a page that was current.

    Thanks for everything everyone , I promise that was the last question.
    Sic vis pacum para bellum. If you want peace, prepare for war.

Page 2 of 2 FirstFirst 12
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Display text in a Dialog Box
    By Dark_Phoenix in forum Windows Programming
    Replies: 9
    Last Post: 01-02-2009, 05:30 AM
  2. Dialog Box (Compile Problem)
    By Vicious in forum Windows Programming
    Replies: 6
    Last Post: 08-31-2004, 03:29 PM
  3. problem with the open dialog box
    By stallion in forum Windows Programming
    Replies: 13
    Last Post: 02-19-2003, 07:28 AM
  4. Context Menu & Dialog Box :: MFC
    By kuphryn in forum Windows Programming
    Replies: 4
    Last Post: 08-11-2002, 10:01 AM
  5. Tab Controls - API
    By -KEN- in forum Windows Programming
    Replies: 7
    Last Post: 06-02-2002, 09:44 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21