Need help with dialog boxes

This is a discussion on Need help with dialog boxes within the Windows Programming forums, part of the Platform Specific Boards category; I need help making a dialog box. Dev C++ keeps returning errors when I attempt to use a template from ...

  1. #1
    Registered User
    Join Date
    Feb 2002
    Posts
    73

    Smile Need help with dialog boxes

    I need help making a dialog box. Dev C++ keeps returning errors when I attempt to use a template from a resource. Soemthing about there being no resources. And, if I make a template from memory(in code). When I fill out the DLGTEMPLATE struct, it keeps telling me that the members I filled out are invalid. This only happens when I am making dialogs, and the software is properly set up.... Thanks! btw, what is an easy way to tell how large of a dialog you are going to get without a visual resource editor?

  2. #2
    the Corvetter
    Join Date
    Sep 2001
    Posts
    1,584
    First of all, you are going to have to be a little more specific on your problem. I assume you're using MSVC++?

    >> what is an easy way to tell how large of a dialog you are going to get without a visual resource editor? <<

    Do you mean at execution time? I think you should just be able to handle the WM_SIZE message and extract everything out of the parameters (WPARAM and LPARAM).
    1978 Silver Anniversary Corvette

  3. #3
    Registered User
    Join Date
    Oct 2001
    Posts
    224
    garfield
    ------------------
    I assume you're using MSVC++?
    ------------------


    zoalord
    ------------------
    Dev C++ keeps....
    ------------------


  4. #4
    Registered User
    Join Date
    Feb 2002
    Posts
    73
    I am using dev C++. Any ideas as to the cause of my problems? Thanks for your time.

  5. #5
    erstwhile
    Join Date
    Jan 2002
    Posts
    2,227
    Looks like you are attempting to do two different things at once ie create a resource script and create your resources dynamically in memory. If you are using a resource script (and DevC++ will provide a default one, check out the project options) you don't need to bother with DLGTEMPLATE or stuff like that. If you want to use DLGTEMPLATE then you don't need the resource script. There was a discussion of this sort of thing not too long ago so a quick search may provide you with some more info.

  6. #6
    the Corvetter
    Join Date
    Sep 2001
    Posts
    1,584
    Sorry, didn't see the Dev C++ thing...

    So, is that what you want to do to find the width/height of the dlg?
    1978 Silver Anniversary Corvette

  7. #7
    train spotter
    Join Date
    Aug 2001
    Location
    near a computer
    Posts
    3,859
    Justin Case

    Make sure you are including

    resouce.h
    script.rc

    when creating a resource based dialog.
    (these are the names used by MSVC)
    "Man alone suffers so excruciatingly in the world that he was compelled to invent laughter."
    Friedrich Nietzsche

    "I spent a lot of my money on booze, birds and fast cars......the rest I squandered."
    George Best

    "If you are going through hell....keep going."
    Winston Churchill

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Common Dialog boxes GetOpenFileName()
    By A10 in forum Windows Programming
    Replies: 3
    Last Post: 09-02-2008, 09:56 PM
  2. Dialog Boxes
    By Thantos in forum Windows Programming
    Replies: 7
    Last Post: 08-26-2003, 01:49 PM
  3. Dialog Boxes and Sliders
    By AtomRiot in forum Windows Programming
    Replies: 4
    Last Post: 01-29-2003, 08:36 AM
  4. Dialog Boxes
    By cerion in forum Windows Programming
    Replies: 4
    Last Post: 06-10-2002, 07:54 PM
  5. Tab Controls - API
    By -KEN- in forum Windows Programming
    Replies: 7
    Last Post: 06-02-2002, 10:44 AM

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