SaveWindowPosition(hDlg); hdcSTMessage = GetWindowDC(hSTMessage);  SystemParametersInfo(SPI_GETICONTITLELOGFONT, sizeof(logFont), (PVOID)&logFont, 0); hfontTmp = CreateFontIndirect(&logFont);  if(hfontTmp) hfontOld = SelectObject(hdcSTMessage, hfontTmp);  GetTextExtentPoint32(hdcSTMessage, (LPSTR)lParam, lstrlen((LPSTR)lParam), &sizeString); SelectObject(hdcSTMessage, hfontOld); DeleteObject(hfontTmp); ReleaseDC(hSTMessage, hdcSTMessage);  SetWindowPos(hDlg, NULL, (gSystemInfo.lastWindowPosCenterX)-((sizeString.cx + 55)/2), (gSystemInfo.lastWindowPosCenterY)-((sizeString.cy + 50)/2), sizeString.cx + 55, sizeString.cy + 50, SWP_SHOWWINDOW|SWP_NOZORDER);  if(GetClientRect(hDlg, &rDlg)) SetWindowPos(hSTMessage, HWND_TOP, rDlg.left, rDlg.top, rDlg.right, rDlg.bottom, SWP_SHOWWINDOW|SWP_NOZORDER);  SetDlgItemText(hDlg, IDC_MESSAGE, (LPSTR)lParam);
ResizeAndSetString(hDlg, lParam);
LRESULT CALLBACK DlgProcMessage(HWND hDlg, UINT msg, WPARAM wParam, LONG lParam){  RECT      rDlg;  HWND      hSTMessage = GetDlgItem(hDlg, IDC_MESSAGE); /* handle to the Static Text message window */  HDC       hdcSTMessage;  SIZE      sizeString;  LOGFONT   logFont;  HFONT     hfontTmp;  HFONT     hfontOld;  char      szBuf[MAX_BUF];  char      szBuf2[MAX_BUF];  ZeroMemory(szBuf, sizeof(szBuf));  ZeroMemory(szBuf2, sizeof(szBuf2));  switch(msg)  {    case WM_INITDIALOG:      if(GetPrivateProfileString("Messages", "STR_MESSAGEBOX_TITLE", "", szBuf2, sizeof(szBuf2), szFileIniInstall))      {        if((sgProduct.szProductName != NULL) && (*sgProduct.szProductName != '\0'))          wsprintf(szBuf, szBuf2, sgProduct.szProductName);        else          wsprintf(szBuf, szBuf2, "");      }      else if((sgProduct.szProductName != NULL) && (*sgProduct.szProductName != '\0'))        lstrcpy(szBuf, sgProduct.szProductName);      SetWindowText(hDlg, szBuf);      RepositionWindow(hDlg, NO_BANNER_IMAGE);      break;    case WM_COMMAND:      switch(LOWORD(wParam))      {        case IDC_MESSAGE:          SaveWindowPosition(hDlg);          hdcSTMessage = GetWindowDC(hSTMessage);          SystemParametersInfo(SPI_GETICONTITLELOGFONT,                               sizeof(logFont),                               (PVOID)&logFont,                               0);          hfontTmp = CreateFontIndirect(&logFont);          if(hfontTmp)            hfontOld = SelectObject(hdcSTMessage, hfontTmp);          GetTextExtentPoint32(hdcSTMessage, (LPSTR)lParam, lstrlen((LPSTR)lParam), &sizeString);          SelectObject(hdcSTMessage, hfontOld);          DeleteObject(hfontTmp);          ReleaseDC(hSTMessage, hdcSTMessage);          SetWindowPos(hDlg, NULL,                      (gSystemInfo.lastWindowPosCenterX)-((sizeString.cx + 55)/2),                      (gSystemInfo.lastWindowPosCenterY)-((sizeString.cy + 50)/2),                      sizeString.cx + 55,                      sizeString.cy + 50,                      SWP_SHOWWINDOW|SWP_NOZORDER);          if(GetClientRect(hDlg, &rDlg))            SetWindowPos(hSTMessage,                         HWND_TOP,                         rDlg.left,                         rDlg.top,                         rDlg.right,                         rDlg.bottom,                         SWP_SHOWWINDOW|SWP_NOZORDER);          SetDlgItemText(hDlg, IDC_MESSAGE, (LPSTR)lParam);          break;      }      break;  }  return(0);}