Click here to Skip to main content
15,922,015 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: How to Play any Audio File & Set System Volume? [modified] Pin
Hamid_RT22-May-06 4:13
Hamid_RT22-May-06 4:13 
Questionsome queries i not sure of. (urgent) Pin
chubbie21-May-06 6:43
chubbie21-May-06 6:43 
AnswerRe: some queries i not sure of. (urgent) Pin
PJ Arends21-May-06 7:47
professionalPJ Arends21-May-06 7:47 
QuestionHow can I Create my image? Pin
akram mirzaei21-May-06 5:56
akram mirzaei21-May-06 5:56 
QuestionRe: How can I Create my image? Pin
Hamid_RT21-May-06 6:15
Hamid_RT21-May-06 6:15 
AnswerRe: How can I Create my image? Pin
akram mirzaei21-May-06 8:30
akram mirzaei21-May-06 8:30 
GeneralRe: How can I Create my image? Pin
Hamid_RT21-May-06 18:32
Hamid_RT21-May-06 18:32 
QuestionD3D I want to draw a red line Pin
akira3221-May-06 5:42
akira3221-May-06 5:42 
I want to draw a red line,but it does not show.Why?
As below is a part of source code.
I must use D3DFVF_XYZRHW,becuase I use in 2D.

typedef struct {
FLOAT x, y, z; // 2-D coordinates
FLOAT rhw; // rhw
DWORD color; // The vertex color
} sVertexSelect;
#define VERTEXFVF_SELECT (D3DFVF_XYZRHW|D3DFVF_DIFFUSE)

IDirect3DVertexBuffer9 *m_pVB_SelectRect;

void CAppDraw::DrawSelectLine()
{
BYTE *Ptr;

COLORREF crRed=RGB(255,0,0);

sVertexSelect Verts_Select[2]=
{
{1.0f,1.0f,1.0f,1.0f,crRed},
{1.0f,100.0f,1.0f,1.0f,crRed},
};

m_pVB_SelectRect->Lock(0,0, (void**)&Ptr, 0);
memcpy(Ptr, Verts_Select, sizeof(Verts_Select));
m_pVB_SelectRect->Unlock();

m_pD3DDevice->SetTexture(0, NULL);
m_pD3DDevice->SetStreamSource( 0, m_pVB_SelectRect,0, sizeof(sVertexSelect) );
m_pD3DDevice->SetFVF( VERTEXFVF_SELECT );
m_pD3DDevice->DrawPrimitive( D3DPT_LINELIST, 0, 1 );
}

BOOL CAppDraw::DoFrame()
{
// Clear device backbuffer
m_pD3DDevice->Clear(0, NULL, D3DCLEAR_TARGET, D3DCOLOR_RGBA(0,64,128,255), 1.0f, 0);

// Begin scene
if(SUCCEEDED(m_pD3DDevice->BeginScene()))
{
DrawSelectLine();

// End the scene
m_pD3DDevice->EndScene();
}

// Display the scene
m_pD3DDevice->Present(NULL, NULL, NULL, NULL);

return TRUE;
}

QuestionBitBlt or GardientFill which is faster Pin
Sarath C21-May-06 5:24
Sarath C21-May-06 5:24 
AnswerRe: BitBlt or GardientFill which is faster Pin
PJ Arends21-May-06 7:24
professionalPJ Arends21-May-06 7:24 
GeneralRe: BitBlt or GardientFill which is faster Pin
Sarath C21-May-06 19:02
Sarath C21-May-06 19:02 
QuestionScan Directory Pin
Arman S.21-May-06 1:32
Arman S.21-May-06 1:32 
AnswerRe: Scan Directory Pin
toxcct21-May-06 3:24
toxcct21-May-06 3:24 
AnswerRe: Scan Directory Pin
Roland Pibinger21-May-06 11:07
Roland Pibinger21-May-06 11:07 
AnswerRe: Scan Directory Pin
normanS21-May-06 19:35
normanS21-May-06 19:35 
QuestionHelp File vc++ Pin
sudeep_br20-May-06 23:55
sudeep_br20-May-06 23:55 
AnswerRe: Help File vc++ Pin
shilianghui221-May-06 4:57
shilianghui221-May-06 4:57 
AnswerRe: Help File vc++ Pin
Laxman Auti21-May-06 18:58
Laxman Auti21-May-06 18:58 
Questionhelp Pin
subikchya20-May-06 23:09
subikchya20-May-06 23:09 
AnswerRe: help Pin
Hamid_RT21-May-06 0:30
Hamid_RT21-May-06 0:30 
QuestionMFC: Easy way to download XML & HTML files to disk? Pin
chasetoys20-May-06 21:47
chasetoys20-May-06 21:47 
AnswerRe: MFC: Easy way to download XML & HTML files to disk? Pin
Hamid_RT20-May-06 22:03
Hamid_RT20-May-06 22:03 
AnswerRe: MFC: Easy way to download XML & HTML files to disk? Pin
shilianghui221-May-06 4:50
shilianghui221-May-06 4:50 
GeneralRe: MFC: Easy way to download XML & HTML files to disk? Pin
chasetoys21-May-06 5:06
chasetoys21-May-06 5:06 
Questionneed help wit daata type conversion >.< Pin
neodeaths20-May-06 20:37
neodeaths20-May-06 20:37 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.