Yes it is.
for example:
--------
#include<windows.h>
int main()
{
MessageBox(0,"","",0);
return 0;
}
--------
or an other example
--------
#include<windows.h>
#include<iostream>
using namespace std;
LRESULT CALLBACK WndProc(HWND,UINT,WPARAM,LPARAM);
int main()
{
WNDCLASS* wndclass=new WNDCLASS;
MSG* msg=new MSG;
HWND hWnd;
char* name="name";
wndclass->cbClsExtra=0;
wndclass->cbWndExtra=0;
wndclass->hbrBackground=(HBRUSH)1;
wndclass->hCursor=LoadCursor(NULL,IDC_ARROW);
wndclass->hIcon=LoadIcon(NULL,IDI_APPLICATION);
wndclass->hInstance=GetModuleHandle(0);
wndclass->lpfnWndProc=WndProc;
wndclass->lpszClassName=name;
wndclass->lpszMenuName=0;
wndclass->style=CS_HREDRAW|CS_VREDRAW;
RegisterClass(wndclass);
hWnd=CreateWindow(name,name,WS_OVERLAPPEDWINDOW,
CW_USEDEFAULT,CW_USEDEFAULT,CW_USEDEFAULT,CW_USEDEFAULT,0,0,GetModuleHandle(0),0);
ShowWindow(hWnd,SW_SHOW);
UpdateWindow(hWnd);
while(GetMessage(msg,0,0,0))
{
TranslateMessage(msg);
DispatchMessage(msg);
}
return 0;
}
LRESULT CALLBACK WndProc(HWND hWnd,UINT message,WPARAM wParam,LPARAM lParam)
{
cout<<"message:"<<hex<<message<<endl;
switch(message)
{
case WM_DESTROY:
PostQuitMessage(0);
return 0;
}
return DefWindowProc(hWnd,message,wParam,lParam);
}
-------
Look at the second parameter of GetMessage. Is your hWnd.
Thanks JonhFill for your reply,
I'm very new programmer in MS C++ that's why maybe I dont
realy see where is the list ?
In fact I would need to create a list like
_____________
| Option 1 |
| Option 2 |
| Option 3 |
|__Option 4_|
Any example would be veeeeeeeeeeeeeeeeery appreciated.
Thanks.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.