Help with LB_DIR!!

This is a discussion on Help with LB_DIR!! within the Windows Programming forums, part of the Platform Specific Boards category; Ok I have the code: SendMessage(list, LB_DIR, DDL_DRIVES, "e:\"); When I compile, I get: 80 wnd_mng.cpp passing `const char *' ...

  1. #1
    BubbleMan
    Guest

    Question Help with LB_DIR!!

    Ok I have the code:

    SendMessage(list, LB_DIR, DDL_DRIVES, "e:\\");

    When I compile, I get:

    80 wnd_mng.cpp
    passing `const char *' to argument 4 of `SendMessageA(HWND__ *, unsigned int, unsigned int, long int)' lacks a cast

  2. #2
    train spotter
    Join Date
    Aug 2001
    Location
    near a computer
    Posts
    3,856
    You need a 'Type cast'

    (LPARAM)DDL_DRIVES,(WPARAM)(LPSTR)"e:\\");

    this converts the variable type to that used by the function.

    Like

    float fValue=1.1;
    int iValue=0;

    iValue=(int)fValue;

Popular pages Recent additions subscribe to a feed

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21