Code:
[SIZE="4"][COLOR="Blue"]#include <Windows.h>
#include <tchar.h>
int WINAPI WinMain(HINSTANCE h, HINSTANCE hh, LPSTR l, int i)
{
WNDCLASSEX winClass;
winClass.cbSize = sizeof(WNDCLASSEX);
winClass.style = CS_HREDRAW | CS_VREDRAW;
winClass.hInstance = h;
winClass.hIcon = LoadIcon(nullptr, IDI_APPLICATION);
winClass.hCursor = LoadCursor(nullptr, IDC_ARROW);
winClass.hbrBackground = static_cast<HBRUSH>(GetStockObject(GRAY_BRUSH));
winClass.lpszMenuName = nullptr; //no menu
static LPCTSTR appname = { _T("app") }; //initializing the name
winClass.lpszClassName = appname;
winClass.hIconSm = nullptr; //the small icon in the left corner of the title bar
//winClass.lpfnWndProc = DefWindowProc;
RegisterClassEx(&winClass);
HWND hWnd;
hWnd = CreateWindow(appname, _T("my app"), WS_OVERLAPPEDWINDOW, CW_USEDEFAULT, CW_USEDEFAULT,
CW_USEDEFAULT, CW_USEDEFAULT, nullptr, nullptr, h, nullptr);
//to show the window
ShowWindow(hWnd, i);
}[/COLOR][/SIZE]
මේකෙ වැරැද්ද මොකක්ද කියපංකො ? කිසිම එරර් එකක් නෑ.. ඒ වුනාට වින්ඩෝ එක පේන්නෙත් නෑ..
////winClass.lpfnWndProc = DefWindowProc;
මේ පේලියට පොතේ කෙලින්ම winClass.lpfnWndProc = WindowProc; කියල දීල තියෙන්නෙ.. ඒත් එහෙම දෙයක් කලින් ඩික්ලෙයා කරලත් නෑ.. ඕක අන්කමෙන්ට් කලාට වින්ඩෝ එක පේන්නෙත් නෑ..




Variable name Path ban? oya danatama path kiyala ekak thiyene. eke kerolata semikolan ekak gahala oya path eka dapan .. uba eclips nam use karanne