Answer Questions
Geralyn Miller - MSFT Textbox +Only numbers
Hello, I want to control a textbox by pressing a button. If the input is not a number(double) I want to display an messagebox with an error. Sorry if this is a stupid question, I can't find it anywhere. Please help. bye Do you mean the URL did not load for you Or do you mean, you did not understand how the code is implemented (assuming you downloaded the class available in that URL) Coendou wro ...Show All
Karthik Gopalakrishna CTabCtrl question!
I got MFC CTab control in the dialog. It is inserted using resource editor, and bunch of other controls are pasted onto it. In the OnInitDialog() function tab is extended like this: It sure makes the code neater! But now I got a new problem. If you can help, please try: http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=256727&SiteID=1&mode=1 Thanx! Ok, and when I ...Show All
Peter Haik help for Errors in VC 6.0
Hi, guys I meet the following error information when I try to compile my source code in VC 6.0: error C2065: 'sprintf_instead_use_StringCbPrintfA_or_StringCchPrintfA' : undeclared identifier Anyone know how to solve it Thanks. Looks like you are trying to use newer header files with VC++ 6. It may not be a good idea to even try that. But if you want to try, you could specify a #define for STRSAFE_NO_DEPRECATE an ...Show All
VBRookie Working with bytes and bits
I'm writing a program (to be more exactly it's a DLL) that comunicates with some machines through the serial port, so I need to read 17 bytes from the buffer, get the first byte and split it into 7 bits (the serial port configuration specifies that will be 7 the number of data bits). - How can I get this value from the BYTE array and split it into an array of bits - I'm getting the value from a position of the BYTE array a writing to a fil ...Show All
FX11 CArray and typedef
Hi, I would like to be able to store two elements, at a time into a CArray is this possible. What i mean by that is i would like to put an ID, in the form of an int in, and a point object. I tried creating a typedef, like so: typedef CArray <int,CPoint> FIXED_POINTS_ARRAY; but when it comes to "Add" something in, i am unsure as to how to add these two things in, to say slot 3! could some one point me in the right direction ...Show All
Biber Technology Question about C++ char Pointer
When I use VC++ 6.0(with SP5.0) like this: char temp[2]; memset(temp,0,sizeof(temp)); strcpy(temp,"This is a test\0"); MessageBox(0,temp,temp,MB_OK); The result in temp[2] is "This is a test".There is only two bytes of memory,why can copy more than 2 bytes char Internally, code and data are in separate memory location. If your application is as t ...Show All
palestine How to disable support for C99 extensions / force compatability with C89?
Hello, I'm working on a school project that requires use of C89 and does not allow use of any C99 or non-standard language extensions. I'm a C++ programmer that is just learning the differences in C, so I would like to just have this enforced by the compiler. As such, is it possible to disable support for the C99 extensions on the compiler I'm using whidbey beta 2. Thanks, Byron I've just h ...Show All
MartinHouse Managed C++/CLI wrapper returning COM interface?
I have a Managed C++/CLI clas that contains unmanaged initialization code that ends up with an unmanaged COM interface pointer. I would like to return this pointer back to the 'managed world' as a reference. I have a COM interop dll that defines this interface (generated with tlbimp.exe) but of course the type of the pointer that the unmanaged code has comes from the .h file that midl.exe generated based on the IDL file. What would be the mos ...Show All
Schadix AsyncCallback
I am trying to use asynchronous sockets programming using VS2005 C++. Below is the code and error generated: mSocket->BeginAccept( gcnew AsyncCallback( &NETWORK::clsServer::AcceptConn ), mSocket ); void clsServer::AcceptConn(IAsyncResult^ ar) NETWORK is a namespace I created. error C3352: 'void NETWORK::clsServer::AcceptConn(System::IAsyncResult ^)' : the specified function does not match the delegate type 'void (System::I ...Show All
VenkatKrish Verifying the digital signature of a file
Hi, I'm trying to code a program to verify the digital signature of several exe, dll,... files. The problem is that I don't have the certificate nor signature that is applied to those files, and neither I know if I need them . I've been looking to microsoft msdn CryptoAPI, but I could not get nothing clear out of the examples. I suppose that I need to: - extract somehow the signature or certificate from the loaded (BYTE*) file (don't know how) - ...Show All
DevInstinct Dialog + Modeless
HI, I am trying to create a dialog. I have a .EXE which already as its Dialog and this dialog is create with the function DoModal(). This EXE loads my dll. and at some point my dll needs to lauch a modeless dialog... I have tried the following: DlgPtr = new DlgClass(); DlgPtr->Create( IDD_FIRST_DIALOG ); DlgPtr->ShowW ...Show All
zmax1234 Wrong Icon On Title Bar
Working with Visual Studio 2005, with a wizard-generated MFC application and no doc/view support, I get a generic application icon on my title bar. However, the wizard generated icon, IDR_MAINFRAME, is the icon with the MFC logo. The frame window is created via LoadFrame and IDR_MAINFRAME is passed to it. The program has no other icons associated with it. So why is the generic icon on the app's title bar What's weird is that it is ONLY i ...Show All
Lakshmi graphics.h
What happened to the graphics.h file because I can't find it anywhere on Visual C++ Express, and some of the programs on the internet require it in order for their programs to work properly. I always get errors whenever I try to compile and run a prgram using code from the net that says "#include <graphics.h>." Can anybody tell me why I don't have it or how to get it graphics.h is part of Borland Turbo C. It's a somewhat old c compi ...Show All
krisb CEditView and OnChar
Hello, everyone. I have a noob's question about using the OnChar function with CEditView. What I'm trying to do at the moment is develop a rudimentary console for a calculator program I'm working on. After every key return, it would display ">>" in a new line (think of something like the python IDLE). However, I have been able to find no function which displays text in CEditView. The following is my attempt at code to accept ke ...Show All
SL-USA Trying to get metainfo sample application to compile
I am currently trying to get the metainfo sample application that comes with VS 2003. The application code is located at (for a standard VS.Net install): C:\Program Files\Microsoft Visual Studio .NET 2003\SDK\v1.1\Tool Developers Guide\Samples\metainfo Since I am learning VC++ and the ins and outs of the VC++ IDE in VS.Net (tons of settings I haven't a clue about yet) ... I just can't the application to compile. Currently I am gettin ...Show All
