Thread: Re: Resolve Windows Macro?

  1. #1
    Registered User
    Join Date
    Jan 2002
    Posts
    34

    Re: Resolve Windows Macro?

    Att'n: Prelude,

    I've tried your solutions: putting each statement
    on a single line, and removing the comments.

    The results are the same!

    If your post script is meant as a complement,
    then put this one in also.

    #include <windows.h>

    int STDCALL

    WinMain (HINSTANCE hInst, HINSTANCE hPrev, LPSTR
    1pCmd, int nShow)
    {

    MesageBox (NULL, "Hello, Windows!", "Hello", MB_OK);

    return 0;

    }

    Note: You may get an compiler error at line (1pCmd),
    remove the 1 (Lower case el (1).

    Best regards.

  2. #2
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    Posts
    9,897
    This works, but be sure to compile using a win32 application instead of a console application or you'll get errors with undefined identifier _main, or something like that
    Code:
    #include <windows.h> 
    
    int WINAPI WinMain (HINSTANCE hInst, HINSTANCE hPrev, LPSTR lpCmd, int nShow) 
    { 
      MessageBox (NULL, "Hello, Windows!", "Hello", MB_OK); 
      return 0; 
    }
    -Prelude
    My best code is written with the delete key.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Just starting Windows Programming, School me!
    By Shamino in forum Windows Programming
    Replies: 17
    Last Post: 02-22-2008, 08:14 AM
  2. how to make a windows application
    By crvenkapa in forum C++ Programming
    Replies: 3
    Last Post: 03-26-2007, 09:59 AM
  3. Question..
    By pode in forum Windows Programming
    Replies: 12
    Last Post: 12-19-2004, 07:05 PM
  4. Manipulating the Windows Clipboard
    By Johno in forum Windows Programming
    Replies: 2
    Last Post: 10-01-2002, 09:37 AM
  5. Resolve error in Windows Macro?
    By Adock in forum C Programming
    Replies: 2
    Last Post: 03-19-2002, 08:41 PM