dialogfenster eine best. groesse zuweisen
-
halloele!
ich bin auf der suche nach einer moeglichkeit, einem dialogfenster eine bestimmte groesse (640x480 pixel) zuzuweisen.
kann ich das in der CDialog::OnInitDialog() machen und wenn ja, wie?
waere nett, wenn mir jemand einen tipp geben koennte.
gruesse,
captain leela
-
Servus,
guckst du MSDN: "SetWindowPos"
*winke*
Hellsgore
-
Hi,
habe das bei mir wie folgt gemacht (SDI-Anwendung mit 1024x768)
BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs) { ... int i_breite = GetSystemMetrics( SM_CXSCREEN ); int i_hoehe = GetSystemMetrics( SM_CYSCREEN ); // Anzeigemodus ist 1024 x 768 if( (i_breite == 1024) && (i_hoehe == 768) ) { cs.x = 0; cs.y = 0; cs.cx = GetSystemMetrics(SM_CXFULLSCREEN); cs.cy = GetSystemMetrics(SM_CYFULLSCREEN) + GetSystemMetrics(SM_CYCAPTION); if( cs.cy > i_hoehe ) cs.cy = i_hoehe; cs.style |= WS_MAXIMIZE; cs.style &= ~WS_THICKFRAME; // TO avoid resizing cs.style &= ~WS_MAXIMIZEBOX; // Disable maximize button }