Tema: Win32 Api
Ver Mensaje Individual
  #11 (permalink)  
Antiguo 20/10/2006, 01:31
Avatar de Eternal Idol
Eternal Idol
 
Fecha de Ingreso: mayo-2004
Ubicación: Lucentum
Mensajes: 6.192
Antigüedad: 20 años, 9 meses
Puntos: 74
Como tengo un ratito voy a poner lo que a mi me parece redundante en el codigo generado por el VC++:

Código:
  ;en este punto nuestra variable WNDCLASSEX tiene todos sus campos indefinidos
  push        30h
  push        0
  lea         eax,[ebp-30h]
  push        eax
  call        _memset
  ;en este punto todos los campos tienen como valor 0
  add         esp,0Ch
  mov         dword ptr [ebp-30h],30h
  ;wcx.cbSize = 0x30 = 48
  mov         dword ptr [ebp-2Ch],0Bh
  ;wcx.style = 0xB = CS_HREDRAW (0x2) | CS_VREDRAW (0x1) | CS_DBLCLKS (0x8)
  mov         dword ptr [ebp-28h],offset ?MainWndPr
  ;wcx.lpfnWndProc = (WNDPROC)MainWndProc;
  mov         dword ptr [ebp-24h],0
  ;wcx.cbClsExtra = 0; << redundante
  mov         dword ptr [ebp-20h],0
  ;wcx.cbWndExtra = 0; << redundante
  mov         ecx,dword ptr [ebp+8]
  mov         dword ptr [ebp-1Ch],ecx
  ;wcx.hInstance = hInstance; [segundo parametro]
  mov         dword ptr [ebp-18h],0
  ;wcx.hIcon = NULL; << redundante
  push        7F00h
  push        0
  call        dword ptr [__imp__LoadCursorA@8]
  mov         dword ptr [ebp-14h],eax
  ;wcx.hCursor = LoadCursor(NULL, IDC_ARROW);
  mov         dword ptr [ebp-10h],5
  ;wcx.hbrBackground = (HBRUSH)(COLOR_WINDOW);
  mov         dword ptr [ebp-0Ch],0
  ;wcx.lpszMenuName = NULL; << redundante
  mov         dword ptr [ebp-8],offset $SG57435
  ;wcx.lpszClassName = "Draw";
  mov         dword ptr [ebp-4],0
  ;wcx.hIconSm = NULL; << redundante 

Última edición por Eternal Idol; 20/10/2006 a las 01:37