|
Thank you once again for replying
I had refered a sample "EY player" from code project and I developed my own application using MCI ... and also i am new to MCI.... Actual problem I am getting is that I am not able to play MPEG 2 files alone(with extension m2p and mp2)... It is working fine with mpeg 1, vob, avi and dat files.... hmmmm ok as you had said I will see some more samples from code project and if I have anymore doubt i will contact you...
Thank you
With Regards
Raja Bose
|
|
|
|
|
I hope you find your answer early
|
|
|
|
|
Sir,
I want to get to know about th followinf cod
|
|
|
|
|
I cant understand what you said?
|
|
|
|
|
amaneet wrote: I want to get to know about th followinf cod
1) speak proper english so that everybody can understand you
2) post the code (into <pre></pre> html tags)
3) ask a specific question
|
|
|
|
|
Hi.
I need to add number of jpg images in the list box control added on the Dialog box.
How I can do this?
Thanks
-- modified at 4:14 Saturday 11th November, 2006
Rakesh Thakur
|
|
|
|
|
I think if you using of CListCtrl is better than CListBox
|
|
|
|
|
Hi.
Yes I tried using CListCtrl but it is not showing an image in the List Control.
Here is the sequence how I proceed.
1. Add List Control on the Dialog box.
2. CMyDlg:: OnInitDialog()
{
Get List Control pointer in pListCtrl by using GetDlgItem(ID_OF_LIST_CTRL)
if( NULL == pListCtrl->GetSafeHwnd() )
return;
CImageList *pImgList = new CImageList;
pImgList->Create(IDB_IMAGE1,50,0,RGB(255,0,255));
pListCtrl->SetImageList(pImgList,LVSIL_NORMAL);
LVITEM lItem;
lItem.mask = LVIF_IMAGE;
lItem.iItem = 0;
lItem.pszText = "HI";
lItem.iImage = 0;
pListCtrl->InsertItem(&lItem);
}
Still I could not see an Image in the List control.
Am I missing something here?
Help Please.
Thanks
Rakesh Thakur
|
|
|
|
|
I don't see anything having to do with jpg images in your code
|
|
|
|
|
I think you forgot this line m_pImageList->Add(Bmp,RGB(100,105,0));
CBitmap *Bmp;
m_pImageList->Add(Bmp,RGB(100,105,0));
m_List1.SetImageList(m_pImageList, LVSIL_NORMAL);
|
|
|
|
|
Sir,
int a = 1;
for(int i = 0; i <=10 ; i++)
a = a + a++;
There is no problem in understanding the above written loop
I have some problem in the following code.Please explain it.
for(int i = 0 ; i <= 10 ; i++)
a = a + ++a;
Please explain the working .I mean how it works.
Thanks
|
|
|
|
|
lets take it step by step, let a=1 initially:
1. i=0
2. a=a+ ++a;
Because the ++ is a prefix, the increment is done before evaluating the expression
here: a = 1 + ++a
=1 + (a=a+1);
=1+ (a=1+1);
=1+ (1+1);
=3
etc.
hope this helps.
And ever has it been that love knows not its own depth until the hour of separation
|
|
|
|
|
Mohammad A Gdeisat wrote: lets take it step by step, let a=1 initially:
1. i=0
2. a=a+ ++a;
Because the ++ is a prefix, the increment is done before evaluating the expression
here: a = 1 + ++a
=1 + (a=a+1);
=1+ (a=1+1);
=1+ (1+1);
=3
That is not correct, since the prefix operator
changes the value of a before the expression being evaluated,
hence (with a=1 initially) you will have
a = 2 + 2;
=4
at first iteration. I tested it.
|
|
|
|
|
|
postfix incrementation (i++) :
increments the variable, but returns the value of the variable, before the incrementation.
prefix incrementation (++i) :
increments the variable and returns the new value.
void f() {
int i = 0;
int j = i++;
ASSERT(j == 0);
}
void g() {
int i = 0;
int j = ++i;
ASSERT(j == 1);
}
|
|
|
|
|
After function receive() is called, FD_READ will be fired again, thing will start over, it never reach the next line (a=a+1 and b=b+1)
Is there any way to pause winsock from sending message for a while until I finish my job?
LRESULT CClient::OnWinsock(WPARAM wParam, LPARAM lParam)
{
switch(lParam)
{
case FD_READ:
{
switch (streamToken)
{
case ST_HEADER:
recv(sc, (char*)&bi, sizeof(BITMAPINFO), 0);
a = a+1;
b = b+1;
streamToken = ST_BUFSIZE;
break;
case ST_BUFSIZE:
recv(sc, (char*)&bufSize, sizeof(int), 0);
streamToken = ST_BUFFER;
break;
case ST_BUFFER:
recv(sc, (char*)cscrbuf, bufSize, 0);
DrawScreen();
streamToken = ST_BUFSIZE;
break;
}
}
break;
return 0;
}
|
|
|
|
|
How is this OnWinsock() called?
It sounds like recv() is blocking...
|
|
|
|
|
Ok so I didn't think this day would come but I need to learn C++ for a project I'm thinking about pursuing. I have on my book shelf a book titled "C++ Primer Plus 3rd Edition" written by Stephen Prata and when I bought it several years ago was told it was "THE" book for anyone wanting to learn C++. I looked on Amazon and see the book is now up to a 5th edition and my questions are: Is this really "THE" book on C++, Do I need to update to the 5th edition and Has anyone else went from C# to C++ if so What was the learning curve like?
As always I trust the opinions of those here on CP so I came here first, please don't let me down by not answering
Richard
http://www.BellaDev.net
|
|
|
|
|
Hi,
It looks like if you're a profesionnal programmer (thus already having some experience),
this book ('C++ Primer Plus') isn't quite the one you need.
I think you should pick this book:
1. 'Accelerated C++ : Practical Programming by Example'
It belongs to the 'C++ In-Depth' Series edited by Bjarne Stroustrup himself
Of course the other books of the series are of very high quality too,
but these two might well be what you're looking for.
(Except maybe 'Essential C++', which isn't really recommended)
Plus, the book doesn't take the dumb 'let's make it C-wise, then C++-wise'
approach of way too many C++ books out there.
Alternately, there's another good book, and this one's free...
2. 'Thinking in C++' - http://www.mindview.net/Books/TICPP/ThinkingInCPP2e.html
If you like to really understand C++ in long-term. The only 'issue' might be that
this book is rather a book for people migrating from C to C++, but don't fear it.
It doesn't cost too much to download it and see if it suits your needs
And you might like the fact that the authors of these books teach you things like
STL usage very early on.
Have fun learning C++, 'cause if you don't do what you like, you have to like
what you do
|
|
|
|
|
Hi
How can I get the list of domains in the network programatically so that
I can add them to the list box.
Thanks in advance
Taruni
|
|
|
|
|
does anyone know how to change bar color and make it smooth when using a manifest?
|
|
|
|
|
Assuming you mean when using XP themes (manifests have multiple uses), then no. The theme can override any styles/colors that it wants to, you don't have complete control over it like in the Windows Classic style.
|
|
|
|
|
For example, if we double click h files in windows explorer, all h files are opened by a single VC (app).
I want to do same for a kind of my files (e.g. extension is .myf).
currently, when I click a .myf file every time, the file is opened always by a new app of mine - if I click 5 of .myf files, I have 5 of my app opened - I think I need to do something special in register.
Any suggestions to solve the problem?
|
|
|
|
|
Whenever you exe starts you check if another instance is already running, if another instance is already running then simply send a message to the original exe with a filename.
Lots of articles here on instance checking.
My sins are bloody red, my coffee is a black hole.
|
|
|
|
|
HI
I'm interested of in "Multiagent Systems"
Who could send me some source code (in C/C++) concerning MAS problems
I can't find in internet.
|
|
|
|