<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2900.3020" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>Hola Danny,</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>busca en internet "progress bar control msdn". El 
ejemplo que adjunto abajo lo he sacado de la MSDN y estoy seguro que te puede 
orientar con el control.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Si lo quieres crear en la ventana principal haz uso 
del mensaje WM_CREATE en tu función CALLBACK. Por el contrario si lo quieres 
usar en un diálogo usa la clase <FONT face="Times New Roman" 
size=3>PROGRESS_CLASS para crearlo con estilos como están en CreateWindowEx 
abajo. Pero antes de abrir el diálogo tienes que hacer una inicialización que 
muestro abajo.</FONT></FONT></DIV>
<DIV> </DIV>
<DIV><FONT color=#0000ff>//</FONT><FONT color=green> Ensure that the common 
control DLL is loaded</FONT><BR>    <FONT 
color=blue>//</FONT><FONT color=green> and create a progress bar along the 
bottom of</FONT><BR>    <FONT color=blue>//</FONT><FONT 
color=green> the client area of the parent window. </FONT><BR>    
<FONT color=blue>//</FONT><FONT color=green> Base the height of the progress bar 
on the</FONT><BR>    <FONT color=blue>//</FONT><FONT color=green> 
height of a scroll bar arrow. </FONT><BR>    
InitCommonControls();</DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Espero que te ayude.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Un saludo,</FONT></DIV>
<DIV><FONT face=Arial size=2>Juan Antonio.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT color=#0000ff>//</FONT><FONT color=green> ParseALargeFile - parses a 
large file and uses a</FONT><BR><FONT color=blue>//</FONT><FONT color=green> 
progress bar to indicate the progress of the</FONT><BR><FONT 
color=blue>//</FONT><FONT color=green> parsing operation. </FONT><BR><FONT 
color=blue>//</FONT><FONT color=green> Returns TRUE if successful, or FALSE 
otherwise. </FONT><BR><FONT color=blue>//</FONT><FONT color=green> hwndParent - 
parent window of the progress bar. </FONT><BR><FONT color=blue>//</FONT><FONT 
color=green> lpszFileName - name of the file to parse. </FONT><BR><FONT 
color=blue>//</FONT><FONT color=green> </FONT><BR><FONT 
color=blue>//</FONT><FONT color=green> Global variable </FONT><BR><FONT 
color=blue>//</FONT><FONT color=green>     g_hinst - 
instance handle </FONT><BR><BR>extern HINSTANCE g_hinst; <BR><BR>BOOL 
ParseALargeFile(HWND hwndParent, LPSTR lpszFileName) <BR>{ 
<BR>    RECT rcClient;  <FONT color=blue>//</FONT><FONT 
color=green> Client area of parent window </FONT><BR>    int 
cyVScroll;  <FONT color=blue>//</FONT><FONT color=green> Height of scroll 
bar arrow </FONT><BR>    HWND hwndPB;    <FONT 
color=blue>//</FONT><FONT color=green> Handle of progress bar 
</FONT><BR>    HANDLE hFile;   <FONT 
color=blue>//</FONT><FONT color=green> Handle of file 
</FONT><BR>    DWORD cb;       
<FONT color=blue>//</FONT><FONT color=green> Size of file and count 
of</FONT><BR>                    
<FONT color=blue>//</FONT><FONT color=green> bytes read 
</FONT><BR>    LPCH pch;       
<FONT color=blue>//</FONT><FONT color=green> Address of data read 
from</FONT><BR>                    
<FONT color=blue>//</FONT><FONT color=green> file </FONT><BR>    
LPCH pchTmp;    <FONT color=blue>//</FONT><FONT color=green> 
Temporary pointer </FONT><BR><BR> <BR><BR>    <FONT 
color=blue>//</FONT><FONT color=green> Ensure that the common control DLL is 
loaded</FONT><BR>    <FONT color=blue>//</FONT><FONT color=green> 
and create a progress bar along the bottom of</FONT><BR>    <FONT 
color=blue>//</FONT><FONT color=green> the client area of the parent window. 
</FONT><BR>    <FONT color=blue>//</FONT><FONT color=green> Base 
the height of the progress bar on the</FONT><BR>    <FONT 
color=blue>//</FONT><FONT color=green> height of a scroll bar arrow. 
</FONT><BR>    InitCommonControls(); <BR>    
GetClientRect(hwndParent, &rcClient); <BR>    cyVScroll = 
GetSystemMetrics(SM_CYVSCROLL); <BR>    hwndPB = 
CreateWindowEx(0, 
PROGRESS_CLASS,<BR>                (LPSTR) 
NULL, WS_CHILD | 
WS_VISIBLE,<BR>             
rcClient.left, 
rcClient.bottom<BR>             
cyVScroll, rcClient.right, cyVScroll, 
<BR>             
hwndParent, (HMENU) 0, g_hinst, NULL); <BR><BR>   <FONT 
color=blue>//</FONT><FONT color=green> Open the file for reading, and retrieve 
the</FONT><BR>   <FONT color=blue>//</FONT><FONT color=green> size of 
the file. </FONT><BR><BR>    hFile = CreateFile(lpszFileName, 
GENERIC_READ,<BR>            
FILE_SHARE_READ, 
(LPSECURITY_ATTRIBUTES)<BR>            
NULL, 
OPEN_EXISTING,<BR>            
FILE_ATTRIBUTE_NORMAL, (HANDLE) NULL); <BR><BR>    if (hFile == 
(HANDLE) INVALID_HANDLE_VALUE) <BR>        
return FALSE; <BR><BR>    cb = GetFileSize(hFile, (LPDWORD) 
NULL); <BR><BR>    <FONT color=blue>//</FONT><FONT color=green> 
Set the range and increment of the progress</FONT><BR>    <FONT 
color=blue>//</FONT><FONT color=green> bar. </FONT><BR><BR>    
SendMessage(hwndPB, PBM_SETRANGE, 
0,<BR>                
MAKELPARAM(0, cb / 2048)); <BR>    SendMessage(hwndPB, 
PBM_SETSTEP, (WPARAM) 1, 0); <BR><BR>    <FONT 
color=blue>//</FONT><FONT color=green> Parse the file. 
</FONT><BR>    pch = (LPCH) LocalAlloc(LPTR, sizeof(char) 
*<BR>            2048); <BR>    pchTmp 
= pch; <BR>    do { 
<BR>        ReadFile(hFile, pchTmp, 
sizeof(char) * 2048,<BR>                   
&cb, <BR>            
(LPOVERLAPPED) NULL);<BR>         <FONT color=blue>//</FONT><FONT color=green> TODO: 
Write an error handler to check that all 
the</FONT><BR>        <FONT 
color=blue>//</FONT><FONT color=green> requested data was read. 
</FONT><BR>        . 
<BR>        . 
<BR>        <FONT color=blue>//</FONT><FONT 
color=green> Include here any code that parses 
the</FONT><BR>        <FONT 
color=blue>//</FONT><FONT color=green> file. 
</FONT><BR>        . 
<BR>       <FONT color=blue>//</FONT><FONT 
color=green> Advance the current position of 
the</FONT><BR>       <FONT 
color=blue>//</FONT><FONT color=green> progress bar by the increment. 
</FONT><BR>       SendMessage(hwndPB, PBM_STEPIT, 
0, 0); <BR>      } while (cb); <BR><BR>   
CloseHandle((HANDLE) hFile); <BR>   
DestroyWindow(hwndPB);<BR>    <BR>    return TRUE; 
<BR>} <BR></DIV>
<BLOCKQUOTE 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
  <DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
  <DIV 
  style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B> 
  <A title=dayaroro@hotmail.com href="mailto:dayaroro@hotmail.com">Danny 
  Roldan</A> </DIV>
  <DIV style="FONT: 10pt arial"><B>To:</B> <A 
  title=cconclase@listas.conclase.net 
  href="mailto:cconclase@listas.conclase.net">cconclase@listas.conclase.net</A> 
  </DIV>
  <DIV style="FONT: 10pt arial"><B>Sent:</B> Wednesday, January 24, 2007 4:36 
  PM</DIV>
  <DIV style="FONT: 10pt arial"><B>Subject:</B> [C con Clase] Una ayuda con l 
  barra de progreso</DIV>
  <DIV><BR></DIV>
  <DIV>
  <DIV class=RTE>
  <P><FONT style="FONT-SIZE: 11px; FONT-FAMILY: tahoma,sans-serif">Hola: 
  Quisiera que me ayudaran a crear( o simular) una barra de progreso, la verdad 
  es que no trabajo con las MFC, pero me dejaron el trabajo en l universidad y 
  no tengo idea de que hacer. Muchas Gracias de antemano.</FONT></P>
  <P>Danny</P></DIV></DIV><BR clear=all>
  <HR>
  Éxitos, grandes clásicos y novedades. <A 
  href="http://g.msn.com/8HMBESES/2755??PS=47575" target=_top>Un millón de 
  canciones en MSN Music. </A>
  <P>
  <HR>

  <P></P>_______________________________________________<BR>Lista de correo 
  Cconclase 
  Cconclase@listas.conclase.net<BR>http://listas.conclase.net/mailman/listinfo/cconclase_listas.conclase.net<BR>Bajas: 
  http://listas.conclase.net/index.php?gid=2&mnu=FAQ</BLOCKQUOTE></BODY></HTML>