styleEx = WS_EX_TOPMOST;
styleEx = 0;
bool GDIDisplay::initialize(){  sizeX = 240;  sizeY = 160;  switch(videoOption) {  case VIDEO_1X:    surfaceSizeX = sizeX;    surfaceSizeY = sizeY;    break;  case VIDEO_2X:    surfaceSizeX = sizeX * 2;    surfaceSizeY = sizeY * 2;    break;  case VIDEO_3X:    surfaceSizeX = sizeX * 3;    surfaceSizeY = sizeY * 3;    break;  case VIDEO_4X:    surfaceSizeX = sizeX * 4;    surfaceSizeY = sizeY * 4;    break;  case VIDEO_320x240:  case VIDEO_640x480:  case VIDEO_800x600:  case VIDEO_OTHER:    {      int scaleX = (fsWidth / sizeX);      int scaleY = (fsHeight / sizeY);      int min = scaleX < scaleY ? scaleX : scaleY;      surfaceSizeX = sizeX * min;      surfaceSizeY = sizeY * min;      if(fullScreenStretch) {        surfaceSizeX = fsWidth;        surfaceSizeY = fsHeight;      }    }    break;  }    rect.left = 0;  rect.top = 0;  rect.right = sizeX;  rect.bottom = sizeY;  dest.left = 0;  dest.top = 0;  dest.right = surfaceSizeX;  dest.bottom = surfaceSizeY;  DWORD style = WS_POPUP | WS_VISIBLE;  DWORD styleEx = 0;    if(videoOption <= VIDEO_4X)    style |= WS_OVERLAPPEDWINDOW;  else    styleEx = WS_EX_TOPMOST;  if(videoOption <= VIDEO_4X)    AdjustWindowRectEx(&dest, style, TRUE, styleEx);  else    AdjustWindowRectEx(&dest, style, FALSE, styleEx);      int winSizeX = dest.right-dest.left;  int winSizeY = dest.bottom-dest.top;  if(videoOption > VIDEO_4X) {    winSizeX = fsWidth;    winSizeY = fsHeight;  }    int x = 0;  int y = 0;  if(videoOption <= VIDEO_4X) {    x = windowPositionX;    y = windowPositionY;  }    // Create a window  hWindow = CreateWindowEx(styleEx,                           "GBA",                           "VisualBoyAdvance",                           style,                           x,                           y,                           winSizeX,                           winSizeY,                           NULL,                           NULL,                           hInstance,                           NULL);    if (!hWindow) {    winlog("Error creating Window %08x\n", GetLastError());    //    errorMessage(myLoadString(IDS_ERROR_DISP_FAILED));    return FALSE;  }    updateMenuBar();    adjustDestRect();    mode320Available = FALSE;  mode640Available = FALSE;  mode800Available = FALSE;    HDC dc = GetDC(NULL);  HBITMAP hbm = CreateCompatibleBitmap(dc, 1, 1);  BITMAPINFO *bi = (BITMAPINFO *)info;  ZeroMemory(bi, sizeof(info));  bi->bmiHeader.biSize = sizeof(BITMAPINFOHEADER);  GetDIBits(dc, hbm, 0, 1, NULL, (LPBITMAPINFO)info, DIB_RGB_COLORS);    GetDIBits(dc, hbm, 0, 1, NULL, (LPBITMAPINFO)info, DIB_RGB_COLORS);  DeleteObject(hbm);  ReleaseDC(NULL, dc);  if(bi->bmiHeader.biCompression == BI_BITFIELDS) {    systemColorDepth = bi->bmiHeader.biBitCount;    if(systemColorDepth == 15)      systemColorDepth = 16;    systemRedShift = calculateShift(*((DWORD *)&bi->bmiColors[0]));    systemGreenShift = calculateShift(*((DWORD *)&bi->bmiColors[1]));    systemBlueShift = calculateShift(*((DWORD *)&bi->bmiColors[2]));    if(systemColorDepth == 16) {      if(systemGreenShift == 6) {        Init_2xSaI(565);        RGB_LOW_BITS_MASK=0x821;      } else {        Init_2xSaI(555);        RGB_LOW_BITS_MASK=0x421;              }    } else if(systemColorDepth == 32)      Init_2xSaI(32);  } else {    systemColorDepth = 32;    systemRedShift = 19;    systemGreenShift = 11;    systemBlueShift = 3;    Init_2xSaI(32);      }  fsColorDepth = systemColorDepth;  if(systemColorDepth == 24)    filterFunction = NULL;#ifdef MMX  if(!disableMMX)    cpu_mmx = detectMMX();  else    cpu_mmx = 0;#endif    switch(systemColorDepth) {  case 16:    {      for(int i = 0; i < 0x10000; i++) {        systemColorMap16[i] = ((i & 0x1f) << systemRedShift) |          (((i & 0x3e0) >> 5) << systemGreenShift) |          (((i & 0x7c00) >> 10) << systemBlueShift);      }    }    break;  case 24:  case 32:    {      for(int i = 0; i < 0x10000; i++) {        systemColorMap32[i] = ((i & 0x1f) << systemRedShift) |          (((i & 0x3e0) >> 5) << systemGreenShift) |          (((i & 0x7c00) >> 10) << systemBlueShift);      }          }    break;  }  for(int i = 0; i < 24;) {    systemGbPalette[i++] = (0x1f) | (0x1f << 5) | (0x1f << 10);    systemGbPalette[i++] = (0x15) | (0x15 << 5) | (0x15 << 10);    systemGbPalette[i++] = (0x0c) | (0x0c << 5) | (0x0c << 10);    systemGbPalette[i++] = 0;  }  updateFilter();  updateIFB();    DragAcceptFiles(hWindow, TRUE);    return TRUE;  }