| | |
AFXMessageBox
Please support our C++ advertiser: Intel Parallel Studio Home
![]() |
I suppose you are using Visual C++. From the little info that you give, you seem to be calling the function AfxMessageBox, but passing parameter that does not match its declaration.
We need to see the codes where you call this function, and the full error message (your error message says "convert parameter 1 from type 'char [30]", but did not mention to which type?).
We need to see the codes where you call this function, and the full error message (your error message says "convert parameter 1 from type 'char [30]", but did not mention to which type?).
Founder of :
Lexel Technologies Pte Ltd - SMS (TXT) Marketing software solution
My Blogs: Gooner's Sanctuary
Pet Directory and Forum: FurryTale.net
Lexel Technologies Pte Ltd - SMS (TXT) Marketing software solution
My Blogs: Gooner's Sanctuary
Pet Directory and Forum: FurryTale.net
•
•
Join Date: Dec 2007
Posts: 360
Reputation:
Solved Threads: 69
AfxMessageBox requires a LPCTSTR but you pass an array of char[30] as a parameter.
works without any problems (in a non-Unicode project).
C++ Syntax (Toggle Plain Text)
char str[30] = "Hello world!"; AfxMessageBox(&x[0]);
works without any problems (in a non-Unicode project).
Last edited by jencas; Oct 23rd, 2008 at 6:47 am.
If you are forced to reinvent the wheel at least try to invent a better one!
Please use code tags - Please mark solved threads as solved
Please use code tags - Please mark solved threads as solved
or for UNICODE
C++ Syntax (Toggle Plain Text)
TCHAR str[] = _TEXT("Hello world!"); AfxMessageBox(x);
Last edited by Ancient Dragon; Oct 23rd, 2008 at 7:50 am.
Don't PM me with questions -- you might get a nasty PM in response. If you have a question then post it in one of the forums.
![]() |
Similar Threads
- Database Connectivity in C (C)
- dll problem,help me:) (C)
- MFC Listener (C)
- Displaying records (C++)
- new to windows apps (C)
- LR_DEFAULTSIZE|LR_LOADFROMFILE in WinCE (C++)
- Preprocessor directives (Visual Basic 4 / 5 / 6)
Other Threads in the C++ Forum
- Previous Thread: MAPI
- Next Thread: Expert Help Needed Plz................URGENT
| Thread Tools | Search this Thread |
api array arrays based binary c++ c/c++ calculator char char* class classes code compile compiler console conversion count delete deploy desktop directshow dll download dynamic dynamiccharacterarray email encryption error file forms fstream function functions game givemetehcodez google graph gui homeworkhelp homeworkhelper iamthwee ifstream input int integer java lib linkedlist linker linux list loop looping loops map math matrix memory news number numbertoword output parameter pointer problem program programming project python random read recursion recursive reference return rpg sorting string strings struct temperature template templates test text text-file tree unix url variable vector video visual visualstudio win32 windows winsock wordfrequency wxwidgets






