#255 atlddx.h has a bug

v1.0 (example)
closed-wont-fix
None
5
2014-02-28
2012-06-26
Riverqh
No

atlddx.h line #614:
while (hWndCtrl != NULL && !(GetWindowLong(hWndCtrl, GWL_STYLE) & WS_GROUP));

try to fix like:
while (hWndCtrl != NULL && (::GetWindowLong(hWndCtrl, GWL_STYLE) & WS_GROUP) != 0 );

Discussion

    • assigned_to: Nenad Stefanovic
    • Group: --> v1.0 (example)
     
    • status: open --> closed-wont-fix
     
  • I think that the code now is correct. It is not nicely written, and that should be improved. You proposal is not correct, the code should go through controls that don't have WS_GROUP style.

    Nicely formatted line should probably look like this:
    while((hWndCtrl != NULL) && ((::GetWindowLong(hWndCtrl, GWL_STYLE) & WS_GROUP) == 0));