|
Hello,
When I build my MFC project at warning level 4 using VS6sp5, the compiler generates a ton of warning messages from the locale files xlocale and xlocnum. Is this a normal occurance ? I don't want to see these warnings every time I do a rebuild, so how can build my own project files at warning level 4 but outside includes at level 3 ? Or is there a better solution ?
An example of the compiler messages I receive is shown below.
Thank You
srs
c:\program files\microsoft visual studio\vc98\include\xlocnum(599) : warning C4018: '<' : signed/unsigned mismatch
c:\program files\microsoft visual studio\vc98\include\xlocnum(588) : while compiling class-template member function 'class std::ostreambuf_iterator<unsigned short,struct std::char_traits<unsigned short> > __cdecl std::num_put<unsigned short,
class std::ostreambuf_iterator<unsigned short,struct std::char_traits<unsigned short> > >::_Iput(class std::ostreambuf_iterator<unsigned short,struct std::char_traits<unsigned short> >,class std::ios_base &,unsigned short,char *,unsigned int)'
c:\program files\microsoft visual studio\vc98\include\xlocnum(606) : warning C4018: '<=' : signed/unsigned mismatch
c:\program files\microsoft visual studio\vc98\include\xlocnum(588) : while compiling class-template member function 'class std::ostreambuf_iterator<unsigned short,struct std::char_traits<unsigned short> > __cdecl std::num_put<unsigned short,
class std::ostreambuf_iterator<unsigned short,struct std::char_traits<unsigned short> > >::_Iput(class std::ostreambuf_iterator<unsigned short,struct std::char_traits<unsigned short> >,class std::ios_base &,unsigned short,char *,unsigned int)'
c:\program files\microsoft visual studio\vc98\include\xlocale(204) : warning C4244: '=' : conversion from 'unsigned int' to 'char', possible loss of data
c:\program files\microsoft visual studio\vc98\include\xlocnum(151) : see reference to function template instantiation 'int __cdecl std::_Getloctxt(class std::istreambuf_iterator<char,struct std::char_traits<char> > &,class std::istreambuf_it
erator<char,struct std::char_traits<char> > &,unsigned int,const char *)' being compiled
c:\program files\microsoft visual studio\vc98\include\xlocale(207) : warning C4244: '=' : conversion from 'unsigned int' to 'char', possible loss of data
c:\program files\microsoft visual studio\vc98\include\xlocnum(151) : see reference to function template instantiation 'int __cdecl std::_Getloctxt(class std::istreambuf_iterator<char,struct std::char_traits<char> > &,class std::istreambuf_it
erator<char,struct std::char_traits<char> > &,unsigned int,const char *)' being compiled
|
|
|
|
|
Fixed.
My solution to this problem was to change the global warning level before including the headers that used the locale files, like so :
#pragma warning(push, 3)
#if !defined(_BITSET_)
# include <bitset>
#endif // !defined(_BITSET_)
#pragma warning(pop)
|
|
|
|
|
I need a xml filter for Indexing services. There are any chances to find one that is working ?
Do you have experience (positive / or ..) using this filter ?
Thanks a loot .
|
|
|
|
|
Is there a way to automatically zoom the CDC of a window?
ScaleViewportExt sounded like that, but didn't seem to do anything at all :/
|
|
|
|
|
here's a quick and dirty way to do it..
put this at the top of your OnDraw/OnPaint
int lpx = pDC->GetDeviceCaps(LOGPIXELSX);
int lpy = pDC->GetDeviceCaps(LOGPIXELSY);
pDC->SetMapMode(MM_ISOTROPIC);
pDC->SetWindowExt(CSize(lpx * (100.0 / (double)m_fZoomPct) , lpy * (100.0 / (double)m_fZoomPct)));
pDC->SetViewportExt(lpx, lpy);
-c
Please stand by
|
|
|
|
|
how i can make dll send message to application
salah
gis member
|
|
|
|
|
I have a problem opening a socket.
I have tried this way but it do not create the socket.
CSocket* pSocket;
pSocket = new CSocket;
pSocket->Create();
pSocket->Connect("212.5.133.1",80);
What am I wrong?
Trin2
|
|
|
|
|
I tend not to use CSocket for winsock work, so this might not be right, but I quick look in MSDN suggest's you have your parameter's wrong for Connect(). Does this even compile?
BOOL Create( UINT nSocketPort = 0, int nSocketType = SOCK_STREAM, LPCTSTR lpszSocketAddress = NULL );
Dylan
"In meetings, the person who is least competent usually does the most talking. Talking is a direct substitute for competence, at least in the minds of other people. Five minutes after you leave a meeting, you won't remember what anyone said but you will remember who did most of the talking. Withing a day your mind will translate that into a notion that the talker was unusually knowledgeable" - Scott Adams, Dilbert and the way of the weasel
|
|
|
|
|
see CreateProcess
or
SHELLEXECUTEINFO info;
memset( &info, 0, sizeof info );
info.cbSize = sizeof info;
info.fMask = SEE_MASK_NOCLOSEPROCESS;
info.lpVerb = "open";
info.lpFile = "urExe.exe";
info.nShow = SW_SHOWNORMAL;
ShellExecuteEx( &info );
WaitForInputIdle( info.hProcess, INFINITE );
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
I've finished a socket application and am trying to
build the core part of the application into a DLL. the "core part" includes CMySocket class derived from CAsyncSocket, and some other helper classes.
CMySocket stores a pointer to a CMainFrame object, which has proper functions that handle events occuring on the socket.
The main purpose of writing this DLL is to make the
CMySocket class easy to be reused for future applications.
I want to define the handler function prototypes that the
future applications would follow. I don't want to restrict the pointer to a CMainFrame object, rather it can be
pointing to any CWnd-like object, which would allow more flexibility.
My question is: since CMySocket needs a pointer to a CWnd
to call proper handlers when events occuer, how can I get rid of the implementation of the functions and hence the CWnd-like class? (I don't think deriving a class from CWnd
is a good idea; if so, that means the applications need to derived another new class from that one. Is it?)
This is the first i ever try to build a DLL. Any hint is strongely welcome.
(btw, the DLL would be an MFC extention DLL)
Thank you so much!
Wenrich
|
|
|
|
|
I am developing an TAPI application. I made dial by using lineMakeCall fn. It works fine. But my requirement is to dial '705', after ringing tone arrives i have to press destination number. How it could be possible.
Please help me.
|
|
|
|
|
Do you mean the dial tone, you can't dial numbers whilst a phone line is ringing. Or did you mean when the phone is answered.
Have a look at the LINE_CALLSTATE messages, especially LINECALLSTATE_DIALTONE and LINECALLSTATE_CONNECTED.
Michael
Fat bottomed girls
You make the rockin' world go round -- Queen
|
|
|
|
|
I am writing a C Dll which the user wants to be able to modify the source of and recompile himself. However they dont want to install VC, which is what I am using to create the dll. I looked into the GCCC compiler but got lost because it seems you have to build the source etc and configure it. Does anyone know of a simple free compiler that I can download, which just compiles the dll? The dll has a .c file and a .def file.
If the gccc compiler is really not that complicated, perhaps you can simplify the concept and give me a quick outline about it?
Appreciate your help,
ns
|
|
|
|
|
Cygwin is a UNIX environment for Windows and comes with gcc pre-built. There's also a compiler called DJGPP although I've never used it.
he he he. I like it in the kitchen! - Marc Clifton (on taking the heat when being flamed)
Awasu v0.4a[^]: A free RSS reader with support for Code Project.
|
|
|
|
|
though there are bound to be lots of difficulties trying to get code written for VC to compile with gcc
--
Help me! I'm turning into a grapefruit!
|
|
|
|
|
Its a very straightforward C dll which does averaging and similiar number crunching with a signature of MyDll(int* a, int*b).....
Hopefully gcc can handle that...?
Anyways I still need to find out how to get a dll out of my .def file and my .c file.....
Thanks!
Appreciate your help,
ns
|
|
|
|
|
I have a feeling the way dlls are defined in VC and GCC are different (since this isn't a standardised language issue) - the .def file is a VC thing
Don't quote me on that though
--
Help me! I'm turning into a grapefruit!
|
|
|
|
|
OOps! I should've said I'm on Windows. I did find an gcc executable but now have to figure out how to compile a dll from a .c and a .def file.....
Thanks though.
Appreciate your help,
ns
|
|
|
|
|
I did find a built .exe for windows for the gcc compiler, but now need to find out how to build a dll with a .c and a .def file......any one have any info on this? Dont see it in the docs....
Appreciate your help,
ns
|
|
|
|
|
I've never done it but there are a lot of people doing Windows development using Cygwin. You need a module called mingw32.
he he he. I like it in the kitchen! - Marc Clifton (on taking the heat when being flamed)
Awasu v0.4a[^]: A free RSS reader with support for Code Project.
|
|
|
|
|
There used to be a compiler called DJGPP that was good for C stuffs. It might be free or shareware too.
Jeff Rothenberg
Project Engineer
Vector CANtech, Inc.
|
|
|
|
|
You may consider taking another route: scripting! If you write your source code in VBScript (or JavaScript), you can then use Microsoft's scripting engine to run the code from your main program. Since it's in VBScript, the user will probably be able to modify the code more easily and they won't have to worry about recompiling it, since your main program will interpret it a run-time.
Regards,
Alvaro
Well done is better than well said. -- Benjamin Franklin
(I actually prefer medium-well.)
|
|
|
|
|
Hmmm...have to look into this. Sounds promising...I have to get the background on this. Thanks for the pointer...
Appreciate your help,
ns
|
|
|
|
|
|