Click here to Skip to main content
15,897,519 members
Home / Discussions / System Admin
   

System Admin

 
QuestionRe: vc++ Pin
jeevirajan28-Jan-07 0:04
jeevirajan28-Jan-07 0:04 
QuestionRegistry and environment variables [modified] Pin
Manasi D26-Jan-07 20:30
Manasi D26-Jan-07 20:30 
AnswerRe: Registry and environment variables Pin
bsaksida27-Jan-07 9:46
bsaksida27-Jan-07 9:46 
GeneralRe: Registry and environment variables Pin
Bradml28-Jan-07 19:23
Bradml28-Jan-07 19:23 
AnswerRe: Registry and environment variables Pin
Roger Wright28-Jan-07 20:56
professionalRoger Wright28-Jan-07 20:56 
QuestionRefresh all the screen (with Windows) Pin
dannygilbert326-Jan-07 1:19
dannygilbert326-Jan-07 1:19 
AnswerRe: Refresh all the screen (with Windows) Pin
Dave Kreskowiak26-Jan-07 5:54
mveDave Kreskowiak26-Jan-07 5:54 
GeneralRe: Refresh all the screen (with Windows) Pin
dannygilbert326-Jan-07 7:50
dannygilbert326-Jan-07 7:50 
My code is like the following:

1- Change property of the client and the window
2- Destroy old scene, free memory
3- Resize
4- Create new scene
5- SetWindowPos
Wink | ;)

bool CGameEngine::ChangeWindowsSize( int NewWidth, int NewHeight )
{
// Windows
SetWindowLong( m_hWnd, GWL_style, m_dwWindowstyle );

// Resize window and put it on left-top corner. Player will then move
// the window where he wants.
m_WindowsWidth = NewWidth;
m_WindowsHeigth = NewHeight;
m_rcClient.left = 0;
m_rcClient.top = 0;
m_rcClient.right = m_rcClient.left + NewWidth;
m_rcClient.bottom = m_rcClient.top + NewHeight;
m_rcWindow.left = 0;
m_rcWindow.top = 0;
m_rcWindow.right = m_rcWindow.left + NewWidth;
m_rcWindow.bottom = m_rcWindow.top + NewHeight;

m_MiddleX = m_WindowsWidth / 2;
m_MiddleY = m_WindowsHeigth / 2;

// Destroy object in the old scene.
switch ( m_ActualScene )
{
case MAIN_MENU:
m_pSceneMainMenu->DestroyFinal();
SAFE_DELETE( m_pSceneMainMenu );
break;

// ... other scene

}

// Resize the screen like the user wants.
if( FAILED( m_pGraph3DEngine->Resize( m_WindowsWidth, m_WindowsHeigth )) )
{
return false;
}
else
{
switch ( m_ActualScene )
{
case MAIN_MENU:
m_pSceneMainMenu = new CSceneMainMenu( this );
m_pSceneMainMenu->SetRatioWindow( ( float)m_WindowsWidth/(float)m_WindowsHeigth );
m_pSceneMainMenu->Create();
break;

// ... other scene...

}

if( FAILED( SetWindowPos( m_hWnd, HWND_NOTOPMOST, 0, 0, NewWidth, NewHeight, SWP_SHOWWINDOW ) ) )
{
ErrorExit("SetWindowPos");
}

return true;
}

return false;
}

Danny Gilbert, enginneer
Montréal, Canada

GeneralRe: Refresh all the screen (with Windows) Pin
Dave Kreskowiak26-Jan-07 11:09
mveDave Kreskowiak26-Jan-07 11:09 
GeneralRe: Refresh all the screen (with Windows) Pin
dannygilbert329-Jan-07 2:13
dannygilbert329-Jan-07 2:13 
Question.NET 1.0 and 2.0 app on Vista Pin
Giles25-Jan-07 21:31
Giles25-Jan-07 21:31 
AnswerRe: .NET 1.0 and 2.0 app on Vista Pin
Mike Dimmick26-Jan-07 5:17
Mike Dimmick26-Jan-07 5:17 
GeneralRe: .NET 1.0 and 2.0 app on Vista Pin
Giles27-Jan-07 1:26
Giles27-Jan-07 1:26 
QuestionSystem restart [modified] Pin
deeps_cute25-Jan-07 18:15
deeps_cute25-Jan-07 18:15 
AnswerRe: System restart Pin
Mike Dimmick26-Jan-07 6:11
Mike Dimmick26-Jan-07 6:11 
GeneralRe: System restart Pin
deeps_cute26-Jan-07 17:14
deeps_cute26-Jan-07 17:14 
QuestionCOM+ Server not Available Pin
Brady Kelly23-Jan-07 4:45
Brady Kelly23-Jan-07 4:45 
QuestionNetworking problem Pin
TheJudeDude23-Jan-07 4:25
TheJudeDude23-Jan-07 4:25 
QuestionFAT 32 file system internals Pin
harsha_123423-Jan-07 1:26
harsha_123423-Jan-07 1:26 
QuestionCPU temperature using memory map [modified] Pin
Manasi D21-Jan-07 23:30
Manasi D21-Jan-07 23:30 
AnswerRe: CPU temperature using memory map Pin
Dave Kreskowiak22-Jan-07 10:39
mveDave Kreskowiak22-Jan-07 10:39 
GeneralRe: CPU temperature using memory map Pin
Manasi D22-Jan-07 18:28
Manasi D22-Jan-07 18:28 
GeneralRe: CPU temperature using memory map Pin
Dave Kreskowiak23-Jan-07 2:18
mveDave Kreskowiak23-Jan-07 2:18 
Questiondoubt in OS Pin
Dinesh babu .S21-Jan-07 6:27
Dinesh babu .S21-Jan-07 6:27 
AnswerRe: doubt in OS Pin
bsaksida22-Jan-07 9:12
bsaksida22-Jan-07 9:12 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.