Search
 
SCRIPT & CODE EXAMPLE
 

CPP

button creation in C++ GUI

#include <Windows.h>

int _tmain(int argc, _TCHAR* argv[])
{
    MSG msg;
    //if you add WS_CHILD flag,CreateWindow will fail because there is no parent window.
    HWND hWnd = CreateWindow(TEXT("button"), TEXT("Easy"), WS_VISIBLE | WS_POPUP,
        10, 10, 80, 25, NULL, NULL, NULL,  NULL);

    ShowWindow(hWnd, SW_SHOW);
    UpdateWindow(hWnd);

    while (GetMessage(&msg, NULL, 0, 0))
    {
        TranslateMessage(&msg);
        DispatchMessage(&msg);
    }

    return (int) msg.wParam;
}
Comment

PREVIOUS NEXT
Code Example
Cpp :: subsets of a given array 
Cpp :: c++ vs c# 
Cpp :: C++ Ranged Based for Loop 
Cpp :: What will be the values of variables p, q and i at the end of following loop? int p = 5; int q = 18; for(int i=1;i&lt;5;i++) p++; --q; 
Cpp :: find the second aperrence of a char in string c++ 
Cpp :: cpp qmenu add custom widget action 
Cpp :: Redragon m609 weight 
Cpp :: boundary traversal of binary tree 
Cpp :: Required Length 
Cpp :: Change Font ImGui 
Cpp :: C++ Things to Remember 
Cpp :: return value optimization example 
Cpp :: dualSort 
Cpp :: c++ login 
Cpp :: how to analyse a poem 
Cpp :: c++ projects 
Cpp :: sort c++ array 
Cpp :: how a function gives a pointer as parameter c++ 
Cpp :: c++ for 
Cpp :: uses of c++ 
Cpp :: convert c++ to mips assembly code online 
C :: trie tableau c 
C :: random number between 2 in C 
C :: arduino serial read write structure 
C :: bubble sort a linked list in c 
C :: how to open jupyter notebook in local disk D 
C :: npm fix old lockfile 
C :: c language append line to file 
C :: c assign pointer to struct 
C :: c programing strtok use 
ADD CONTENT
Topic
Content
Source link
Name
2+2 =