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:
//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
/////////////////////////////////////////////////////////////////////////////
and my resource.h file:
//{{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.