Announcement

Collapse
No announcement yet.

PB Dll MsDialog Editor

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • PB Dll MsDialog Editor

    Hello,

    I have been trying to use the MS Dialog Editor that comes with PBDLL 6 but
    without success. I have read the posting in FAQ by Dave Navarro (thanks Dave
    it got me past the first hurdle only n^n to go) but when I ask RC.EXE to
    compile the file it starts but blows up with error message "error RC2104
    undefined keydword or key name".

    The dialog box itself is very simple as I am just trying to learn how to use
    the editor. Just some text and push buttons. The problem seems to lie with
    the way I have given names to the controls - in the hope that it would make it
    easier for me to access them in the subsequent PB programme.

    The RC and H files are set out below.

    If anyone can point out my error or tell me where I can get the lowdown on the
    RCxxxx error messages I would be very grateful.

    Thanks

    Roy

    =================================================

    #include "C:\Pbdll60\Winapi\Resource.h"

    DLGINCLUDE RCDATA DISCARDABLE
    BEGIN
    "C:\PbDll60\Develop\Logprog\LOGDIA.H"
    END

    Form1 DIALOG 140, 50, 160, 100
    STYLE DS_MODALFRAME | WS_MINIMIZEBOX | WS_POPUP | WS_VISIBLE | WS_CAPTION |
    WS_SYSMENU
    CAPTION "Logarithm Calculator"
    FONT 8, "MS Sans Serif"
    BEGIN
    CTEXT "Enter decimal number or Anitlog", Lbl1, 10, 10, 70, 20
    EDITTEXT Txtin, 85, 10, 60, 20, ES_AUTOHSCROLL
    PUSHBUTTON "&Quit", BtnQuit, 50, 80, 50, 14
    PUSHBUTTON "&Log(10)", BtnLog, 10, 40, 50, 14
    PUSHBUTTON "&Anitlog", BtnAnti, 90, 40, 50, 14
    CTEXT "Conversion =", LblAns, 10, 60, 60, 10
    LTEXT "", LblResult, 80, 60, 60, 15
    END

    =============Header File Logdia.h =====================

    #define Form1 100
    #define Lbl1 101
    #define Txtin 102
    #define BtnQuit 103
    #define BtnLog 104
    #define BtnAnti 105
    #define LblAns 106
    #define LblResult 107

  • #2
    Well, the d.e. does not generate the defines, so you messed it up i guess.

    You need to place the defines on top, then the dialog source.



    ------------------

    Comment


    • #3
      Sorry if I have not made it clear in my message posting. The dialog .RC file (logdia.rc) is a seperate from the header file logdia.h.
      I assume the header file is read first by the
      BEGIN
      C: ~ LOGDIA.H
      END
      statements in the .RC file.

      I was thinking that there maybe something wrong with the way the defines are set out in the header file?

      Cheers

      Roy

      ------------------

      Comment


      • #4
        Roy,

        Your "logdia.h" doesn't qualify as the correct RC data type.
        The following is an example from Developer Studio:

        Code:
        Example
        The following example demonstrates the use of the RCDATA statement:
        
        resname RCDATA
        {
           "Here is an ANSI string\0",    // explicitly null-terminated 
           L"Here is a Unicode string\0", // explicitly null-terminated 
           1024,                          // integer, stored as WORD 
           7L,                            // integer, stored as DWORD 
           0x029a,                        // hex integer 
           0o733,                         // octal integer 
        }
        Change your front end of whatever.rc to this:

        #include "C:\Pbdll60\Winapi\Resource.h"
        #include "C:\PbDll60\Develop\Logprog\LOGDIA.H"

        Remember that the RC compiler is case sensitive. Also you can
        compile the RC file in the PB IDE. Don't forget to set the include file directory paths. Use pbres to get *.pbr file.

        Cheers,
        Cecil




        ------------------

        Comment


        • #5
          Cecil,

          Many thanks, have my PB RES file now.
          Onwards to the next hurdle of accessing it from my PB code!

          Cheers

          Roy

          ------------------

          Comment


          • #6
            Just for clarity, the FAQ forum contains at least one document on using the Dialog Editor with PB/DLL.


            ------------------
            Lance
            PowerBASIC Support
            mailto:[email protected][email protected]</A>
            Lance
            mailto:[email protected]

            Comment

            Working...
            X