Click here to Skip to main content
15,905,679 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionDrag & drop between tree controls [modified] Pin
AnithaSubramani21-Nov-08 19:09
AnithaSubramani21-Nov-08 19:09 
AnswerRe: Drag & drop between tree controls Pin
Code-o-mat22-Nov-08 9:36
Code-o-mat22-Nov-08 9:36 
Questionno border for my form Pin
zon_cpp21-Nov-08 19:05
zon_cpp21-Nov-08 19:05 
AnswerRe: no border for my form Pin
zon_cpp22-Nov-08 1:45
zon_cpp22-Nov-08 1:45 
GeneralRe: no border for my form Pin
Randor 22-Nov-08 2:50
professional Randor 22-Nov-08 2:50 
QuestionContinuesPrinting not working please help me. Pin
Le@rner21-Nov-08 18:17
Le@rner21-Nov-08 18:17 
AnswerRe: ContinuesPrinting not working please help me. Pin
Rajesh Katalkar24-Nov-08 4:54
Rajesh Katalkar24-Nov-08 4:54 
QuestionProblem in debugging [modified] Pin
sen pao21-Nov-08 17:11
sen pao21-Nov-08 17:11 
Hello, it goes wrong again but I don't know where to make it right.
Last time the code that should be no wrong coz I builded it successfully just stuck in type conversion. I mean no pragma use or others. It just my fault that just uses the code without make suitable type.
Now I make my own project that uses bitmap. Finally, I've build it successfully and the compiled result's shown below.
====================================================================================================

------ Rebuild All started: Project: KungfuPanda, Configuration: Debug Win32 ------
Deleting intermediate and output files for project 'KungfuPanda', configuration 'Debug|Win32'
Compiling...
PO.cpp
c:\program files\microsoft sdks\windows\v6.0a\include\gl\glaux.h(17) : warning C4068: unknown pragma
c:\program files\microsoft sdks\windows\v6.0a\include\gl\glaux.h(374) : warning C4068: unknown pragma
c:\documents and settings\satellite\my documents\visual studio 2008\projects\vc++ project\kungfupanda\kungfupanda\po.cpp(33) : warning C4996: 'fopen': This function or variable may be unsafe. Consider using fopen_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
c:\program files\microsoft visual studio 9.0\vc\include\stdio.h(237) : see declaration of 'fopen'
Compiling manifest to resources...
Microsoft (R) Windows (R) Resource Compiler Version 6.0.5724.0
Copyright (C) Microsoft Corporation. All rights reserved.
Linking...
LINK : C:\Documents and Settings\SATELLITE\My Documents\Visual Studio 2008\Projects\VC++ PROJECT\KungfuPanda\Debug\KungfuPanda.exe not found or not built by the last incremental link; performing full link
Embedding manifest...
Microsoft (R) Windows (R) Resource Compiler Version 6.0.5724.0
Copyright (C) Microsoft Corporation. All rights reserved.
Build log was saved at "file://c:\Documents and Settings\SATELLITE\My Documents\Visual Studio 2008\Projects\VC++ PROJECT\KungfuPanda\KungfuPanda\Debug\BuildLog.htm"
KungfuPanda - 0 error(s), 3 warning(s)
========== Rebuild All: 1 succeeded, 0 failed, 0 skipped ==========
=====================================================================================================

This make me very happy, coz this is my first project but something bad appear while I start debuging.
It just like before, I mean while the windows form appear "would you like to run in fullscreen mode", whether I choose yes or no, it just start the appearence then disappear in seconds. Maybe in milliseconds.
What cause this problem. For every one who knows this case, please tell me. How to prevent the result not to disappear while it just start running ? A comment would be a real help.
Here's the debugging log

===================================================================================================
'KungfuPanda.exe': Loaded 'C:\Documents and Settings\SATELLITE\My Documents\Visual Studio 2008\Projects\VC++ PROJECT\KungfuPanda\Debug\KungfuPanda.exe', Symbols loaded.
'KungfuPanda.exe': Loaded 'C:\WINDOWS\system32\ntdll.dll'
'KungfuPanda.exe': Loaded 'C:\WINDOWS\system32\kernel32.dll'
'KungfuPanda.exe': Loaded 'C:\WINDOWS\system32\glu32.dll'
'KungfuPanda.exe': Loaded 'C:\WINDOWS\system32\msvcrt.dll'
'KungfuPanda.exe': Loaded 'C:\WINDOWS\system32\opengl32.dll'
'KungfuPanda.exe': Loaded 'C:\WINDOWS\system32\advapi32.dll'
'KungfuPanda.exe': Loaded 'C:\WINDOWS\system32\rpcrt4.dll'
'KungfuPanda.exe': Loaded 'C:\WINDOWS\system32\gdi32.dll'
'KungfuPanda.exe': Loaded 'C:\WINDOWS\system32\user32.dll'
'KungfuPanda.exe': Loaded 'C:\WINDOWS\system32\ddraw.dll'
'KungfuPanda.exe': Loaded 'C:\WINDOWS\system32\dciman32.dll'
'KungfuPanda.exe': Loaded 'C:\WINDOWS\WinSxS\x86_Microsoft.VC90.DebugCRT_1fc8b3b9a1e18e3b_9.0.21022.8_x-ww_597c3456\msvcr90d.dll'
'KungfuPanda.exe': Loaded 'C:\WINDOWS\system32\imm32.dll'
'KungfuPanda.exe': Loaded 'C:\WINDOWS\system32\lpk.dll'
'KungfuPanda.exe': Loaded 'C:\WINDOWS\system32\usp10.dll'
'KungfuPanda.exe': Loaded 'C:\WINDOWS\system32\avgrsstx.dll'
'KungfuPanda.exe': Loaded 'C:\WINDOWS\system32\uxtheme.dll'
'KungfuPanda.exe': Loaded 'C:\WINDOWS\system32\MSCTF.dll'
'KungfuPanda.exe': Loaded 'C:\WINDOWS\system32\version.dll'
'KungfuPanda.exe': Unloaded 'C:\WINDOWS\system32\version.dll'
'KungfuPanda.exe': Loaded 'C:\WINDOWS\system32\MSCTFIME.IME'
'KungfuPanda.exe': Loaded 'C:\WINDOWS\system32\ole32.dll'
'KungfuPanda.exe': Loaded 'C:\WINDOWS\system32\oleaut32.dll'
'KungfuPanda.exe': Loaded 'C:\WINDOWS\system32\iglicd32.dll', Binary was not built with debug information.
'KungfuPanda.exe': Loaded 'C:\WINDOWS\system32\igldev32.dll', Binary was not built with debug information.
'KungfuPanda.exe': Loaded 'C:\WINDOWS\system32\mcd32.dll'
'KungfuPanda.exe': Unloaded 'C:\WINDOWS\system32\mcd32.dll'
The program '[896] KungfuPanda.exe: Native' has exited with code 0 (0x0).

===================================================================================================

This is my first project code; If I run it should be a rotating box that contain Po bitmap.

====================================================================================================
#include <windows.h>
#include <stdio.h>
#include <gl\gl.h>
#include <gl\glu.h>
#include <gl\glaux.h>

HDC hDC=NULL;
HGLRC hRC=NULL;
HWND hWnd=NULL;
HINSTANCE hInstance;

bool keys[256];
bool active=TRUE;
bool fullscreen=TRUE;

GLfloat xrot;
GLfloat yrot;
GLfloat zrot;

GLuint texture[1];

LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM);

AUX_RGBImageRec *LoadBMP(char *Filename)
{
FILE *File=NULL;

if (!Filename)
{
return NULL;
}

File=fopen(Filename,"r");

if (File)
{
fclose(File);
return auxDIBImageLoad(Filename);
}

return NULL;
}

int LoadGLTextures()
{
int Status=FALSE;

AUX_RGBImageRec *TextureImage[1];

memset(TextureImage,0,sizeof(void *)*1);


if (TextureImage[0]=LoadBMP("Data/DragonWarrior.bmp"))
{
Status=TRUE;

glGenTextures(1, &texture[0]);


glBindTexture(GL_TEXTURE_2D, texture[0]);
glTexImage2D(GL_TEXTURE_2D, 0, 3, TextureImage[0]-&gt;sizeX, TextureImage[0]-&gt;sizeY, 0, GL_RGB, GL_UNSIGNED_BYTE, TextureImage[0]-&gt;data);
glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_LINEAR);
glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_LINEAR);
}

if (TextureImage[0])
{
if (TextureImage[0]-&gt;data)
{
free(TextureImage[0]-&gt;data);
}

free(TextureImage[0]);
}

return Status;
}

GLvoid ReSizeGLScene(GLsizei width, GLsizei height)
{
if (height==0)
{
height=1;
}

glViewport(0,0,width,height);

glMatrixMode(GL_PROJECTION);
glLoadIdentity();

// Calculate The Aspect Ratio Of The Window
gluPerspective(45.0f,(GLfloat)width/(GLfloat)height,0.1f,100.0f);

glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
}

int InitGL(GLvoid)
{
if (!LoadGLTextures())
{
return FALSE;
}

glEnable(GL_TEXTURE_2D);
glShadeModel(GL_SMOOTH);
glClearColor(0.0f, 0.0f, 0.0f, 0.5f);
glClearDepth(1.0f);
glEnable(GL_DEPTH_TEST);
glDepthFunc(GL_LEQUAL);
glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST);
return TRUE;
}

int DrawGLScene(GLvoid)
{
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
glLoadIdentity();
glTranslatef(0.0f,0.0f,-5.0f);

glRotatef(xrot,1.0f,0.0f,0.0f);
glRotatef(yrot,0.0f,1.0f,0.0f);
glRotatef(zrot,0.0f,0.0f,1.0f);

glBindTexture(GL_TEXTURE_2D, texture[0]);

glBegin(GL_QUADS);
// muka depan
glTexCoord2f(0.0f, 0.0f); glVertex3f(-1.0f, -1.0f, 1.0f);
glTexCoord2f(1.0f, 0.0f); glVertex3f( 1.0f, -1.0f, 1.0f);
glTexCoord2f(1.0f, 1.0f); glVertex3f( 1.0f, 1.0f, 1.0f);
glTexCoord2f(0.0f, 1.0f); glVertex3f(-1.0f, 1.0f, 1.0f);
// muka belakang
glTexCoord2f(1.0f, 0.0f); glVertex3f(-1.0f, -1.0f, -1.0f);
glTexCoord2f(1.0f, 1.0f); glVertex3f(-1.0f, 1.0f, -1.0f);
glTexCoord2f(0.0f, 1.0f); glVertex3f( 1.0f, 1.0f, -1.0f);
glTexCoord2f(0.0f, 0.0f); glVertex3f( 1.0f, -1.0f, -1.0f);
// muka atas
glTexCoord2f(0.0f, 1.0f); glVertex3f(-1.0f, 1.0f, -1.0f);
glTexCoord2f(0.0f, 0.0f); glVertex3f(-1.0f, 1.0f, 1.0f);
glTexCoord2f(1.0f, 0.0f); glVertex3f( 1.0f, 1.0f, 1.0f);
glTexCoord2f(1.0f, 1.0f); glVertex3f( 1.0f, 1.0f, -1.0f);
// muka bawah
glTexCoord2f(1.0f, 1.0f); glVertex3f(-1.0f, -1.0f, -1.0f);
glTexCoord2f(0.0f, 1.0f); glVertex3f( 1.0f, -1.0f, -1.0f);
glTexCoord2f(0.0f, 0.0f); glVertex3f( 1.0f, -1.0f, 1.0f);
glTexCoord2f(1.0f, 0.0f); glVertex3f(-1.0f, -1.0f, 1.0f);
// muka kanan
glTexCoord2f(1.0f, 0.0f); glVertex3f( 1.0f, -1.0f, -1.0f);
glTexCoord2f(1.0f, 1.0f); glVertex3f( 1.0f, 1.0f, -1.0f);
glTexCoord2f(0.0f, 1.0f); glVertex3f( 1.0f, 1.0f, 1.0f);
glTexCoord2f(0.0f, 0.0f); glVertex3f( 1.0f, -1.0f, 1.0f);
// muka kiri
glTexCoord2f(0.0f, 0.0f); glVertex3f(-1.0f, -1.0f, -1.0f);
glTexCoord2f(1.0f, 0.0f); glVertex3f(-1.0f, -1.0f, 1.0f);
glTexCoord2f(1.0f, 1.0f); glVertex3f(-1.0f, 1.0f, 1.0f);
glTexCoord2f(0.0f, 1.0f); glVertex3f(-1.0f, 1.0f, -1.0f);
glEnd();

xrot+=0.3f;
yrot+=0.2f;
zrot+=0.4f;
return TRUE;
}

GLvoid KillGLWindow(GLvoid)
{
if (fullscreen)
{
ChangeDisplaySettings(NULL,0);
ShowCursor(TRUE);
}

if (hRC)
{
if (!wglMakeCurrent(NULL,NULL))
{
MessageBox(NULL,"Release Of DC And RC Failed.","SHUTDOWN ERROR",MB_OK | MB_ICONINFORMATION);
}

if (!wglDeleteContext(hRC))
{
MessageBox(NULL,"Release Rendering Context Failed.","SHUTDOWN ERROR",MB_OK | MB_ICONINFORMATION);
}
hRC=NULL;
}

if (hDC && !ReleaseDC(hWnd,hDC))
{
MessageBox(NULL,"Release Device Context Failed.","SHUTDOWN ERROR",MB_OK | MB_ICONINFORMATION);
hDC=NULL;
}

if (hWnd && !DestroyWindow(hWnd))
{
MessageBox(NULL,"Could Not Release hWnd.","SHUTDOWN ERROR",MB_OK | MB_ICONINFORMATION);
hWnd=NULL;
}

if (!UnregisterClass("OpenGL",hInstance))
{
MessageBox(NULL,"Could Not Unregister Class.","SHUTDOWN ERROR",MB_OK | MB_ICONINFORMATION);
hInstance=NULL;
}
}



BOOL CreateGLWindow(char* title, int width, int height, int bits, bool fullscreenflag)
{
GLuint PixelFormat;
WNDCLASS wc;
DWORD dwExStyle;
DWORD dwStyle;
RECT WindowRect;
WindowRect.left=(long)0;
WindowRect.right=(long)width;
WindowRect.top=(long)0;
WindowRect.bottom=(long)height;

fullscreen=fullscreenflag;

hInstance = GetModuleHandle(NULL);
wc.style = CS_HREDRAW | CS_VREDRAW | CS_OWNDC;
wc.lpfnWndProc = (WNDPROC) WndProc;
wc.cbClsExtra = 0;
wc.cbWndExtra = 0;
wc.hInstance = hInstance;
wc.hIcon = LoadIcon(NULL, IDI_WINLOGO);
wc.hCursor = LoadCursor(NULL, IDC_ARROW);
wc.hbrBackground = NULL;
wc.lpszMenuName = NULL;
wc.lpszClassName = "OpenGL";

if (!RegisterClass(&wc))
{
MessageBox(NULL,"Failed To Register The Window Class.","ERROR",MB_OK|MB_ICONEXCLAMATION);
return FALSE;
}

if (fullscreen)
{
DEVMODE dmScreenSettings;
memset(&dmScreenSettings,0,sizeof(dmScreenSettings));
dmScreenSettings.dmSize=sizeof(dmScreenSettings);
dmScreenSettings.dmPelsWidth = width;
dmScreenSettings.dmPelsHeight = height;
dmScreenSettings.dmBitsPerPel = bits;
dmScreenSettings.dmFields=DM_BITSPERPEL|DM_PELSWIDTH|DM_PELSHEIGHT;


if (ChangeDisplaySettings(&dmScreenSettings,CDS_FULLSCREEN)!=DISP_CHANGE_SUCCESSFUL)
{

if (MessageBox(NULL,"The Requested Fullscreen Mode Is Not Supported By\nYour Video Card. Use Windowed Mode Instead?","NeHe GL",MB_YESNO|MB_ICONEXCLAMATION)==IDYES)
{
fullscreen=FALSE;
}
else
{

MessageBox(NULL,"Program Will Now Close.","ERROR",MB_OK|MB_ICONSTOP);
return FALSE;
}
}
}

if (fullscreen)
{
dwExStyle=WS_EX_APPWINDOW;
dwStyle=WS_POPUP;
ShowCursor(FALSE);
}
else
{
dwExStyle=WS_EX_APPWINDOW | WS_EX_WINDOWEDGE;
dwStyle=WS_OVERLAPPEDWINDOW;
}

AdjustWindowRectEx(&WindowRect, dwStyle, FALSE, dwExStyle);

// Create The Window
if (!(hWnd=CreateWindowEx( dwExStyle,
"OpenGL",
title,
dwStyle |
WS_CLIPSIBLINGS |
WS_CLIPCHILDREN,
0, 0,
WindowRect.right-WindowRect.left,
WindowRect.bottom-WindowRect.top,
NULL,
NULL,
hInstance,
NULL)))
{
KillGLWindow();
MessageBox(NULL,"Window Creation Error.","ERROR",MB_OK|MB_ICONEXCLAMATION);
return FALSE;
}

static PIXELFORMATDESCRIPTOR pfd=
{
sizeof(PIXELFORMATDESCRIPTOR),
1,
PFD_DRAW_TO_WINDOW |
PFD_SUPPORT_OPENGL |
PFD_DOUBLEBUFFER,
PFD_TYPE_RGBA,
bits,
0, 0, 0, 0, 0, 0,
0,
0,
0,
0, 0, 0, 0,
16,
0,
0,
PFD_MAIN_PLANE,
0,
0, 0, 0
};

if (!(hDC=GetDC(hWnd)))
{
KillGLWindow();
MessageBox(NULL,"Can't Create A GL Device Context.","ERROR",MB_OK|MB_ICONEXCLAMATION);
return FALSE;
}

if (!(PixelFormat=ChoosePixelFormat(hDC,&pfd)))
{
KillGLWindow();
MessageBox(NULL,"Can't Find A Suitable PixelFormat.","ERROR",MB_OK|MB_ICONEXCLAMATION);
return FALSE;
}

if(!SetPixelFormat(hDC,PixelFormat,&pfd))
{
KillGLWindow();
MessageBox(NULL,"Can't Set The PixelFormat.","ERROR",MB_OK|MB_ICONEXCLAMATION);
return FALSE;
}

if (!(hRC=wglCreateContext(hDC)))
{
KillGLWindow();
MessageBox(NULL,"Can't Create A GL Rendering Context.","ERROR",MB_OK|MB_ICONEXCLAMATION);
return FALSE;
}

if(!wglMakeCurrent(hDC,hRC))
{
KillGLWindow();
MessageBox(NULL,"Can't Activate The GL Rendering Context.","ERROR",MB_OK|MB_ICONEXCLAMATION);
return FALSE;
}

ShowWindow(hWnd,SW_SHOW);
SetForegroundWindow(hWnd);
SetFocus(hWnd);
ReSizeGLScene(width, height);

if (!InitGL())
{
KillGLWindow();
MessageBox(NULL,"Initialization Failed.","ERROR",MB_OK|MB_ICONEXCLAMATION);
return FALSE;
}

return TRUE;
}

LRESULT CALLBACK WndProc( HWND hWnd,
UINT uMsg,
WPARAM wParam,
LPARAM lParam)
{
switch (uMsg)
{
case WM_ACTIVATE:
{
if (!HIWORD(wParam))
{
active=TRUE;
}
else
{
active=FALSE;
}

return 0;
}

case WM_SYSCOMMAND:
{
switch (wParam)
{
case SC_SCREENSAVE:
case SC_MONITORPOWER:
return 0;
}
break;
}

case WM_CLOSE:
{
PostQuitMessage(0);
return 0;
}

case WM_KEYDOWN:
{
keys[wParam] = TRUE;
return 0;
}

case WM_KEYUP:
{
keys[wParam] = FALSE;
return 0;
}

case WM_SIZE:
{
ReSizeGLScene(LOWORD(lParam),HIWORD(lParam));
return 0;
}
}


return DefWindowProc(hWnd,uMsg,wParam,lParam);
}

int WINAPI WinMain( HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPSTR lpCmdLine,
int nCmdShow)
{
MSG msg;
BOOL done=FALSE;


if (MessageBox(NULL,"Would You Like To Run In Fullscreen Mode?", "Start FullScreen?",MB_YESNO|MB_ICONQUESTION)==IDNO)
{
fullscreen=FALSE;
}


if (!CreateGLWindow("NeHe's Texture Mapping Tutorial",640,480,16,fullscreen))
{
return 0;
}

while(!done)
{
if (PeekMessage(&msg,NULL,0,0,PM_REMOVE))
{
if (msg.message==WM_QUIT)
{
done=TRUE;
}
else
{
TranslateMessage(&msg);
DispatchMessage(&msg);
}
}
else
{
if ((active && !DrawGLScene()) || keys[VK_ESCAPE])
{
done=TRUE;
}
else
{
SwapBuffers(hDC);
}

if (keys[VK_F1])
{
keys[VK_F1]=FALSE;
KillGLWindow();
fullscreen=!fullscreen;
// Recreate Our OpenGL Window
if (!CreateGLWindow("NeHe's Texture Mapping Tutorial",640,480,16,fullscreen))
{
return 0;
}
}
}
}

KillGLWindow();
return (msg.wParam);
}
==================================================================================================

I'm really confused now coz I'm a newbie for this

<div class="ForumMod">modified on Saturday, November 22, 2008 12:53 AM</div>
AnswerRe: Problem in debugging Pin
David Crow21-Nov-08 18:04
David Crow21-Nov-08 18:04 
AnswerRe: Problem in debugging Pin
sen pao21-Nov-08 18:17
sen pao21-Nov-08 18:17 
AnswerNeed Help: How do I assign a Char* To System::String ^ Pin
niiAmoo21-Nov-08 12:35
niiAmoo21-Nov-08 12:35 
GeneralRe: Need Help: How do I assign a Char* To System::String ^ Pin
Saurabh.Garg21-Nov-08 16:43
Saurabh.Garg21-Nov-08 16:43 
GeneralRe: Need Help: How do I assign a Char* To System::String ^ Pin
niiAmoo21-Nov-08 20:47
niiAmoo21-Nov-08 20:47 
GeneralRe: Need Help: How do I assign a Char* To System::String ^ Pin
Saurabh.Garg22-Nov-08 3:16
Saurabh.Garg22-Nov-08 3:16 
QuestionApp depending on wrong DLL version Pin
KellyR21-Nov-08 10:45
KellyR21-Nov-08 10:45 
AnswerRe: App depending on wrong DLL version Pin
Randor 22-Nov-08 0:26
professional Randor 22-Nov-08 0:26 
QuestionSerialization and schema numbers Pin
softwaremonkey21-Nov-08 5:41
softwaremonkey21-Nov-08 5:41 
QuestionRe: Serialization and schema numbers Pin
Mark Salsbery21-Nov-08 6:13
Mark Salsbery21-Nov-08 6:13 
QuestionAVI frame grabber – needs timer, why? [modified] SOLVED Pin
Vaclav_21-Nov-08 5:08
Vaclav_21-Nov-08 5:08 
AnswerRe: AVI frame grabber – needs timer, why? Pin
Mark Salsbery21-Nov-08 6:54
Mark Salsbery21-Nov-08 6:54 
GeneralRe: AVI frame grabber – needs timer, why? Pin
Vaclav_23-Nov-08 5:48
Vaclav_23-Nov-08 5:48 
QuestionUser-defined objects in Windows message parameters Pin
Atropus21-Nov-08 3:50
Atropus21-Nov-08 3:50 
AnswerRe: User-defined objects in Windows message parameters Pin
Matthew Faithfull21-Nov-08 4:00
Matthew Faithfull21-Nov-08 4:00 
AnswerRe: User-defined objects in Windows message parameters Pin
Rajasekharan Vengalil21-Nov-08 5:31
Rajasekharan Vengalil21-Nov-08 5:31 
AnswerRe: User-defined objects in Windows message parameters Pin
Roger Stoltz21-Nov-08 5:56
Roger Stoltz21-Nov-08 5:56 

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.