0

Hi there)
Guys , as I understand - this is c++ code =

int WINAPI WinMain(HINSTANCE hInst,HINSTANCE,LPSTR,int ss) {
 /* создаем и регистрируем класс главного окна */
 WNDCLASS wc;
 wc.style=0;
 wc.lpfnWndProc=MainWinProc;
 wc.cbClsExtra=wc.cbWndExtra=0;
 wc.hInstance=hInst;
 wc.hIcon=NULL;
 wc.hCursor=NULL;
 wc.hbrBackground=(HBRUSH)(COLOR_WINDOW+1);
 wc.lpszMenuName=NULL;
 wc.lpszClassName="Example 4 MainWnd Class";
 if (!RegisterClass(&wc)) return FALSE;

but tell me please - how can I use realize the same code in clear C ?
if you know some good article - please give link )

big thanks in advance)

3
Contributors
4
Replies
6
Views
5 Years
Discussion Span
Last Post by vedro-compota
Featured Replies
  • I am afraid you've misunderstood. The code is plain C. No porting effort required. Except maybe an olbanic case in the comment. Read More

  • [QUOTE=vedro-compota]but what about point between words - it's feature of objective programming , but original c is functional language , isn't it? if "isn't" how can it be implemented without objective style? [/QUOTE] Well, WNDCLASS is a structure defined in 'windows.h' and the contents of a structure are accessed with … Read More

1

I am afraid you've misunderstood. The code is plain C. No porting effort required. Except maybe an olbanic case in the comment.

Comments
+++++
0

but what about point between words - it's feature of objective programming , but original c is functional language , isn't it?
if "isn't" how can it be implemented without objective style?

1

but what about point between words - it's feature of objective programming , but original c is functional language , isn't it?
if "isn't" how can it be implemented without objective style?

Well, WNDCLASS is a structure defined in 'windows.h' and the contents of a structure are accessed with a dot operator, remember!
See here .

Comments
+++++
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.