| | |
Dev-cpp XP manifest file.
Please support our C++ advertiser: Intel Parallel Studio Home
Thread Solved |
•
•
Join Date: Mar 2009
Posts: 7
Reputation:
Solved Threads: 0
Hello,
I've started learning how to make simple GUI programs in cpp using theforgers tutorial. However I was going to add XP style to my program and I found a page that showed me exacly how to do it for VC++ 6. The problem when I had added the lines in my resource.h file and my res.rc file was that my program refused to start. The window didn't show up. When I removed the line in the resourcefile it showed up again but with the old 95/98/ME/2000 style. What should i do to make it work.
This is my .rc file:
and my resource.h file:
Thanks.
I've started learning how to make simple GUI programs in cpp using theforgers tutorial. However I was going to add XP style to my program and I found a page that showed me exacly how to do it for VC++ 6. The problem when I had added the lines in my resource.h file and my res.rc file was that my program refused to start. The window didn't show up. When I removed the line in the resourcefile it showed up again but with the old 95/98/ME/2000 style. What should i do to make it work.
This is my .rc file:
C++ Syntax (Toggle Plain Text)
//Microsoft Developer Studio generated resource script. // #include "resource.h" #define APSTUDIO_READONLY_SYMBOLS ///////////////////////////////////////////////////////////////////////////// // // Generated from the TEXTINCLUDE 2 resource. // #define APSTUDIO_HIDDEN_SYMBOLS #include "windows.h" #undef APSTUDIO_HIDDEN_SYMBOLS ///////////////////////////////////////////////////////////////////////////// #undef APSTUDIO_READONLY_SYMBOLS ///////////////////////////////////////////////////////////////////////////// // English (U.S.) resources #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) #ifdef _WIN32 LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US #pragma code_page(1252) #endif //_WIN32 #ifdef APSTUDIO_INVOKED ///////////////////////////////////////////////////////////////////////////// // // TEXTINCLUDE // 1 TEXTINCLUDE DISCARDABLE BEGIN "resource.h\0" END 2 TEXTINCLUDE DISCARDABLE BEGIN "#define APSTUDIO_HIDDEN_SYMBOLS\r\n" "#include ""windows.h""\r\n" "#undef APSTUDIO_HIDDEN_SYMBOLS\r\n" "\0" END 3 TEXTINCLUDE DISCARDABLE BEGIN "\0" END #endif // APSTUDIO_INVOKED MANIFEST_RESOURCE_ID 24 MOVEABLE PURE "projekt1.exe.manifest" ///////////////////////////////////////////////////////////////////////////// // // Dialog // IDD_MAIN DIALOG DISCARDABLE 0, 0, 207, 156 STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Simply refreshed" FONT 8, "MS Sans Serif" BEGIN LTEXT "Username: ",IDC_STATIC,3,8,140,8 LTEXT "Password: ",IDC_STATIC,3,22,140,8 EDITTEXT IDC_USERNAME,40,7,70,12,ES_AUTOHSCROLL EDITTEXT IDC_PASSWORD,40,21,70,12,ES_PASSWORD PUSHBUTTON "Login",IDC_LOGIN,113,7,50,14 PUSHBUTTON "&Remove",IDC_REMOVE,150,47,50,14 PUSHBUTTON "&Clear",IDC_CLEAR,150,63,50,14 LTEXT "This item was hhghghghghghgghhghgadded\njj",IDC_STATIC,7,141,66,16 CTEXT "-",IDC_SHOWCOUNT,77,141,32,8 LTEXT "times",IDC_STATIC,114,141,17,8 END ///////////////////////////////////////////////////////////////////////////// // // DESIGNINFO // #ifdef APSTUDIO_INVOKED GUIDELINES DESIGNINFO DISCARDABLE BEGIN IDD_MAIN, DIALOG BEGIN LEFTMARGIN, 7 RIGHTMARGIN, 200 VERTGUIDE, 145 VERTGUIDE, 150 TOPMARGIN, 7 BOTTOMMARGIN, 149 END END #endif // APSTUDIO_INVOKED #endif // English (U.S.) resources /////////////////////////////////////////////////////////////////////////////
C++ Syntax (Toggle Plain Text)
//{{NO_DEPENDENCIES}} // Microsoft Developer Studio generated include file. // Used by ctl_one.rc // #define MANIFEST_RESOURCE_ID 1 #define IDC_STATIC -1 #define IDD_MAIN 101 #define IDC_TEXT 1000 #define IDC_NUMBER 1001 #define IDC_LIST 1002 #define IDC_LOGIN 1003 #define IDC_CLEAR 1004 #define IDC_REMOVE 1005 #define IDC_SHOWCOUNT 1007 #define IDC_USERNAME 1006 #define IDC_PASSWORD 1008 // Next default values for new objects // #ifdef APSTUDIO_INVOKED #ifndef APSTUDIO_READONLY_SYMBOLS #define _APS_NEXT_RESOURCE_VALUE 102 #define _APS_NEXT_COMMAND_VALUE 40001 #define _APS_NEXT_CONTROL_VALUE 1009 #define _APS_NEXT_SYMED_VALUE 101 #endif #endif
Thanks.
Last edited by freddan007; Mar 6th, 2009 at 1:29 pm.
•
•
Join Date: Mar 2009
Posts: 7
Reputation:
Solved Threads: 0
My manifest file:
I added InitCommonControlsEx(); at a random location but the compiler said it wasn't defined. What library is InitCommonControlsEx() in?
C++ Syntax (Toggle Plain Text)
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0"> <assemblyIdentity version="1.0.0.0" processorArchitecture="X86" name="Zhorn.Styles.Styles" type="win32" /> <description>Styles - demonstrate XP styles</description> <dependency> <dependentAssembly> <assemblyIdentity type="win32" name="Microsoft.Windows.Common-Controls" version="6.0.0.0" processorArchitecture="X86" publicKeyToken="6595b64144ccf1df" language="*" /> </dependentAssembly> </dependency> </assembly>
•
•
Join Date: Mar 2009
Posts: 7
Reputation:
Solved Threads: 0
I still get an error:
My includes:
I added the WM_CREATE in the Message switch
C++ Syntax (Toggle Plain Text)
Main.cpp In function `BOOL DlgProc(HWND__*, UINT, WPARAM, LPARAM)': Main.cpp `InitCommonControlsEx' undeclared (first use this function) (Each undeclared identifier is reported only once for each function it appears in.) Makefile.win [Build Error] [Main.o] Error 1
My includes:
c++ Syntax (Toggle Plain Text)
#include <windows.h> #include <commctrl.h> #include "resource.h" using namespace std;
I added the WM_CREATE in the Message switch
c++ Syntax (Toggle Plain Text)
case WM_CREATE: InitCommonControlsEx(); break;
•
•
Join Date: Nov 2007
Posts: 979
Reputation:
Solved Threads: 209
•
•
•
•
I still get an error:
C++ Syntax (Toggle Plain Text)
Main.cpp In function `BOOL DlgProc(HWND__*, UINT, WPARAM, LPARAM)': Main.cpp `InitCommonControlsEx' undeclared (first use this function) (Each undeclared identifier is reported only once for each function it appears in.) Makefile.win [Build Error] [Main.o] Error 1
#define _WIN32_IE to at least 0x0300 . InitCommonControlsEx() takes a pointer to a INITCOMMONCONTROLSEX struct. You are not using the function correctly ...
•
•
•
•
I added the WM_CREATE in the Message switch
c++ Syntax (Toggle Plain Text)
case WM_CREATE: InitCommonControlsEx(); break;
•
•
Join Date: Mar 2009
Posts: 7
Reputation:
Solved Threads: 0
I added
#define _WIN32_IE 0x0301
in resources.h and created the struct
but the INITCOMMONCONTROLSEX seems to be undeclared:
#define _WIN32_IE 0x0301
in resources.h and created the struct
c++ Syntax (Toggle Plain Text)
INITCOMMONCONTROLSEX InitCtrlEx; InitCtrlEx.dwICC = ICC_STANDARD_CLASSES; InitCtrlEx.dwSize=sizeof(INITCOMMONCONTROLSEX); InitCommonControlsEx(&InitCtrlEx);
C++ Syntax (Toggle Plain Text)
Main.cpp `INITCOMMONCONTROLSEX' undeclared (first use this function)
•
•
Join Date: Nov 2007
Posts: 979
Reputation:
Solved Threads: 209
resource.h is not the place to define _WIN32_IE. Do it instead above the #includes, i.e.
Or alternatively in the project's configuration.
C++ Syntax (Toggle Plain Text)
#define _WIN32_IE 0x0301 #include <windows.h> #include <commctrl.h>
Or alternatively in the project's configuration.
![]() |
Other Threads in the C++ Forum
- Previous Thread: cout did not appear and Nesting IF ELSE
- Next Thread: Linking static library to C++ DLL
| Thread Tools | Search this Thread |
Tag cloud for C++
api application array arrays based beginner binary bmp c++ c/c++ calculator char char* class classes code compile compiler console conversion convert count data delete deploy dll download dynamic dynamiccharacterarray email encryption error file format forms fstream function functions game givemetehcodez graph gui homeworkhelp iamthwee ifstream input int java lib library linker list loop looping loops map math matrix memory microsoft newbie news number numbertoword output pointer problem program programming project python random read recursion recursive reference rpg simple sorting string strings temperature template templates test text text-file tree url variable vector video visual visualstudio void win32 windows winsock wordfrequency wxwidgets





