Windows Programing

This is a discussion on Windows Programing within the C Programming forums, part of the General Programming Boards category; Hello. I need know the way of my .exe file. In console mode is just you declare Code: int main(int ...

  1. #1
    Registered User
    Join Date
    May 2008
    Posts
    39

    Windows Programing

    Hello.

    I need know the way of my .exe file.

    In console mode is just you declare

    Code:
    int main(int argn,char *arg[])

    and than the paramenter arg[0] is the local os the executable.


    But in windows programing how i do this?

    Thanks

  2. #2
    int x = *((int *) NULL); Cactus_Hugger's Avatar
    Join Date
    Jul 2003
    Location
    Banks of the River Styx
    Posts
    902
    Quote Originally Posted by gadu View Post
    Code:
    int main(int argn,char *arg[])
    This is a valid entry point for a Windows app, but yes, it will be console based. (What's wrong with that? ;-) )

    For a Win32 GUI app, the general entry point is:
    Code:
    int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow);
    From here.

    Google for a couple of Windows / Win32 programming tutorials, if you're looking to get started down that path...
    long time; /* know C? */
    Unprecedented performance: Nothing ever ran this slow before.
    Any sufficiently advanced bug is indistinguishable from a feature.
    Real Programmers confuse Halloween and Christmas, because dec 25 == oct 31.
    The best way to accelerate an IBM is at 9.8 m/s/s.
    recursion (re - cur' - zhun) n. 1. (see recursion)

  3. #3
    Registered User
    Join Date
    May 2008
    Posts
    39
    I know man.

    But i really like to know what is the WinMain parameter that i can found the way of .exe file.


    Thanks

  4. #4
    Woof, woof! zacs7's Avatar
    Join Date
    Mar 2007
    Location
    Australia
    Posts
    3,459
    None, as per the manual the executable name is not included in lpCmdLine nor returned by GetCommandLine().

    Quote Originally Posted by msdn [url
    http://msdn.microsoft.com/en-us/library/ms633559(VS.85).aspx][/url]
    lpCmdLine
    [in] Pointer to a null-terminated string specifying the command line for the application, excluding the program name. To retrieve the entire command line, use the GetCommandLine function.
    There is probably some function that can, have a look around MSDN.

  5. #5
    a_capitalist_story
    Join Date
    Dec 2007
    Posts
    2,648
    Feeling generous this morning: GetModuleFileName

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, 07: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, 06:05 PM
  4. SDL and Windows
    By nickname_changed in forum Windows Programming
    Replies: 14
    Last Post: 10-24-2003, 12:19 AM
  5. Manipulating the Windows Clipboard
    By Johno in forum Windows Programming
    Replies: 2
    Last Post: 10-01-2002, 09:37 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21