<html><body><div style="color:#000; background-color:#fff; font-family:times new roman, new york, times, serif;font-size:12pt"><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt;">Hola he intentado y aun no puedo agregar un tooltip a un comboboxex, en el proyecto que adjunto compilado en codeblocks, en la linea 102 usando WC_COMBOBOX el tooltip aparece, pero al cambiar a <span style="font-size: 12pt;">WC_COMBOBOXEX deja de funcionar. Alguien que me de una mano estare agradecido.</span></div><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: transparent; font-style: normal;"><span style="font-size: 12pt;">Saludos</span></div><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: transparent; font-style: normal;"><span style="font-size: 12pt;"><br></span></div><div
 style="background-color: transparent;">#include <windows.h></div><div style="background-color: transparent;"><br></div><div style="background-color: transparent;">#ifdef _WIN32_IE</div><div style="background-color: transparent;">#undef _WIN32_IE</div><div style="background-color: transparent;">#endif</div><div style="background-color: transparent;">#define _WIN32_IE 0x0600</div><div style="background-color: transparent;">#include <commctrl.h></div><div style="background-color: transparent;"><br></div><div style="background-color: transparent;">#define ID_COMBO  1001</div><div style="background-color: transparent;"><br></div><div style="background-color: transparent;">/*  Declare Windows procedure  */</div><div style="background-color: transparent;">LRESULT CALLBACK WindowProcedure (HWND, UINT, WPARAM, LPARAM);</div><div style="background-color: transparent;"><br></div><div style="background-color: transparent;">/*  Make
 the class name into a global variable  */</div><div style="background-color: transparent;">char szClassName[ ] = "CodeBlocksWindowsApp";</div><div style="background-color: transparent;"><br></div><div style="background-color: transparent;">int WINAPI WinMain (HINSTANCE hThisInstance,</div><div style="background-color: transparent;">                     HINSTANCE hPrevInstance,</div><div style="background-color: transparent;">                     LPSTR lpszArgument,</div><div style="background-color: transparent;">                     int nCmdShow)</div><div style="background-color: transparent;">{</div><div style="background-color: transparent;">    HWND hwnd;               /* This is the handle for our window */</div><div
 style="background-color: transparent;">    MSG messages;            /* Here messages to the application are saved */</div><div style="background-color: transparent;">    WNDCLASSEX wincl;        /* Data structure for the windowclass */</div><div style="background-color: transparent;"><br></div><div style="background-color: transparent;">    INITCOMMONCONTROLSEX iccx;</div><div style="background-color: transparent;"><br></div><div style="background-color: transparent;">    iccx.dwSize = sizeof(INITCOMMONCONTROLSEX);</div><div style="background-color: transparent;">    iccx.dwICC = ICC_BAR_CLASSES | ICC_COOL_CLASSES | ICC_DATE_CLASSES | ICC_HOTKEY_CLASS |</div><div style="background-color: transparent;">                 ICC_INTERNET_CLASSES | ICC_LISTVIEW_CLASSES | ICC_NATIVEFNTCTL_CLASS | ICC_PROGRESS_CLASS
 |</div><div style="background-color: transparent;">                 ICC_TAB_CLASSES | ICC_TREEVIEW_CLASSES | ICC_UPDOWN_CLASS | ICC_WIN95_CLASSES;</div><div style="background-color: transparent;">    // ICC_LINK_CLASS ICC_STANDARD_CLASSES</div><div style="background-color: transparent;">    int a=InitCommonControlsEx(&iccx);</div><div style="background-color: transparent;">    if(a==0)</div><div style="background-color: transparent;">        return 0;</div><div style="background-color: transparent;"><br></div><div style="background-color: transparent;">    /* The Window structure */</div><div style="background-color: transparent;">    wincl.hInstance = hThisInstance;</div><div style="background-color: transparent;">    wincl.lpszClassName = szClassName;</div><div style="background-color: transparent;">   
 wincl.lpfnWndProc = WindowProcedure;      /* This function is called by windows */</div><div style="background-color: transparent;">    wincl.style = CS_DBLCLKS;                 /* Catch double-clicks */</div><div style="background-color: transparent;">    wincl.cbSize = sizeof (WNDCLASSEX);</div><div style="background-color: transparent;"><br></div><div style="background-color: transparent;">    /* Use default icon and mouse-pointer */</div><div style="background-color: transparent;">    wincl.hIcon = LoadIcon (NULL, IDI_APPLICATION);</div><div style="background-color: transparent;">    wincl.hIconSm = LoadIcon (NULL, IDI_APPLICATION);</div><div style="background-color: transparent;">    wincl.hCursor = LoadCursor (NULL, IDC_ARROW);</div><div style="background-color: transparent;">    wincl.lpszMenuName = NULL;    
             /* No menu */</div><div style="background-color: transparent;">    wincl.cbClsExtra = 0;                      /* No extra bytes after the window class */</div><div style="background-color: transparent;">    wincl.cbWndExtra = 0;                      /* structure or the window instance */</div><div style="background-color: transparent;">    /* Use Windows's default colour as the background of the window */</div><div style="background-color: transparent;">    wincl.hbrBackground = (HBRUSH) COLOR_BACKGROUND;</div><div style="background-color: transparent;"><br></div><div style="background-color: transparent;">    /* Register the window class, and if it fails quit the program */</div><div style="background-color: transparent;">    if
 (!RegisterClassEx (&wincl))</div><div style="background-color: transparent;">        return 0;</div><div style="background-color: transparent;"><br></div><div style="background-color: transparent;">    /* The class is registered, let's create the program*/</div><div style="background-color: transparent;">    hwnd = CreateWindowEx (</div><div style="background-color: transparent;">           0,                   /* Extended possibilites for variation */</div><div style="background-color: transparent;">           szClassName,         /* Classname */</div><div style="background-color: transparent;">           "Code::Blocks Template Windows App",       /* Title Text */</div><div style="background-color: transparent;">       
    WS_OVERLAPPEDWINDOW, /* default window */</div><div style="background-color: transparent;">           CW_USEDEFAULT,       /* Windows decides the position */</div><div style="background-color: transparent;">           CW_USEDEFAULT,       /* where the window ends up on the screen */</div><div style="background-color: transparent;">           544,                 /* The programs width */</div><div style="background-color: transparent;">           375,                 /* and height in pixels */</div><div style="background-color: transparent;">           HWND_DESKTOP,        /* The window is a child-window to desktop */</div><div style="background-color:
 transparent;">           NULL,                /* No menu */</div><div style="background-color: transparent;">           hThisInstance,       /* Program Instance handler */</div><div style="background-color: transparent;">           NULL                 /* No Window Creation data */</div><div style="background-color: transparent;">           );</div><div style="background-color: transparent;"><br></div><div style="background-color: transparent;">    /* Make the window visible on the screen */</div><div style="background-color: transparent;">    ShowWindow (hwnd, nCmdShow);</div><div style="background-color: transparent;"><br></div><div style="background-color: transparent;">    /* Run the message loop. It will run
 until GetMessage() returns 0 */</div><div style="background-color: transparent;">    while (GetMessage (&messages, NULL, 0, 0))</div><div style="background-color: transparent;">    {</div><div style="background-color: transparent;">        /* Translate virtual-key messages into character messages */</div><div style="background-color: transparent;">        TranslateMessage(&messages);</div><div style="background-color: transparent;">        /* Send message to WindowProcedure */</div><div style="background-color: transparent;">        DispatchMessage(&messages);</div><div style="background-color: transparent;">    }</div><div style="background-color: transparent;"><br></div><div style="background-color: transparent;">    /* The program return-value is 0 - The value that PostQuitMessage() gave */</div><div
 style="background-color: transparent;">    return messages.wParam;</div><div style="background-color: transparent;">}</div><div style="background-color: transparent;"><br></div><div style="background-color: transparent;"><br></div><div style="background-color: transparent;">/*  This function is called by the Windows function DispatchMessage()  */</div><div style="background-color: transparent;"><br></div><div style="background-color: transparent;">LRESULT CALLBACK WindowProcedure (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)</div><div style="background-color: transparent;">{</div><div style="background-color: transparent;">    static HWND hcombo,hwndTip;</div><div style="background-color: transparent;">    TOOLINFO toolInfo={0};</div><div style="background-color: transparent;">    switch (message)                  /* handle the messages */</div><div
 style="background-color: transparent;">    {</div><div style="background-color: transparent;">        case WM_CREATE:</div><div style="background-color: transparent;"><br></div><div style="background-color: transparent;">        hcombo=CreateWindowEx(</div><div style="background-color: transparent;">            0, WC_COMBOBOXEX , 0 , CBS_DROPDOWNLIST | WS_CHILD | WS_VISIBLE | WS_TABSTOP,</div><div style="background-color: transparent;">            20,5,</div><div style="background-color: transparent;">            90,150,</div><div style="background-color: transparent;">            hwnd,</div><div style="background-color: transparent;">            (HMENU)ID_COMBO,</div><div style="background-color: transparent;">           
 GetModuleHandle(0),</div><div style="background-color: transparent;">            NULL);</div><div style="background-color: transparent;">        SendMessage(hcombo,WM_SETFONT,(WPARAM)(HFONT)GetStockObject(DEFAULT_GUI_FONT),MAKELPARAM(TRUE,0));</div><div style="background-color: transparent;"><br></div><div style="background-color: transparent;">        hwndTip = CreateWindowEx(WS_EX_TOPMOST, TOOLTIPS_CLASS, NULL, WS_POPUP | TTS_ALWAYSTIP,</div><div style="background-color: transparent;">                     CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT,</div><div style="background-color: transparent;">                     hwnd, (HMENU)0, GetModuleHandle(0), NULL);</div><div style="background-color: transparent;">        if(hwndTip)</div><div
 style="background-color: transparent;">                {</div><div style="background-color: transparent;">                SendMessage(hwndTip, TTM_SETMAXTIPWIDTH, 20, 150);</div><div style="background-color: transparent;">                SetWindowPos(hwndTip, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE);</div><div style="background-color: transparent;">                toolInfo.cbSize = sizeof(toolInfo);</div><div style="background-color: transparent;">                toolInfo.hwnd = hwnd;</div><div style="background-color: transparent;">                toolInfo.uFlags = TTF_IDISHWND | TTF_SUBCLASS;</div><div style="background-color: transparent;">             
   toolInfo.hinst = GetModuleHandle(0);</div><div style="background-color: transparent;">                //Controles</div><div style="background-color: transparent;">                toolInfo.uId = (UINT_PTR)GetDlgItem(hwnd, ID_COMBO);</div><div style="background-color: transparent;">                toolInfo.lpszText = (LPTSTR)"Hola";</div><div style="background-color: transparent;">                SendMessage(hwndTip, TTM_ADDTOOL, 0, (LPARAM)&toolInfo);</div><div style="background-color: transparent;">                }</div><div style="background-color: transparent;">                else</div><div style="background-color: transparent;">                MessageBox(hwnd,
 "Error Tooltip", "Error", MB_ICONERROR | MB_OK);</div><div style="background-color: transparent;"><br></div><div style="background-color: transparent;">        break;</div><div style="background-color: transparent;">        case WM_DESTROY:</div><div style="background-color: transparent;">            PostQuitMessage (0);       /* send a WM_QUIT to the message queue */</div><div style="background-color: transparent;">            break;</div><div style="background-color: transparent;">        default:                      /* for messages that we don't deal with */</div><div style="background-color: transparent;">            return DefWindowProc (hwnd, message, wParam, lParam);</div><div style="background-color: transparent;">   
 }</div><div style="background-color: transparent;"><br></div><div style="background-color: transparent;">    return 0;</div><div style="background-color: transparent;"><span></span></div><div style="background-color: transparent;">}</div><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt;"><br></div>  </div></body></html>