|
-
Oct 1st, 2001, 08:01 PM
#1
Thread Starter
Frenzied Member
Graphic Dissapearing?
I had this problem with my checkers game too! 
Whenever I put too many buttons on the screen, the pic dissapears....heres the code I want to work:
Code:
a=133;
for(i=1;i<=5;i++) {
for(i=1; i<=5; i++) { //draws all buttons (by x, y has its own variable (a))
Board[1][i] = CreateWindow("Button", " ", WS_CHILD | /*WS_DLGFRAME |*/ WS_VISIBLE, 5, a, 40, 40, ghWnd_Main, NULL, hInstance, NULL);
Board[2][i] = CreateWindow("Button", " ", WS_CHILD | /*WS_DLGFRAME |*/ WS_VISIBLE, 45, a, 40, 40, ghWnd_Main, NULL, hInstance, NULL);
Board[3][i] = CreateWindow("Button", " ", WS_CHILD | /*WS_DLGFRAME |*/ WS_VISIBLE, 85, a, 40, 40, ghWnd_Main, NULL, hInstance, NULL);
Board[4][i] = CreateWindow("Button", " ", WS_CHILD | /*WS_DLGFRAME |*/ WS_VISIBLE, 125, a, 40, 40, ghWnd_Main, NULL, hInstance, NULL);
Board[5][i] = CreateWindow("Button", " ", WS_CHILD | /*WS_DLGFRAME |*/ WS_VISIBLE, 165, a, 40, 40, ghWnd_Main, NULL, hInstance, NULL);
a=a+40;
}
}
but that makes my graphic dissapear!
but it will appear if I use this...but I need the whole board! 
Code:
a=133;
for(i=1;i<=5;i++) {
for(i=1; i<=5; i++) { //draws all buttons (by x, y has its own variable (a))
Board[1][i] = CreateWindow("Button", " ", WS_CHILD | /*WS_DLGFRAME |*/ WS_VISIBLE, 5, a, 40, 40, ghWnd_Main, NULL, hInstance, NULL);
Board[2][i] = CreateWindow("Button", " ", WS_CHILD | /*WS_DLGFRAME |*/ WS_VISIBLE, 45, a, 40, 40, ghWnd_Main, NULL, hInstance, NULL);
Board[3][i] = CreateWindow("Button", " ", WS_CHILD | /*WS_DLGFRAME |*/ WS_VISIBLE, 85, a, 40, 40, ghWnd_Main, NULL, hInstance, NULL);
// Board[4][i] = CreateWindow("Button", " ", WS_CHILD | /*WS_DLGFRAME |*/ WS_VISIBLE, 125, a, 40, 40, ghWnd_Main, NULL, hInstance, NULL);
// Board[5][i] = CreateWindow("Button", " ", WS_CHILD | /*WS_DLGFRAME |*/ WS_VISIBLE, 165, a, 40, 40, ghWnd_Main, NULL, hInstance, NULL);
a=a+40;
}
}
does anyone know a reason? basically it seems too many controls makes my pictures dissapear!
-
Oct 2nd, 2001, 07:52 AM
#2
pictures??
which pictures?
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
-
Oct 2nd, 2001, 05:23 PM
#3
Thread Starter
Frenzied Member
The one I have on my window sorry would you like to see my whole code?
-
Oct 3rd, 2001, 07:32 AM
#4
Yeah, might be useful. Basically Win32 should be able to handle up to 2³² - 2 windows (handles are 32-bit unsigned integers, and 0 and (UINT)-1 are invalid (NULL and INVALID_HANDLE_VALUE)). It also shouldn't have anything to do with pictures...
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
-
Oct 3rd, 2001, 02:07 PM
#5
Thread Starter
Frenzied Member
thats what I thought...but I tried using a different HINSTANCE variable and it worked....thanks for your help though
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|