http://GameProgrammer.Com

Programming

GP Mailing List
     Thread Index
     Date Index

ATXGPSIG List
     Thread Index
     Date Index

Google
>

Home

Wise2Food



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

At least do these



//To give it the same setup as mfc
bool InitApplication(HINSTANCE hInstance)
{ 
 WNDCLASSEX WndClass;
 HWND hWnd;

 hWnd = FindWindow(szAppName,NULL);
 if(hWnd)
 {
  if(IsIconic(hWnd))
   ShowWindow(hWnd,SW_RESTORE);
  SetForegroundWindow(hWnd);
  return false;
 }

 WndClass.cbSize   = sizeof(WndClass);
 WndClass.style   = 0;//CS_HREDRAW | CS_VREDRAW | CS_OWNDC;
 WndClass.lpfnWndProc = (WNDPROC) WndProc;
 WndClass.cbClsExtra  = 0;
 WndClass.cbWndExtra  = 0;
 WndClass.hInstance  = hInstance;
 WndClass.hIcon   = LoadIcon(NULL,IDI_APPLICATION);
 WndClass.hCursor  = LoadCursor(NULL,IDC_ARROW);
 WndClass.hbrBackground = (HBRUSH)GetStockObject(BLACK_BRUSH);
 WndClass.lpszMenuName = NULL;
 WndClass.lpszClassName = szAppName;
 WndClass.hIconSm  = LoadIcon(NULL,IDI_APPLICATION);
 if(0== RegisterClassEx(&WndClass))
  return false;
 return true;
}

-----Original Message-----
From: Josiah Avery <josiahavery@hotmail.com>
To: gameprogrammer@gameprogrammer.com <gameprogrammer@gameprogrammer.com>
Date: Sunday, March 12, 2000 8:53 PM
Subject: A few quickies...


>
>Lo all,
>
>I have a couple of really quick questions:
>
>1. Does anyone know where I can download MS MASM 6?
>
>2. I have finally decided to make the transition from DOS to Win32 ( albeit 
>in agonizing pain...); all the other kids are doing it... Anyway I am having 
>problems registering this structure:
>
>WNDCLASS win;
>win.cbClsExtra    = NULL;
>win.cbWndExtra    = NULL;
>win.hInstance     = version; // specified as a param to WinMain
>win.lpfnWndProc   = NULL;
>win.lpszClassName = name;
>
>I didn't directly initalize all avaible members in the strcture becasue I 
>didn't really see the need to.
>
>Thanks a lot.
>
>Josiah Avery.
>______________________________________________________
>Get Your Private, Free Email at http://www.hotmail.com
>
>=================================================================
>The GameProgrammer.Com mailing list is for the open discussion
>of any topic related to the 
art, science, and business of
>programming games. This list is especially tolerant of beginners.
>We were all beginners once
>
>To SUBSCRIBE or UNSUBSCRIBE please visit:
>http://gameprogrammer.com/mailinglist.html

=================================================================
The GameProgrammer.Com mailing list is for the open discussion
of any topic related to the art, science, and business of
programming games. This list is especially tolerant of beginners.
We were all beginners once

To SUBSCRIBE or UNSUBSCRIBE please visit:
http://gameprogrammer.com/mailinglist.html