Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. bkelly13

    strol always returns error 122

    Hello ArkM, When GetLastError() returned 122, ERROR_INSUFFICIENT_BUFFER, I tried the only thing I could think of, make the return variable longer. I with change to your recommended errorno() on Monday. Thank you. We need to know what a dragon is before we study its anatomy. (Bryan Kelly, 2010)
  2. bkelly13

    strol always returns error 122

    Thank you, I will make some code changes. Since the value from GetLastError() was not zero, I think that implies that there is an error. Perhaps I had best check the previous code. We need to know what a dragon is before we study its anatomy. (Bryan Kelly, 2010)
  3. bkelly13

    strol always returns error 122

    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...
  4. bkelly13

    using CreateDIBSection()

    That made a difference. Now my_bitmap and ppvBits both are no longer zeroes. I was thinking that was the size of the bit map I wanted. I do find it curious that the size of the structure must be in there. There are no pointers, no arrays, nothing I can see that would ever change the size of...
  5. bkelly13

    using CreateDIBSection()

    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...
  6. bkelly13

    put bits on the screen

    I finally found out about: CreateDIBSection API and found this: http://www.codeproject.com/KB/graphics/dibsection.aspx There is much more to do but now I have a clue. We need to know what a dragon is before we study its anatomy. (Bryan Kelly, 2010)
  7. bkelly13

    combo box, extremely simple

    Thank you for that tip, so armed I was able to figure some things out. But I am not quite there yet. I created the combo box and hardcoded the display values as: 1;2;3;4; and up through 12. When the code runs the combo box is displayed and the drop down shows the available selection. So far...
  8. bkelly13

    combo box, extremely simple

    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...
  9. bkelly13

    put bits on the screen

    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...
  10. bkelly13

    GetSystemTime

    Now I see my error. I was not reading carefully and did not recognize that LPSYSTEMTIME is a pointer to SYSTEMTIME. I was thinking that LPSYSTEMTIME was just a variant (one of many types, not variant as in BASIC) of the system time structure. I could have written SYSTEMTIME right_now...
  11. bkelly13

    GetSystemTime

    The OP contains: mp_start = &m_start; If that is not a valid initialization please advise. At work I shifted to the type SYSTEMTIME and it works as expected. A second check of the VS2008 help utility shows LPSYSTEMTIME and not SYSTEMTIME. I find that rather curious in that it differs from...
  12. bkelly13

    too simple to see

    RE: C_AR2_Messages.h *m_messages; and RE: You have bad declaration and syntax error in the OP snippet, then you are writing about mysterious "can't see" problems. You are correct, until you mentioned it I just could not see that error (the one in my OP). That's a typo in creating the post...
  13. bkelly13

    GetSystemTime

    On my home computer I found and ran: SYSTEMTIME start_time; ... GetSystemTime( &start_time ); Which works fine. I am pretty sure I obtained LPSYSTEMTIME from the help VS facility at work. Visual Studio 2008 are running on both computers. I wonder why the difference and why the LPSYSTEMTIME...
  14. bkelly13

    GetSystemTime

    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 *...
  15. bkelly13

    too simple to see

    RE: Q1. Where is an error in (see OP snippet senseless declaration;):CODEC_AR2_Messages.h *m_messages; // syntax errorA1. Correct class name. The problem is that in file C_AR2_MessagesAppDlg.h the compiler did not accept any declarations from C_AR2_MessagesAppDlg.h and class...
  16. bkelly13

    too simple to see

    I don't see an edit function in this forum so I must add a reply. I have partially figured this out. The new class needs to reference some types declared in the original. That results in each one haveing a include for the other. When I edit C_AR2_Messages and remove the include for...
  17. bkelly13

    too simple to see

    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; //...
  18. bkelly13

    copying std::string to CString

    For the record, I think I finally have a handle on this concept. (Please don't hammer me for typos and syntax, my code is at work and I cannot cut and paste.) std::a_string = "a_string"; std::string *b_string = "b_string"; // does not work CString c_string.Format(L"a is %s b is %s", <and...
  19. bkelly13

    emptying std::map

    Cool. You set me straight on a couple of points and I have the maps working well. Thank you, We need to know what a dragon is before we study its anatomy. (Bryan Kelly, 2010)
  20. bkelly13

    copying std::string to CString

    Your reply was helpful. I am almost there but some troubles remain. The application is in Visual Studio 2008, MFC, No ATL, No CLR. I have some code to read text from a file. That code uses reads the text into an std::string. When an error is discovered I need to show it to a user with...

Part and Inventory Search

Back
Top