- Yasaklandı
- #1
Uzman Üye
Forumda Çok Soruluyodu Bende Anlatıyım Dedim
Bu GroupBox'ı DrawRect Fonksiyonuyla Çizdircez
Öncelikle Şu Kodları Ekleyelim
Kod:
void Menu::NewText(int x, int y, LPSTR text, DWORD color, DWORD ST)
{
RECT rect, rect2;
SetRect(&rect, x, y, x, y);
SetRect(&rect2, x - 0.1, y + 0.2, x - 0.1, y + 0.);
pNFont->DrawTextA(NULL, text, -1, &rect2, ST, 0x00000000);
pNFont->DrawTextA(NULL, text, -1, &rect, ST, color);
}
En üstede şu gelcek
Eğere Sizin Source'nizde Bu Ekliyse Eklemeyin.
Kod:
LPD3DXFONT Directx_Font;
Kod:
void DrawRect(int x,int y,int h,int w,DWORD Color,LPDIRECT3DDEVICE9 pDevice){
D3DRECT rec;
rec.x1 = x;
rec.x2 = x + w;
rec.y1 = y;
rec.y2 = y + h;
pDevice->Clear(1,&rec,D3DCLEAR_TARGET,Color,0,0);
}
Daha Sonra Renklerimizi Ekleyelim
Kod:
#define Red D3DCOLOR_ARGB(255, 255, 000, 000)
#define Green D3DCOLOR_ARGB(255, 127, 255, 000)
#define Orange D3DCOLOR_ARGB(255, 255, 140, 000)
#define Blue D3DCOLOR_ARGB(255, 000, 000, 255)
#define Yellow D3DCOLOR_ARGB(255, 255, 255, 51)
#define Black D3DCOLOR_ARGB(255, 000, 000, 000)
#define Grey D3DCOLOR_ARGB(255, 112, 112, 112)
#define Gold D3DCOLOR_ARGB(255, 255, 215, 000)
#define Pink D3DCOLOR_ARGB(255, 255, 192, 203)
#define Purple D3DCOLOR_ARGB(255, 100, 000, 150)
#define White D3DCOLOR_ARGB(255, 255, 255, 249)
#define Cyan D3DCOLOR_ARGB(255, 000, 255, 255)
#define Magenta D3DCOLOR_ARGB(255, 255, 000, 255)
#define TBlack D3DCOLOR_ARGB(128, 000, 000, 000)
#define s2 D3DCOLOR_ARGB(255, 87, 89, 88)
#define s3 D3DCOLOR_ARGB(255, 41, 46, 49)
#define s4 D3DCOLOR_ARGB(255, 48, 48, 48)
#define s5 D3DCOLOR_ARGB(255, 26, 26, 26)
#define Green D3DCOLOR_ARGB(255, 000, 255, 000)
#define Red D3DCOLOR_ARGB(255, 255, 000, 000)
#define Blue D3DCOLOR_ARGB(255, 000, 000, 255)
#define Orange D3DCOLOR_ARGB(255, 255, 165, 000)
#define Yellow D3DCOLOR_ARGB(255, 255, 255, 000)
#define Pink D3DCOLOR_ARGB(255, 255, 192, 203)
#define Cyan D3DCOLOR_ARGB(255, 000, 255, 255)
#define Purple D3DCOLOR_ARGB(255, 160, 032, 240)
#define Black D3DCOLOR_ARGB(255, 000, 000, 000)
#define White D3DCOLOR_ARGB(255, 255, 255, 255)
#define Grey D3DCOLOR_ARGB(255, 112, 112, 112)
#define SteelBlue D3DCOLOR_ARGB(255, 033, 104, 140)
#define LightSteelBlue D3DCOLOR_ARGB(255, 201, 255, 255)
#define LightBlue D3DCOLOR_ARGB(255, 026, 140, 306)
#define Salmon D3DCOLOR_ARGB(255, 196, 112, 112)
#define Brown D3DCOLOR_ARGB(255, 168, 099, 020)
#define Teal D3DCOLOR_ARGB(255, 038, 140, 140)
#define Lime D3DCOLOR_ARGB(255, 050, 205, 050)
#define ElectricLime D3DCOLOR_ARGB(255, 204, 255, 000)
#define Gold D3DCOLOR_ARGB(255, 255, 215, 000)
#define OrangeRed D3DCOLOR_ARGB(255, 255, 069, 000)
#define GreenYellow D3DCOLOR_ARGB(255, 173, 255, 047)
#define AquaMarine D3DCOLOR_ARGB(255, 127, 255, 212)
#define SkyBlue D3DCOLOR_ARGB(255, 000, 191, 255)
#define SlateBlue D3DCOLOR_ARGB(255, 132, 112, 255)
#define Crimson D3DCOLOR_ARGB(255, 220, 020, 060)
#define DarkOliveGreen D3DCOLOR_ARGB(255, 188, 238, 104)
#define PaleGreen D3DCOLOR_ARGB(255, 154, 255, 154)
#define DarkGoldenRod D3DCOLOR_ARGB(255, 255, 185, 015)
#define FireBrick D3DCOLOR_ARGB(255, 255, 048, 048)
#define DarkBlue D3DCOLOR_ARGB(255, 000, 000, 204)
#define DarkerBlue D3DCOLOR_ARGB(255, 000, 000, 153)
#define DarkYellow D3DCOLOR_ARGB(255, 255, 204, 000)
#define LightYellow D3DCOLOR_ARGB(255, 255, 255, 153)
#define DarkOutline D3DCOLOR_ARGB(255, 37, 48, 52)
#define TGreen D3DCOLOR_ARGB(180, 000, 255, 000)
#define TRed D3DCOLOR_ARGB(180, 255, 000, 000)
#define TBlue D3DCOLOR_ARGB(180, 000, 000, 255)
#define TOrange D3DCOLOR_ARGB(180, 255, 165, 000)
#define TYellow D3DCOLOR_ARGB(180, 255, 255, 000)
#define TPink D3DCOLOR_ARGB(180, 255, 192, 203)
#define TCyan D3DCOLOR_ARGB(180, 000, 255, 255)
#define TPurple D3DCOLOR_ARGB(180, 160, 032, 240)
#define TBlack D3DCOLOR_ARGB(180, 000, 000, 000)
#define TWhite D3DCOLOR_ARGB(180, 255, 255, 255)
#define TGrey D3DCOLOR_ARGB(180, 112, 112, 112)
#define TSteelBlue D3DCOLOR_ARGB(180, 033, 104, 140)
#define TLightSteelBlue D3DCOLOR_ARGB(180, 201, 255, 255)
#define TLightBlue D3DCOLOR_ARGB(180, 026, 140, 306)
#define TSalmon D3DCOLOR_ARGB(180, 196, 112, 112)
#define TBrown D3DCOLOR_ARGB(180, 168, 099, 020)
#define TTeal D3DCOLOR_ARGB(180, 038, 140, 140)
#define TLime D3DCOLOR_ARGB(180, 050, 205, 050)
#define TElectricLime D3DCOLOR_ARGB(180, 204, 255, 000)
#define TGold D3DCOLOR_ARGB(180, 255, 215, 000)
#define TOrangeRed D3DCOLOR_ARGB(180, 255, 069, 000)
#define TGreenYellow D3DCOLOR_ARGB(180, 173, 255, 047)
#define TAquaMarine D3DCOLOR_ARGB(180, 127, 255, 212)
#define TSkyBlue D3DCOLOR_ARGB(180, 000, 191, 255)
#define TSlateBlue D3DCOLOR_ARGB(180, 132, 112, 255)
#define TCrimson D3DCOLOR_ARGB(180, 220, 020, 060)
#define TDarkOliveGreen D3DCOLOR_ARGB(180, 188, 238, 104)
#define TPaleGreen D3DCOLOR_ARGB(180, 154, 255, 154)
#define TDarkGoldenRod D3DCOLOR_ARGB(180, 255, 185, 015)
#define TFireBrick D3DCOLOR_ARGB(180, 255, 048, 048)
#define TDarkBlue D3DCOLOR_ARGB(180, 000, 000, 204)
#define TDarkerBlue D3DCOLOR_ARGB(180, 000, 000, 153)
#define TDarkYellow D3DCOLOR_ARGB(180, 255, 204, 000)
#define TLightYellow D3DCOLOR_ARGB(180, 255, 255, 153)
#define TDarkOutline D3DCOLOR_ARGB(180, 37, 48, 52)
Çizdirmek İçin Kullanacağımız Kodlar Şunlardır
Kod:
NewText(195,99, "Deneme GroupBox", D3DCOLOR_ARGB(255,0,0,0), LText);
DrawRect(160,105,1,30,Black,pD3D9);
DrawRect(320,105,1,30,Black,pD3D9);
DrawRect(350,105,90,1,Black,pD3D9);
DrawRect(160,105,90,1,Black,pD3D9);
DrawRect(160,194,1,191,Black,pD3D9);