Display of child window ctrls

Hai,Actually i'm trying to display all the ctrls in window atonce it appears in output. can anyone tell me why my code is not working & here is my code,

in WndProc():
1
2
3
4
5
6
7
8
9
10
11
12
13
	static int i;
	char childctrlclasses[19][19]={"SCROLLBAR","SCROLLBAR","BUTTON","BUTTON","BUTTON","LISTBOX","EDIT","STATIC"};
	//char classesstyles[100][100]={"WS_CHILD|WS_VISIBLE|SBS_HORZ","WS_CHILD|WS_VISIBLE|SBS_VERT","WS_CHILD|WS_VISIBLE|BS_PUSHBUTTON","WS_CHILD|WS_VISIBLE|BS_RADIOBUTTON","WS_CHILD|WS_VISIBLE|BS_SETCHECKBOX","WS_CHILD|WS_VISIBLE|LBS_SORT","WS_CHILD|WS_VISIBLE|WS_BORDER","WS_CHILD|WS_VISIBLE|SS_BLACKRECT"};
	char classesstyles[10][100]={"SBS_HORZ","SBS_VERT","BS_PUSHBUTTON","BS_RADIOBUTTON","BS_SETCHECKBOX","LBS_SORT","WS_BORDER","SS_BLACKRECT"};
	switch(m)
	{
	case WM_CREATE:
		for(i=0;i<=2;i++)
		{
		
         hc[i]=CreateWindow(childctrlclasses[i],"1",strcat("WS_CHILD|WS_VISIBLE|",classesstyles[i]),i*20,i*50,50,50,hwnd,NULL,hI,NULL);
		}  
		return 0;

I first tried to display atleast first two ctrls,but that too is not getting displayed..Is there any alternative code(Win 32 only)


2)And moreover i cannot execute wsprintf,it's showing some error,i think maybe i would have did some mistake&can anyone tell me the usage of it.If you explain with small example i could get some clearcut idea..

Can anyone help me out..Advance Thanks!!!

The third argument of CreateWindow is a number, not a string
http://msdn.microsoft.com/en-us/library/ms632679%28VS.85%29.aspx
It would probably be better to learn one at a time.
Topic archived. No new replies allowed.