CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Sep 2003
    Posts
    280

    What does the "backward compatibility" mean?

    Hello,
    I try to figure out each step of creating toolbar.
    Code:
    ...
    // Create a toolbar. 
    hwndTB = CreateWindowEx(0, TOOLBARCLASSNAME, (LPSTR) NULL, WS_CHILD | WS_VISIBLE | WS_BORDER, 0, 0, 0, 0, hwndParent,(HMENU) IDR_TOOLBAR1, GetModuleHandle(NULL), NULL); 
    	
    // Send the TB_BUTTONSTRUCTSIZE message, which is required for 
    // backward compatibility. 
    SendMessage(hwndTB, TB_BUTTONSTRUCTSIZE, (WPARAM) sizeof(TBBUTTON), 0); 
    ...
    But what 's the purpose of TB_BUTTONSTRUCTSIZE within SendMessage???
    And what does the "backward compatibility" mean???
    Could someone explain for me???
    Thanks!

  2. #2
    Join Date
    Sep 2002
    Posts
    924
    "backward compatibility" ensures, that as Microsoft releases newer versions of the common control dynamic-link library, that older programs that used older versions of the library still work correctly. The system can determine which version of the common control dynamic-link library is being used by the size of the TB_BUTTONSTRUCTSIZE structure, and then use the appropriate functions for that version of the lib, etc.

  3. #3
    Join Date
    Sep 2003
    Posts
    280
    Quote Originally Posted by RussG1
    "backward compatibility" ensures, that as Microsoft releases newer versions of the common control dynamic-link library, that older programs that used older versions of the library still work correctly. The system can determine which version of the common control dynamic-link library is being used by the size of the TB_BUTTONSTRUCTSIZE structure, and then use the appropriate functions for that version of the lib, etc.
    Thanks for your explain!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured