<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style>
</head>
<body class='hmmessage'>
<table cellspacing="0" cellpadding="0" border="0" style="text-indent: 0px !important; font-size: 10pt; font-family: Tahoma; "><tbody style="text-indent: 0px !important; "><tr style="text-indent: 0px !important; "><td valign="top" style="text-indent: 0px !important; font: inherit; "><div style="text-indent: 0px !important; "> </div><div style="text-indent: 0px !important; ">>En mi ventana tengo necesidad de dos scrollbars vertivales. ¿Cómo las puedo diferenciar en el evento WM_VSCROLL?</div></td></tr></tbody></table><font class="Apple-style-span" size="2" style="font-family: Tahoma; ">Por su manejador o handle (hwnd), ya que cada objeto en Windows dispone de uno una vez creado...</font><div style="font-size: 10pt; font-family: Tahoma; "><span class="Apple-style-span" style="font-size: 12pt; "><br></span></div><div style="font-size: 10pt; font-family: Tahoma; "><span class="Apple-style-span" style="font-size: 12pt; ">barrav = CreateWindowEx( 0, "SCROLLBAR", NULL,SBS_VERT|WS_CHILD|WS_VISIBLE,<br style="text-indent: 0px !important; ">         0, 0, 20, 120,hwnd,(HMENU)ID_SCROLLV,hinstance, NULL);</span></div><div><br><div><font class="Apple-style-span" face="Tahoma" size="2">En el caso que muestras es "barrav". Luego, se recoge en el "</font><font class="Apple-style-span" face="Tahoma" size="3">lParam", tal como lo tienes, por lo que me hace pensar que solamente </font><font class="Apple-style-span" face="Tahoma">copiaste</font><font class="Apple-style-span" face="Tahoma" size="3"> código sin apenas saber como funciona.</font></div><div style="font-family: Tahoma; "><br></div><div><div style="text-indent: 0px !important; font-family: Tahoma; font-size: 13px; ">>Otra pregunta ¿Por qué no salen los triagulitos negros en los botones del scrollbar?</div><div style="text-indent: 0px !important; font-family: Tahoma; font-size: 13px; ">>Creo que el evento WM_SIZE los borra:</div><div style="font-family: Tahoma; font-size: 13px; "><br></div><div style="font-family: Tahoma; font-size: 13px; ">El evento Size no lo borra, lo que pasa es que no ajustas bien la dimensión del ScrollBAr, en este caso el ancho. REcuerda que MoveWindows no solo mueve un objeto, también lo redimensiona.</div></div><div style="font-family: Tahoma; font-size: 13px; "><br></div><div style="font-family: Tahoma; font-size: 13px; "><a href="http://msdn.microsoft.com/en-us/library/ms633534(v=vs.85).aspx">http://msdn.microsoft.com/en-us/library/ms633534(v=vs.85).aspx</a></div><div style="font-family: Tahoma; font-size: 13px; "><br></div><div style="font-family: Tahoma; "><font class="Apple-style-span" size="2"><br></font></div><div style="font-family: Tahoma; "><div id="SkyDrivePlaceholder" style="font-size: 10pt; "></div><hr id="stopSpelling" style="font-size: 10pt; "><font class="Apple-style-span" size="2">Date: Tue, 19 Apr 2011 13:06:23 -0700</font><br><font class="Apple-style-span" size="2">From: andesbit@ymail.com</font><br><font class="Apple-style-span" size="2">To: cconclase@listas.conclase.net</font><br><font class="Apple-style-span" size="2">Subject: [C con Clase] scrollbars</font><br><br><table cellspacing="0" cellpadding="0" border="0" style="font-size: 10pt; "><tbody><tr><td valign="top" style="font:inherit"><div>Que tal</div>
<div> </div>
<div>En mi ventana tengo necesidad de dos scrollbars vertivales. ¿Cómo las puedo diferenciar en el evento WM_VSCROLL?</div>
<div> </div>
<div>mi evento está codificado asi para uno de los scrollbars</div>
<div> </div>
<div>case WM_VSCROLL:       <br>      GetScrollInfo((HWND)lParam, SB_CTL, &si); <br>      switch(LOWORD(wParam)) { <br>        case SB_LINEDOWN:si.nPos++; break; <br>        case SB_LINEUP:si.nPos--; break; <br>        case SB_PAGEDOWN:si.nPos+=si.nPage; break; <br>        case SB_PAGEUP:si.nPos-=si.nPage; break; <br>        case SB_BOTTOM:si.nPos=si.nMax; break; <br>        case SB_TOP:si.nPos=si.nMin; break; <br>        case SB_THUMBTRACK://<br>        case SB_THUMBPOSITION: si.nPos=(int)wParam>>16;break; <br>      }<br>     
 if(si.nPos<0)si.nPos = 0;<br>      _scrolly=si.nPos;<br>      SetScrollInfo((HWND)lParam, SB_CTL, &si, TRUE);<br>      break;          <br></div>
<div>Otra pregunta ¿Por qué no salen los triagulitos negros en los botones del scrollbar?</div>
<div>Creo que el evento WM_SIZE los borra:</div>
<div> </div>
<div>  case WM_CREATE:<br>       hinstance=((LPCREATESTRUCT)lParam)->hInstance;<br>      barrav = CreateWindowEx( 0, "SCROLLBAR", NULL,SBS_VERT|WS_CHILD|WS_VISIBLE,<br>         0, 0, 20, 120,hwnd,(HMENU)ID_SCROLLV,hinstance, NULL);<br>      si.cbSize = sizeof(si); <br>      si.fMask=SIF_RANGE|SIF_PAGE|SIF_POS;<br>      si.nMin=0;si.nMax=100;si.nPage=5;si.nPos=0; <br>      SetScrollInfo(barrav, SB_CTL, &si, TRUE);<br>    break;   <br>    case WM_SIZE:<br>      GetClientRect(hwnd,&re);<br>      MoveWindow(barrav,re.right-20,re.top,re.right,re.bottom-_tamy_cuadro,1);<br>      
 break;          </div>
<div>    </div>
<div>Uso Dev c++ para windows</div>
<div> </div>
<div>                                              Gracias</div></td></tr></tbody></table><br><font class="Apple-style-span" size="2">_______________________________________________
Lista de correo Cconclase Cconclase@listas.conclase.net
http://listas.conclase.net/mailman/listinfo/cconclase_listas.conclase.net
Bajas: http://listas.conclase.net/index.php?gid=2&mnu=FAQ</font></div></div>                                        </body>
</html>