Click here to Skip to main content
15,115,667 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
SuggestionRe: ERROR: undefined reference to 'auxDIBImaheLoadA' Pin
David Crow7-Apr-16 6:22
MemberDavid Crow7-Apr-16 6:22 
GeneralRe: ERROR: undefined reference to 'auxDIBImaheLoadA' Pin
Ratul Thakur7-Apr-16 6:33
MemberRatul Thakur7-Apr-16 6:33 
SuggestionRe: ERROR: undefined reference to 'auxDIBImaheLoadA' Pin
Richard MacCutchan7-Apr-16 8:30
mveRichard MacCutchan7-Apr-16 8:30 
AnswerRe: ERROR: undefined reference to 'auxDIBImaheLoadA' Pin
leon de boer7-Apr-16 23:11
Memberleon de boer7-Apr-16 23:11 
GeneralRe: ERROR: undefined reference to 'auxDIBImaheLoadA' Pin
leon de boer8-Apr-16 0:06
Memberleon de boer8-Apr-16 0:06 
GeneralRe: ERROR: undefined reference to 'auxDIBImaheLoadA' Pin
Ratul Thakur8-Apr-16 3:28
MemberRatul Thakur8-Apr-16 3:28 
GeneralRe: ERROR: undefined reference to 'auxDIBImaheLoadA' Pin
Ratul Thakur8-Apr-16 7:57
MemberRatul Thakur8-Apr-16 7:57 
GeneralRe: ERROR: undefined reference to 'auxDIBImaheLoadA' Pin
leon de boer8-Apr-16 17:58
Memberleon de boer8-Apr-16 17:58 
The _T is a macro provided by TCHAR.H for unicode/multilingual support. If you go to the project settings->general tab->Character set you will have that to "not set" setting. That macro allows you to use the other choices being unicode and multi-byte character sets making your code work multilingual like in chineese windows.

For you in ascii mode the macro actually does nothing (which you worked out) but if you select the other modes you will see you will get an error on every static text the _T tells the compiler to make the string in the correct mode and removes the error.

Being a commercial programmer and as Microsoft has made it so easy for doing it we generally try and use the multilingual code calls since Visual Studio 2013. This became almost compulsory when trying to write true 64 bit applications. The default setting of an empty project is actually to set for unicode character set.

Essentially TCHAR becomes a replacement for the standard char and its size varies in the compilation modes. They provide new string functions that match the old string functions in TCHAR.H but have different code for the different modes. Lets give you an example

strlen becomes _tcslen those calls work identical the difference being _tcslen will work in any language mode compilation, while strlen will only work in language "not set" mode like you have. Here is the link to what is going on from MSDN
strlen, wcslen, _mbslen, _mbslen_l, _mbstrlen, _mbstrlen_l[^]

This code is designed specifically for windows (it uses the Win32 API), it is not general in nature like that could work on linux so there is no reason to write generically but we should try and cover the different modes of windows compilation, especially as it is easy.

So for me the changes are just habit.

There is a funny part of this that so many of us are writing in that style that the linux community is having issues trying to port our code. So if writing general code I would probably try to avoid this style of programming.
In vino veritas


modified 8-Apr-16 23:28pm.

QuestionWaitting on hEvent of Mailslot Pin
ForNow4-Apr-16 12:03
MemberForNow4-Apr-16 12:03 
AnswerRe: Waitting on hEvent of Mailslot Pin
CPallini5-Apr-16 1:53
mveCPallini5-Apr-16 1:53 
GeneralRe: Waitting on hEvent of Mailslot Pin
ForNow5-Apr-16 5:03
MemberForNow5-Apr-16 5:03 
AnswerRe: Waitting on hEvent of Mailslot Pin
Victor Nijegorodov5-Apr-16 4:25
MemberVictor Nijegorodov5-Apr-16 4:25 
GeneralRe: Waitting on hEvent of Mailslot Pin
ForNow5-Apr-16 8:31
MemberForNow5-Apr-16 8:31 
GeneralRe: Waitting on hEvent of Mailslot Pin
ForNow5-Apr-16 13:07
MemberForNow5-Apr-16 13:07 
GeneralRe: Waitting on hEvent of Mailslot Pin
Richard Andrew x645-Apr-16 13:39
professionalRichard Andrew x645-Apr-16 13:39 
GeneralRe: Waitting on hEvent of Mailslot Pin
ForNow5-Apr-16 14:21
MemberForNow5-Apr-16 14:21 
GeneralRe: Waitting on hEvent of Mailslot Pin
Richard Andrew x645-Apr-16 14:27
professionalRichard Andrew x645-Apr-16 14:27 
GeneralRe: Waitting on hEvent of Mailslot Pin
ForNow5-Apr-16 14:32
MemberForNow5-Apr-16 14:32 
GeneralRe: Waitting on hEvent of Mailslot Pin
leon de boer5-Apr-16 17:33
Memberleon de boer5-Apr-16 17:33 
QuestionHow to custmize the ribbon category at run time using MFC Pin
Ashish Ranjan Mishra4-Apr-16 7:36
MemberAshish Ranjan Mishra4-Apr-16 7:36 
SuggestionRe: How to custmize the ribbon category at run time using MFC Pin
David Crow5-Apr-16 16:50
MemberDavid Crow5-Apr-16 16:50 
Questioninput to be parsed to produce a node tree Pin
Member 124358024-Apr-16 6:45
MemberMember 124358024-Apr-16 6:45 
SuggestionRe: input to be parsed to produce a node tree Pin
Richard MacCutchan4-Apr-16 8:03
mveRichard MacCutchan4-Apr-16 8:03 
QuestionC, Win32 API: l need a help with file/data storage Pin
Member 121394424-Apr-16 5:32
MemberMember 121394424-Apr-16 5:32 
AnswerRe: C, Win32 API: l need a help with file/data storage Pin
jeron14-Apr-16 5:49
Memberjeron14-Apr-16 5:49 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.