Click here to Skip to main content
15,741,818 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Full Screen Pin
David Crow21-Oct-09 9:25
David Crow21-Oct-09 9:25 
GeneralRe: Full Screen Pin
MrMcIntyre21-Oct-09 9:33
MrMcIntyre21-Oct-09 9:33 
GeneralRe: Full Screen Pin
MrMcIntyre21-Oct-09 9:54
MrMcIntyre21-Oct-09 9:54 
GeneralRe: Full Screen Pin
David Crow21-Oct-09 16:57
David Crow21-Oct-09 16:57 
GeneralRe: Full Screen Pin
MrMcIntyre22-Oct-09 5:43
MrMcIntyre22-Oct-09 5:43 
AnswerRe: Full Screen Pin
David Crow22-Oct-09 5:45
David Crow22-Oct-09 5:45 
GeneralRe: Full Screen Pin
loyal ginger21-Oct-09 8:38
loyal ginger21-Oct-09 8:38 
AnswerRe: Full Screen Pin
MrMcIntyre22-Oct-09 5:53
MrMcIntyre22-Oct-09 5:53 
This is a disaster. Here is the entire source code for the win32.

<br />
#include <windows.h><br />
<br />
const char g_szClassName[] = "My Project";<br />
<br />
// Step 4: the Window Procedure<br />
LRESULT CALLBACK WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)<br />
{<br />
switch(msg)<br />
{<br />
case WM_CLOSE:<br />
DestroyWindow(hwnd);<br />
break;<br />
case WM_DESTROY:<br />
PostQuitMessage(0);<br />
break;<br />
default:<br />
return DefWindowProc(hwnd, msg, wParam, lParam);<br />
}<br />
return 0;<br />
}<br />
<br />
<br />
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,<br />
LPSTR lpCmdLine, int nCmdShow)<br />
{<br />
WNDCLASSEX wc;<br />
HWND hwnd;<br />
MSG Msg;<br />
<br />
<br />
//Step 1: Registering the Window Class<br />
wc.cbSize = sizeof(WNDCLASSEX);<br />
wc.style = 0;<br />
wc.lpfnWndProc = WndProc;<br />
wc.cbClsExtra = 0;<br />
wc.cbWndExtra = 0;<br />
wc.hInstance = hInstance;<br />
wc.hIcon = LoadIcon(NULL, IDI_APPLICATION);<br />
wc.hCursor = LoadCursor(NULL, IDC_ARROW);<br />
wc.hbrBackground = (HBRUSH)GetStockObject ( BLACK_BRUSH );<br />
wc.lpszMenuName  = 0;<br />
wc.lpszClassName = g_szClassName;<br />
wc.hIconSm = LoadIcon(NULL, IDI_APPLICATION);<br />
<br />
<br />
if(!RegisterClassEx(&wc))<br />
{<br />
MessageBox(NULL, "Window Registration Failed!", "iWorld",<br />
MB_ICONEXCLAMATION | MB_OK);<br />
return 0;<br />
}<br />
<br />
<br />
// Step 2: Creating the Window<br />
hwnd = CreateWindowEx(<br />
WS_EX_CLIENTEDGE,<br />
g_szClassName,<br />
"My Project",<br />
WS_POPUP,<br />
SW_MAXIMIZE. <br />
NULL, NULL, hInstance, NULL);<br />
<br />
<br />
if(hwnd == NULL)<br />
{<br />
MessageBox(NULL, "Window Creation Failed!", "Error!",<br />
MB_ICONEXCLAMATION | MB_OK);<br />
return 0;<br />
}<br />
<br />
<br />
<br />
<br />
ShowWindow(hwnd, nCmdShow);<br />
UpdateWindow(hwnd);<br />
<br />
<br />
// Step 3: The Message Loop<br />
while(GetMessage(&Msg, NULL, 0, 0) > 0)<br />
{<br />
TranslateMessage(&Msg);<br />
DispatchMessage(&Msg);<br />
}<br />
return Msg.wParam;<br />
}<br />
<br />


Andrew McIntyre

AnswerRe: Full Screen Pin
David Crow22-Oct-09 5:59
David Crow22-Oct-09 5:59 
GeneralRe: Full Screen Pin
MrMcIntyre22-Oct-09 6:04
MrMcIntyre22-Oct-09 6:04 
AnswerRe: Full Screen Pin
Iain Clarke, Warrior Programmer21-Oct-09 8:53
Iain Clarke, Warrior Programmer21-Oct-09 8:53 
GeneralRe: Full Screen Pin
MrMcIntyre24-Oct-09 3:14
MrMcIntyre24-Oct-09 3:14 
GeneralRe: Full Screen Pin
Iain Clarke, Warrior Programmer24-Oct-09 4:22
Iain Clarke, Warrior Programmer24-Oct-09 4:22 
QuestionThe output seem confusing please clear my doubt Pin
venkatasu21-Oct-09 4:20
venkatasu21-Oct-09 4:20 
AnswerRe: The output seem confusing please clear my doubt Pin
Chuck O'Toole21-Oct-09 4:25
Chuck O'Toole21-Oct-09 4:25 
GeneralRe: The output seem confusing please clear my doubt Pin
venkatasu21-Oct-09 4:59
venkatasu21-Oct-09 4:59 
GeneralRe: The output seem confusing please clear my doubt Pin
Chuck O'Toole21-Oct-09 5:01
Chuck O'Toole21-Oct-09 5:01 
GeneralRe: The output seem confusing please clear my doubt Pin
venkatasu21-Oct-09 5:06
venkatasu21-Oct-09 5:06 
GeneralRe: The output seem confusing please clear my doubt Pin
Chuck O'Toole21-Oct-09 5:07
Chuck O'Toole21-Oct-09 5:07 
GeneralRe: The output seem confusing please clear my doubt Pin
venkatasu21-Oct-09 5:13
venkatasu21-Oct-09 5:13 
QuestionRe: The output seem confusing please clear my doubt Pin
David Crow21-Oct-09 5:16
David Crow21-Oct-09 5:16 
AnswerRe: The output seem confusing please clear my doubt Pin
venkatasu21-Oct-09 5:42
venkatasu21-Oct-09 5:42 
GeneralRe: The output seem confusing please clear my doubt Pin
David Crow21-Oct-09 5:47
David Crow21-Oct-09 5:47 
GeneralRe: The output seem confusing please clear my doubt Pin
Chuck O'Toole21-Oct-09 5:20
Chuck O'Toole21-Oct-09 5:20 
GeneralRe: The output seem confusing please clear my doubt Pin
venkatasu21-Oct-09 5:44
venkatasu21-Oct-09 5:44 

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.