|
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
|
|
|
|
|
Always I instantite de database clase in the CwinApp class, because this class is easy to access from all others classes.
And I prefer to put in that class all my publics variables, like connection status, user, etc.
Carlos Antollini.
|
|
|
|
|
I have a textbox on the toolbar. Everytime i start the program or go back to the main window, it will be highlight(because there is "ENTER COMMAND HERE" and highlight all these text so that we don't have to delete these string and enter the command). However, sometimes the user can type something, but then do something else, then the textbox will lose focus. If I want to type the command again, i have to use a mouse to highlight the text inside......not very convenient.
Does anyone know how to make it "ALWAYS" highlighted or when the mouse click that textbox, it highlights everything itself. I've tried using message "LBUTTONDOWN" in the view and frame class. It works when i click in the output area, but when i click the tool bar or menu, no highlight.
thanks!!!!
|
|
|
|
|
Does anyone know how to make it "ALWAYS" highlighted or when the mouse click that textbox, it highlights everything itself.
To keep the text highlighted when the control does not have the focus, set the ES_NOHIDESEL style.
When the edit box gets the focus, it sends EN_FOCUS to its parent. You can handle this notification and call SetSel() to select all the text in the control.
--Mike--
http://home.inreach.com/mdunn/
"You named the Borg... Hugh?"
-- Guinan
|
|
|
|
|
Hi,
I have a problem using private temporary tables, from VC.
The Private table is supose to remain throughout the session.
I can create one fine, but i can't access it! If I was to convert my code to use a global temporary table, it works fine.
Anyone offer any advice:
SQLHSTMT hStmt;
SQLAllocHandle(SQL_HANDLE_STMT, m_hDbc, &hStmt);
// Prepare the SQL statement
SQLCHAR szS[] = "create table #test(val integer)";
SQLPrepare(hStmt,szS,strlen((char*)szS));
nResult = SQLExecute(hStmt); <- Work Fine
SQLFreeHandle(SQL_HANDLE_STMT,hStmt);
SQLAllocHandle(SQL_HANDLE_STMT, m_hDbc, &hStmt);
//Ensure That The User Has Not Already Assigned A ReadCode To This Phrase.
SQLCHAR szCheckPresenceSQL[] = "SELECT * FROM #test ";
SQLPrepare(hStmt,szCheckPresenceSQL,strlen((char*)szCheckPresenceSQL));
nResult = SQLExecute(hStmt); //FAILS GET -1
Cheers
Richard
|
|
|
|
|
Your problem is no in VC. Is in SQL Server.
The Temporary tables only exist for the transaction, when you use a temporary table with # this table is droped for the system when you finish the transaction.
In your Application you are usin two transactions, The create if the table and the select from that table.
Is better to use a Stored Procedure, where the table exists only during the execution of the Store, and put de create and select in the store or
you need tu create a global temporary table with ##, this type of table are droped for the system when the user is disconnected.
Do you Understand?
Good Luck
Carlos Antollini.
|
|
|
|