CodeGuru Forums -
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic Newsletters VB Forums Developer.com


Newest CodeGuru.com Articles:

  • Installing SQL Server 2008
  • Writing UDFs for Firebird Embedded SQL Server
  • [Updated] Shutdown Manager
  • Building Windows Azure Cloud Service Applications with Azure Storage and the Azure SDK

  • Search CodeGuru:
     



    Go Back   CodeGuru Forums > Visual C++ & C++ Programming > C++ and WinAPI
    FAQ Members List Calendar Search Today's Posts Mark Forums Read

    C++ and WinAPI Discuss Windows API related issues using C++ (and Visual C++). This is a non-MFC forum.

    Reply
     
    Thread Tools Search this Thread Rate Thread Display Modes
      #1    
    Old November 4th, 2009, 10:52 PM
    minkoko minkoko is offline
    Junior Member
     
    Join Date: Oct 2009
    Location: yangoon
    Posts: 5
    minkoko is an unknown quantity at this point (<10)
    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]
    Reply With Quote
      #2    
    Old November 5th, 2009, 09:11 AM
    MasterDucky MasterDucky is offline
    Member
     
    Join Date: Dec 2007
    Posts: 110
    MasterDucky is an unknown quantity at this point (<10)
    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.
    Reply With Quote
      #3    
    Old November 5th, 2009, 08:22 PM
    VladimirF VladimirF is offline
    Elite Member
    Power Poster
     
    Join Date: Aug 2000
    Location: Del Mar, California, USA
    Posts: 4,442
    VladimirF has much to be proud of (1500+)VladimirF has much to be proud of (1500+)VladimirF has much to be proud of (1500+)VladimirF has much to be proud of (1500+)VladimirF has much to be proud of (1500+)VladimirF has much to be proud of (1500+)VladimirF has much to be proud of (1500+)VladimirF has much to be proud of (1500+)VladimirF has much to be proud of (1500+)VladimirF has much to be proud of (1500+)VladimirF has much to be proud of (1500+)
    Re: error problem

    What is WS_MODALFRAME?
    Did you mean DS_MODALFRAME?
    __________________
    Vlad - MS MVP [2007, 2008, 2009] - www.FeinSoftware.com
    Convenience and productivity tools for Microsoft Visual Studio:
    FeinViewer - an integrated GDI objects viewer for Visual C++ Debugger, and more...
    Reply With Quote
    Reply

    Bookmarks
    Go Back   CodeGuru Forums > Visual C++ & C++ Programming > C++ and WinAPI


    Thread Tools Search this Thread
    Search this Thread:

    Advanced Search
    Display Modes Rate This Thread
    Rate This Thread:

    Posting Rules
    You may not post new threads
    You may not post replies
    You may not post attachments
    You may not edit your posts

    BB code is On
    Smilies are On
    [IMG] code is Off
    HTML code is Off
    Forum Jump


    All times are GMT -5. The time now is 01:32 AM.



    Acceptable Use Policy

    internet.comMediabistrojusttechjobs.comGraphics.com

    WebMediaBrands Corporate Info


    Advertise | Newsletters | Feedback | Submit News

    Legal Notices | Licensing | Permissions | Privacy Policy


    Powered by vBulletin® Version 3.7.3
    Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
    Copyright WebMediaBrands Inc. 2002-2009