Windows application in C

Can someone tell me how I can create a basic Windows application in use in C (I have a little idea about C ++ too)?

+3
source share
5 answers

Get Petzold Windows Programming ; it is a classic and covers Win32 development from its main roots C.

+6
source

The smallest Windows C program: -

#include <windows.h>
#include "resource.h"

int CALLBACK WinMain(HINSTANCE hApp, HINSTANCE, LPSTR pszCmdLine, int nCmdShow)
{
  return DialogBoxParam(hApp,MAKEINTRESOURCE(IDD_DIALOG1),NULL,NULL,NULL);
}

It is assumed that you used the resource editor to create a dialog resource called IDD_DIALOG1. The dialog box will display and close if the Close button is clicked.

+3
source
#include <stdlib.h>
int main()
{
    printf("Hello World!");
}

Windows. - , , . Windows .

+1

, . TONS , MSDN, .

, " Windows" - , .

+1

Raymond Chen - , .

You can compile this in Visual Studio. In VS2005, I created a new empty C ++ project and added comctl32.lib to Configuration->Linker->Input->Additional Dependencies.

+1
source

Source: https://habr.com/ru/post/1757368/


All Articles