CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3

Thread: error problem

  1. #1
    Join Date
    Oct 2009
    Location
    yangoon
    Posts
    5

    error problem

    i made one project in Dev C++
    error say like that
    4 C:\Dev-Cpp\Examples\ZZZZZZZZZZZZZZZZZ\resource.rc [Resource error] syntax error
    C:\Dev-Cpp\Examples\ZZZZZZZZZZZZZZZZZ\Makefile.win [Build Error] [Project1_private.res] Error 1

    this is resource.rc file
    [QUOTE]
    #include "resource.h"

    [QUOTE]IDD_CONTROLSDLG DIALOG 260, 200, 180, 120[\QUOTE] //ERROR MESSAGE
    STYLE WS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
    CAPTION "Windows Controls"
    FONT 8, "MS Shell Dlg"
    BEGIN
    DEFPUSHBUTTON "Close", IDCANCEL, 120, 100, 50, 14
    END
    [\QUOTE]

    and this is Untitle3.cpp file
    [QUOTE]
    #include <windows.h>
    #ifdef __BORLANDC__
    #pragma argsused
    #endif

    #include "resource.h"
    //---------------------------------------------------------------------------
    HWND hWnd;
    LRESULT CALLBACK DlgProc(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam);
    //---------------------------------------------------------------------------
    int APIENTRY WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance,
    LPSTR lpCmdLine, int nCmdShow )
    {
    DialogBox(hInstance, MAKEINTRESOURCE(IDD_CONTROLSDLG),
    hWnd, reinterpret_cast<DLGPROC>(DlgProc));

    return 0;
    }
    //---------------------------------------------------------------------------
    LRESULT CALLBACK DlgProc(HWND hWndDlg, UINT Msg, WPARAM wParam, LPARAM lParam)
    {
    switch(Msg)
    {
    case WM_INITDIALOG:
    return TRUE;

    case WM_COMMAND:
    switch(wParam)
    {
    case IDCANCEL:
    EndDialog(hWndDlg, 0);
    return TRUE;
    }
    break;
    }

    return FALSE;
    }
    //---------------------------------------------------------------------------
    [\QUOTE]

    and this is resource.h file
    [QUOTE]#define IDD_CONTROLSDLG 101[\QUOTE]

  2. #2
    Join Date
    Dec 2007
    Location
    France
    Posts
    329

    Re: error problem

    Please use code tags if you want people to help you. "[code] ["/"code] "
    Last edited by MasterDucky; November 5th, 2009 at 10:20 AM.

  3. #3
    Join Date
    Aug 2000
    Location
    New York, NY, USA
    Posts
    5,656

    Re: error problem

    What is WS_MODALFRAME?
    Did you mean DS_MODALFRAME?
    Vlad - MS MVP [2007 - 2012] - www.FeinSoftware.com
    Convenience and productivity tools for Microsoft Visual Studio:
    FeinWindows - replacement windows manager for Visual Studio, and more...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured