DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 4 of 4

Thread: Splash Window In VC++

  1. #1
    Join Date
    May 2010
    Posts
    9

    Splash Window In VC++

    currently the positions of my bitmaps and buttons on the opening window are set in the IDD_Splash section, by physically moving them into the locations on the window. I put 2 all the way on the right edge. however, depending on the computer screen resolution, sometimes the bitmaps are on the edge, sometimes away from the edge. is there another way to display bitmaps and buttons more accurately? maybe the way windows can be displayed using proportions of the parent window, not in absolute terms?
    Last edited by jimlau; 05-26-2010 at 06:56 PM.

  2. #2
    Join Date
    Dec 2003
    Posts
    3,366
    I do not know the best way to handle this. One easy way is to splash with directx (directdraw?). Get the resolution, scale to fit it, and display your image for a moment at a reasonable scale. However this could result in pages of code for so simple a task.

    Are splash screens still "IN" ? I always hate waiting for such junk to go away so I can do whatever it was I wanted to do. I havent seen a program with a splash in a while, so maybe this style of applicaiton has gone away or is somewhat less in style?

  3. #3
    Join Date
    May 2010
    Posts
    9
    not sure a splash screen is any different than other windows. anyway, this is the code i use to put the icons in the window. but i don't know of a function that includes coordinates, instead of width and height.

    BOOL CSplashDlg::OnInitDialog()
    {
    CDialog::OnInitDialog();

    HICON hIcon10 = (HICON) ::LoadImage(GetModuleHandle(NULL),MAKEINTRESOURCE(IDI_EXIT2),IMAGE_ICON,60,32,LR_DEFAULTSI ZE | LR_SHARED);

    ((CButton*)GetDlgItem(IDOK))->SetIcon(hIcon10);

    CRect rect;
    SystemParametersInfo(SPI_GETWORKAREA, 0, &rect, 0);
    MoveWindow(&rect);

    return TRUE;

    }

  4. #4
    Join Date
    Dec 2003
    Posts
    3,366
    http://msdn.microsoft.com/en-us/visualc/cc721654.aspx

    Maybe this will help.

    I was doing it using a third party library called wxwidgets from way back, I do not know if that is still a good, current package to use but it had a nice splash screen.

Similar Threads

  1. splash screen for J2ME
    By wrappingduke in forum Mobile
    Replies: 4
    Last Post: 05-15-2008, 04:17 PM
  2. Regarding closing a pop window
    By Usha.R in forum ASP.NET
    Replies: 1
    Last Post: 02-14-2006, 04:30 AM
  3. ?API NT Compatability?
    By Dennis in forum VB Classic
    Replies: 10
    Last Post: 02-15-2001, 04:52 AM
  4. child window - is it or isn't it?
    By TC in forum VB Classic
    Replies: 8
    Last Post: 09-26-2000, 02:34 AM
  5. child window - is it or isn't it?
    By TC in forum VB Classic
    Replies: 0
    Last Post: 09-25-2000, 09:06 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center