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

    ...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. However, if...
  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_bit_map_info; BITMAPINFOHEADER my_bit_map_info_header; RGBQUAD my_rgb_quad; HBITMAP my_bitmap; VOID *ppvBits = NULL; HDC client_area_DC; HDC my_hdc; DWORD last_error = 3; my_bit_map_info_header.biSize =...
  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

    ...{ // TODO: Add your control notification handler code here BOOL translated_ok = true; BOOL is_signed = false; CWnd *temp = GetDlgItem( IDC_IDC_STREAM_SELECT ); m_stream_selection = temp->GetDlgItemInt( IDC_IDC_STREAM_SELECT...
  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

    ...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; // syntax error The point is to declare pointers to the classes as they will be used for a...
  18. bkelly13

    copying std::string to CString

    ...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 any form of cast or translation>); CString d_string(...
  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

    ...I need to show it to a user with afxMessageBox(). After a bunch of permutations the code looks something like: bool Get_Stuff( std::string *data_type, int *value ) { ... // error display stuff std::string temp2 = *data_type; CString temp2( temp1.c_str() ); CString a_string; a_string.Format(...

Part and Inventory Search

Back
Top