environment: Windows 7, 64 bit, Visual Studio 2008, C++
string t_string;
...
long long temp = strol( t_string.c_str(), NULL, 10 )
long error = GetLastError();
*return_value = (int) temp;
After finding that atoi returns 0 on error, I shifted to strol because it sets the system error value...
My project inputs a telemetry stream that includes a real time image. From various places I have put together some code that seems like it should create a DIB and be ready to use. But the call to CreatDIBSection leaves my_bitmap and the pointer ppvBits both set to zero. The GetLastError...
Visual Studio 2008, MFC, Windows XP
I created a combo box with a drop down that displays the numbers 01 through 12. The range will never change. The name is IDC_STREAM_NUMBER. After creating an even handler the name IDS_STREAM_NUMBER doesn't like putting the -> or . (dot) notation after it...
Visual Studio 2008, C++, Windows XP or Windows 7. Good coder but still novice with Visual Studio
Summary: What is the simplest method of putting bits on the screen, least overhead.
My project receives video bits from a telemetry stream composing an image of about 100 by 100 pixels. The...
Windows XP, Visual Studio 2008, C++
I am having a problem with this system call.
LPSYSTEMTIME m_start;
LPSYSTEMTIME *mp_start;
...
mp_start = &m_start;
...
GetSystemTime( m_start ); // run time exception
GetSystemTime( &m_start ); // compile error , cannot convert from LPSYSTEMTIME *...
VS 2008, C++, Windows XP, MFC project
In the main application file C_AR2_MessagesAppDlg.h is:
#include "C_AR2_Configuration.h" // class of same name
#include "C_AR2_Messages.h" // ditto
...
public:
C_AR2_Configuration *m_configuration; // OK
C_AR2_Messages.h *m_messages; //...
Windows XP Pro, Visual Studio, C++, MFC, No ATL or CLR
We need to access an array of pointers using the following concept:
Int tag; // 32 bit int
Struct{ int, int, bool } my_struct;
My_struct *p_info;
// the critical part is fetching the pointers.
p_info = my_array[ tag ]
Speed takes...
I am having a difficult time moving data from std::string to a CString that is part of a structure. Here is the essence:
typedef struct
{
int stream_number;
CString sfid_name;
int sifd_counter;
CString msg_prefix;
int length;
} td_input_stream;
td_input_stream...
I have an std::map that is working, but there are problems when I try to empty it. The declaration looks like this:
std::map< int, DP_MESSAGE_STRUCT * > m_dp_messages;
std::map< int, DP_MESSAGE_STRUCT * >::iterator m_msg_iterator;
I can put data in the map and read the data. The structure has...
Windows XP Pro, Visual Studio 2008.
I created some test code at home using std::map (Windows 7, visual studio 2008) and it worked fine. Back at work I cannot get past step 2. (step 1 is write code and compile) It appears that the map delcaration is okay and the code compiles, but when I do...
VS 2008, Windows XP Pro, novice VS user.
A vendor supplied API has as its input a string formatted as:
their_function( _bstr_t feedback feedback_name )
When an error is detected I need to show the argument. I try to put the data in a CString as follows:
CString t_show.Format( L"bad parameter...
A vendor's appllication has one of its GUI's set to maximum. There are several windows that must be available during operation so every time I start this one I must un-maximize it. (That's an inelegant term. Is there something better?) The vendor is not interersted in changing their program...
One of my learning books said that the dereference operator had the same precedence as incrrement and decrement operators. Doubting that I searched and found that de-reference is the same as prefix increment and decrement, but less than postfix. Just for grins I ran a test. Now I think my...
Windows 7, Visual Studio 2008 C++
Assignment operator overload
Horton's book VS C++ 2008 provides this example of operator overloading for classes:
motto1 = motto2 = motto3;
where motto1 through3 are instances of class CMessage and contain member function of type char * for an example. Then...
Windows 7, Visual Studio 2008, C++
The question is: why is the strcpy_s returning an error that the destination is too small?
I am following a book and playing around with constructors. The constructor in question is this:
C_box( char * new_name, float w = 1.0, float l = 1.0, float h = 1.0 )...
We have a Wyle G2 running Windows XP (telemetry system) sending data to a Dell Power Edge 2950 running Server 2008 as 32 bit OS (because the vendor is not yet ready for 64 bit) and IADS display system. The vendor application on the XP that is sending data to the Dell constantly complains about...
I am getting funble fingers in my old age and need a caps lock sound. I am writing a bunch of Windows C++ code and type many characters in caps lock. I type by touch and keep getting the caps lock key reverse of what I want. Is there a relatively simple way of making XP produce a sound for...
I am ignorant about Microsoft servers, but the guys trying to configure the server have hit a snag and I am trying to dig up some information that may help.
The server is 2008 R2, running 64 bit system. They have installed an earlier server using the virtual system. the utility, IADS by...
I have never had an opportunity to mess with servers or do any network configuring. I just need to know if something is feasible and where to look to learn about how it might be done.
We have a small network with about two or three dozen computers in several buildings with Cisco switches...
I am brand new to Server 2008 and to an application that is running on it. This is on a military base anything added must be absolutely necessary.
The application makes extensive use of file name extensions, long and sometimes several dots. How can I force Explorer to show the text of the...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.