473,387 Members | 1,453 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

About MFC cannot convert parameter 1 from 'const char [42]' to 'LPCTSTR'

Hello,

I am a newbies in .NET and i am followin a tutorial to create my first MFC program but when a compile a have this problem:
See the file attach!

Please help


Compiling...
HelloMFCDlg.cpp
c:\documents and settings\propriétaire\mes documents\visual studio 2005\projects\hellomfc\hellomfc\hellomfcdlg.cpp(15 8) : error C2664: 'CWnd::SetWindowTextW' : cannot convert parameter 1 from 'const char [42]' to 'LPCTSTR'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
Build log was saved at "file://c:\Documents and Settings\Propriétaire\Mes documents\Visual Studio 2005\Projects\HelloMFC\HelloMFC\Debug\BuildLog.htm "
HelloMFC - 1 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
Apr 14 '06 #1
1 7967
Banfa
9,065 Expert Mod 8TB
The "attached code" does not appear to actually be attached. Can you post it please as I am having trouble recreating the error here.
Apr 18 '06 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: seia0106 | last post by:
Hello I am writing a function to read a binary file. Here is a part of code #include <fstream> .. .. BYTE *pData; long lDataLen; pms->GetPointer(&pData); lDataLen = pms->GetSize(); // Read...
5
by: Brad Moore | last post by:
Hey all, I'm getting the following compiler error from my code. I was wondering if anyone could help me understand the concept behind it (I actually did try and compile this degenerate...
4
by: Joe H | last post by:
Hi i converted a program to a lib. The parameters of main are maincommand(int argc, char **argv) I want to use main a s function that takes a string how can i convert a char * to a char ** or even...
2
by: lolomgwtf | last post by:
I have a managed C++ method that wraps unmanaged code and creates a managed object holding data retrieved form an unmanged one. I want create an instance of this managed class in C#, pass it to...
8
by: ppcdev | last post by:
Here's what I try : LPCTSTR tst = (LPCTSTR) (LPCWSTR) Marshal::StringToHGlobalUni(str); c:\MyNetPrj\Prj0001\stunt.cpp(244): error C2440: 'type cast' : cannot convert from 'System::IntPtr' to...
7
by: GRoll35 | last post by:
This is 1 source page of a project im working on. i just have this one error. i'll show the error then show the code.. i'll point out the line that it doesn't like. if anyone has any ideas or...
10
by: farseer | last post by:
How can i do this? i'd like to call the following code: .... string url = <my urld>; TCHAR* urlParams = GetParams( ); url.append( (char * ) urlParams ); GotoURL( ( LPCTSTR ) url ); ...
3
by: bg_ie | last post by:
Hi, I am using a API I downloaded from the internet programmed in C. I need the function below which works with this api in my c++ file - void StoreNoteCallback(void *context, int arglen,...
5
by: T. Crane | last post by:
Help! I am trying to figure this out, and I have the impression that it should be really easy, but I'm at a loss. Here's my problem: I want to take the output from const char *...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.