|
Dear friends how can i get the current path of my dll \
at run time. i have used GetModuleFileName which is returning the full path with the dll name. is there any way to find out only the path of the application.
|
|
|
|
|
well, look for the last occurrence of '\' and trim to the right.
char *pslash=strrchr(full_path,'\\');
pslash[1]=0;
|
|
|
|
|
Hi,
I want to write a project like some media players that can broadcast
media stream such as *avi ,*mpg,*dat,*.mp3 to the local LAN.But few men
discuss or write such a programme.Who can help me if you have some suggestions
or some codes in this subject.Thanks!
Oh,add more message about it,It work like this:When I select a song form the server,I set a broadcast IP address,and the client soft can search the channal and received the stream that I want(IP) form the server soft.
Can use the DX6 Media SDK or higher version?another suggections?Thanks a lot!
|
|
|
|
|
I am writing a similar app w/ direct sound as the player. I'm not really sure what or how I am going to stream it but I will let you know what I can come up with. Any ideas you have would be a major help.
-Matt Newman
|
|
|
|
|
Thank you for your help!If I have the ability to help you and provide a major
help to you,I will be grad to.But I am weak in Internet Programme.That is beacuse I am just want to mast it.So if you have some programme direction or any suggestion in the internet programme area,just told me.thanks!
And this question ,I eager you can give me advice on how to write such a difficult thing. Thanks very much!
|
|
|
|
|
I really am not that far on it. I am trying to find a good mp3 player to base it on, I think I have a good lan setup that will need some tweaking and as far as streaming I haven't really found a good solution.
-Matt Newman
|
|
|
|
|
I found some ActiveX about Windows Media player,it is for multicast and
broadcast ocx in the Visual C++.But I don't know how to do.And use the DX6 or higher version can also solute some problems.But I don't know how to use them.
Maybe MSDN can provide some help,I think.
|
|
|
|
|
Can anyone tell me how to make these colorful windows like winamp player or MSN explorer
|
|
|
|
|
skin technology.samples are too many!like freeamp!
|
|
|
|
|
I'm trying to change the font in the OnDraw function in a view:
if (m_fontLarge == NULL)
m_fontLarge->CreatePointFont (10 * (m_nLeftWidth-2), "Tahoma", pDC);
CFont *old_font = pDC->SelectObject (m_fontLarge);
and win2k just tells me that it won't allow this to happen and shuts down the application... and the same thing happens when I try setting a new brush...
Any ideas of why?
Andreas Philipson
|
|
|
|
|
You need to use "new" to allocate the font object before calling CreatePointFont. Ie...
if (m_fontLarge == NULL)
{
m_fontLarge = new CFont;
bla.bla.bla.
}
|
|
|
|
|
That's because you're only executing your font code if m_fontLarge is NULL, and the first thing you do is dereference the NULL pointer with m_fontLarge->CreatePointFont(), which is where your exception comes from. m_fontLarge is NULL, so any pointer dereference on it will likely crash.
if m_fontLarge is a CFont* then you need to allocate storage for it with new, if it's just a CFont, then it should never be NULL.
|
|
|
|
|
I'm looking for free TFTP server code I could incorporate into an MFC application?
Thanks.
|
|
|
|
|
Hi I want to create a simple windows that displays a message. The message would be passed to it from another application. How is this done. Any guidance would be appreciated. Is this a situation I would use Remote procedure calls. Any help would be most appreciated.
Regards,
A Novice
|
|
|
|
|
Look at WM_COPYDATA in MSDN!
Mh2!
|
|
|
|
|
works great except that the data is passed as a pointer to the structure COPYDATASTRUCT and is cast as LPARAM. One the application recieves this message how I read/reference the pointer to the structure since it is received as the lparam message parameter.
I was thinking something like, but this does not work
COPYDATASTRUCT x;
&x = (COPYDATASTRUCT) lparam;
Any help would be appreciated
Regards,
|
|
|
|
|
Try this;
COPYDATASTRUCT * p;<br />
p = (COPYDATASTRUCT*) lParam;
-Ben
---------
On the topic of code with no error handling -- It's not poor coding, it's "optimistic"
|
|
|
|
|
I've been trying to do this for quite some time but to no avail. I have a buffer of 8bit integers representing a bitmap image. Since this is an MFC dialog box, I created a picture box, set the style to bitmap, gave it a control variable (m_picture) and the proceeded to do this.
HBITMAP bmap = CreateBitmap(640,480,1,8,copybuffer); //copy buffer is where the image is stored
m_picture.SetBitmap(bmap);
Both of these functions return non-zero/non-null values so I can't image why it is not displaying correctly. If there is another way to display the bitmaps, I'd really appreciate anyone here pointing me in the right direction. Please help me as I've been struggling with this for a long time and I thank everyone ahead of time for the help.
Quadmire
|
|
|
|
|
Hi,
from the programmers' perspective how is a picture newsgroup different from a text based ng? does the same verb commands like ARTICLE,POST etc apply here too?
and to download pics/stuff, is it the same as text based or is there any other protocol for it?
finally point me to a free access picture newsgroup.
TIA.
I'm an alien, I'm an alien
it's a beautiful life....
Bush
|
|
|
|
|
You receive text and binary newsposts in the exactly same way.
All binary stuff, like pictures or files, is encoded with either UUENCODE or Base64, and is really only text. You just get a large textmessage, which you then have to decode, to get the picture or file.
- Anders
Money talks, but all mine ever says is "Goodbye!"
|
|
|
|
|
Thanks a lot.
I'm trying to write an app that downloads selected text/banaries from picture newsgroups. So if you have any tricks/tips, gotchas, pl. share them with me.
Incidentally, I noticed your cool MIME decoder class. any more goodies on the topic?
I'm an alien, I'm an alien
it's a beautiful life....
Bush
|
|
|
|
|
Well, you have a tough job in front of you
If the messages is UUENCODED you need to write a decoder. The problem is that there is not a RFC for UUENCODE. The only documentation I have been able to find, is some Free BSD herder files, and some MAN-Pages under Linux.
If the messages is MIME encoded, you should takle a look at RFC2045 - Multipurpose Internet Mail Extensions (MIME) Part One and maybe also RFC2046 - 2048. They define the standard for MIME messages (which are Base64 or Quoted Printable encoded).
- Anders
Money talks, but all mine ever says is "Goodbye!"
|
|
|
|
|
There are unix based news readers with source. I used one back in college called xrn.
|
|
|
|
|
Is there an easy way to display text ontop of a dialog bar? I have noticed that to simply display the percent complete, the projects shown here on code project do a whole bunch, including adding a seperate class to avoid flickering. It really shouldn't be this hard IMHO...
- John
|
|
|
|
|
I wanted to write a contact manager system but amhaing problems linkint it all up, at the moment I have two main classes -
CPerson - info about a contact
CDatabaseConn - Database functionality
When the user clicks on a button (from within the view) I wanted to know what the best way of getting in all of the contact info into a list in the iew. There are many ways I can see:
1. Overload << in the CPerson class to make the database connection and generate a linked list and pass this back from the view.
2. Instantiate a database connection and then some person objects and get them one by one.
And many other ways I can think of now. I dont know what to have an instance of where.
I hope people can help as Im sure people have these same kind of problems when learning. Also, is there a kind of ystem/approach or tool we can use when doing this...
thanks
|
|
|
|