Thread: Help with LB_DIR!!

  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,868
    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