Solved

DS_SHELLFONT & Visual C++ Net

Posted on 2003-11-06
15
1,268 Views
Last Modified: 2013-11-25
Hi everybody,


I've just tried to develop my first application on Visual C++ Net and I have the following problem:

I'd like to create a MFC application, dialog based.
When I click on finish, the following problem appears :
error :rc 2104 undefined key or unknow key DS_SHELLFONT
I have no idea how to fix this problem...
Thank you for your help....
Vincent
0
Comment
Question by:vinceTrace
  • 8
  • 7
15 Comments
 
LVL 23

Expert Comment

by:Roshan Davis
ID: 9699628
Try

#define WINVER 0x0400 in "stdafx.h"

Good Luck
0
 

Author Comment

by:vinceTrace
ID: 9699780
Unfortunately this line is already present in "stdafx.h"....
Thanks.
Vincent
0
 
LVL 23

Expert Comment

by:Roshan Davis
ID: 9699796
Try this
#define DS_SHELLFONT        (DS_SETFONT | 0x0008L)
Rosh :)
0
 

Author Comment

by:vinceTrace
ID: 9699857
does not work neither....
When I try to build my solution (only the Microsoft default files) I have 92 errors:
the first one is:

on afxv_w32.h error C2065 'DWORD_PTR': undeclared identifier

I had the habit to use Visual C++ 6.0 , and I'm really lost...
Thank you.
Vincent :)
0
 
LVL 23

Expert Comment

by:Roshan Davis
ID: 9699928
Exclude "#define VC_EXTRALEAN" from stdafx.h
0
 

Author Comment

by:vinceTrace
ID: 9699946
No changes...
Thanks.
0
 
LVL 23

Expert Comment

by:Roshan Davis
ID: 9699960
Tried #define WINVER 0x0500
Show me what all are includes u are using in stdafx.h

Just show the starting of resource.h and stdafx.h

Rosh :)
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 

Author Comment

by:vinceTrace
ID: 9699985
Here is Resource.h :

// Used by dotNet2.RC
//
#define IDR_MAINFRAME                              128
#define IDM_ABOUTBOX                              0x0010
#define IDD_ABOUTBOX                              100
#define IDS_ABOUTBOX                              101
#define IDD_DOTNET2_DIALOG                        102
#define IDR_MANIFEST                              CREATEPROCESS_MANIFEST_RESOURCE_ID

// Valeurs par défaut suivantes des nouveaux objets
//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS

#define _APS_NEXT_RESOURCE_VALUE      129
#define _APS_NEXT_CONTROL_VALUE            1000
#define _APS_NEXT_SYMED_VALUE            101
#define _APS_NEXT_COMMAND_VALUE            32771
#endif
#endif
----------------------------------------------------------------------------------------------------------------------------------------------------------------
Here is stdafx.h :

// stdafx.h : Fichier Include pour les fichiers Include système standard,
// ou les fichiers Include spécifiques aux projets qui sont utilisés fréquemment,
// et sont rarement modifiés

#pragma once

#define DS_SHELLFONT (DS_SETFONT|0x0008L)

/*#ifndef VC_EXTRALEAN
#define VC_EXTRALEAN            // Exclure les en-têtes Windows rarement utilisés
#endif*/

// Modifiez les définitions suivantes si vous devez cibler une plate-forme avant celles spécifiées ci-dessous.
// Reportez-vous à MSDN pour obtenir les dernières informations sur les valeurs correspondantes pour les différentes plates-formes.
#ifndef WINVER                        // Autorise l'utilisation des fonctionnalités spécifiques à Windows 95 et Windows NT 4 ou version ultérieure.
#define WINVER 0x0500            // Attribuez la valeur appropriée à cet élément pour cibler Windows 98 et Windows 2000 ou version ultérieure.
#endif

#ifndef _WIN32_WINNT            // Autorise l'utilisation des fonctionnalités spécifiques à Windows NT 4 ou version ultérieure.
#define _WIN32_WINNT 0x0400            // Attribuez la valeur appropriée à cet élément pour cibler Windows 98 et Windows 2000 ou version ultérieure.
#endif                                    

#ifndef _WIN32_WINDOWS            // Autorise l'utilisation des fonctionnalités spécifiques à Windows 98 ou version ultérieure.
#define _WIN32_WINDOWS 0x0410 // Attribuez la valeur appropriée à cet élément pour cibler Windows Me ou version ultérieure.
#endif

#ifndef _WIN32_IE                  // Autorise l'utilisation des fonctionnalités spécifiques à IE 4.0 ou version ultérieure.
#define _WIN32_IE 0x0400      // Attribuez la valeur appropriée à cet élément pour cibler IE 5.0 ou version ultérieure.
#endif

#define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS      // certains constructeurs CString seront explicites

// désactive le masquage MFC de certains messages d'avertissement courants et par ailleurs souvent ignorés
#define _AFX_ALL_WARNINGS

#include <afxwin.h>         // composants MFC principaux et standard
#include <afxext.h>         // extensions MFC
#include <afxdisp.h>        // Classes MFC Automation

#include <afxdtctl.h>            // Prise en charge des MFC pour les contrôles communs Internet Explorer 4
#ifndef _AFX_NO_AFXCMN_SUPPORT
#include <afxcmn.h>                  // Prise en charge des MFC pour les contrôles communs Windows
#endif // _AFX_NO_AFXCMN_SUPPORT
----------------------------------------------------------------------------------------------------------------------------------------------------------------
Thank you very much!
Vincent

0
 
LVL 23

Expert Comment

by:Roshan Davis
ID: 9700062
Did u added any code in that Project, Or changed any dialog property?

Here I'm getting all fine... These all what I did

New Project
Visual C++ Projects
MFC Application
Name the application

Application type - Dialog based
Click Finish
Build Solution
0
 

Author Comment

by:vinceTrace
ID: 9700085
I have tried a new project, Visual C++ Projects, MFC Application, MyApplication, and I've chosen dialog based.
Then I click on Finish and the same message appear:
error RC2104 : undefined keyword or key name : DS_SHELLFONT

I just don't understand...
Thanks
Vincent
0
 
LVL 23

Expert Comment

by:Roshan Davis
ID: 9700328
I think some Include folders or something is missing.....

Is that error comes before *Building* the Project?

Here I checked and all gone well..
0
 

Author Comment

by:vinceTrace
ID: 9700678
Yes that error occurs just after I click on finish.
Do you think it could a problem of installation?
Thank you very much for your help.
Vincent.
0
 
LVL 23

Expert Comment

by:Roshan Davis
ID: 9700709
I think thats an installation problem.

Do you have any old test programs, just take a copy of that and open that in VC.Net.

Check that Project....Old projects should work

Rosh :)
0
 

Author Comment

by:vinceTrace
ID: 9700766
When I open previous projects developped under VC++6.0,it converts them, but I cannot build them...I have lot of errors like :

Studio .NET 2003\Vc7\atlmfc\include\afxv_w32.h(230) : error C2065: 'DWORD_PTR' : undeclared identifier

c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\atlmfc\include\afxv_w32.h(230) : error C2143: syntax error : missing ';' before 'GetWindowThreadProcessId'

c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\atlmfc\include\atlalloc.h(344) : error C3861: '_resetstkoflw': identifier not found, even with argument-dependent lookup

and so on...
I had the impression that the installation did not met any problems, but...
If you think I should reinstall VC Net I'll do, I don't want to make you waste your time.
Thank your for your help.
Vincent.
0
 
LVL 23

Accepted Solution

by:
Roshan Davis earned 250 total points
ID: 9706562
Hi Vincent,

sorry for the delay, I came to native yesterday from Bangalore.
I think reinstallation will solve the problem.

Rosh :)
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Introduction: Displaying information on the statusbar.   Continuing from the third article about sudoku.   Open the project in visual studio. Status bar – let’s display the timestamp there.  We need to get the timestamp from the document s…
Introduction: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now