|
Hi there,
How can i play MP3 in my programs ?
My month article: Game programming by DirectX by Lan Mader.
Please visit in: www.geocities.com/hadi_rezaie/index.html
Hadi Rezaie
|
|
|
|
|
Here is a very easy way to play mp3's
http://www.codeproject.com/audio/mp3player.asp
Rob
|
|
|
|
|
I want to use CProgressCtrl to show the progress when I search data from SQL server. Who can tell me how to get the progress? Thanks a lot!
David
|
|
|
|
|
Sorry, but you can't. Not even the SQL Server program knows how long a query will take. So it cannot report progress.
The only way to do this is to retrieve all the records and apply the criteria in your program. Then you can keep track of how many have been processed.
Good Luck,
Bill
|
|
|
|
|
I am trying to get a dynamically created scrollbar to have a thumb which is proportional to how much area is currently displayed.
You can see this kind of style on the IE explorer vertical scroll bar when you need to scroll a page, the thumb shows how much of the total page you have displayed. For my scroll bar, its the default block size, and I can't seem to change it to what I want. I have been through most of the MSDN on the subject. Is there some command or style I have missed that will do this for me?
Roger Allen
Sonork 100.10016
If I had a quote, it would be a very good one.
|
|
|
|
|
Have a look at the MSDN documentation for the MFC CWnd member function CWnd::SetScrollInfo () (or the plain SDK function SetScrollInfo () which it invokes).
<br />
SCROLLINFO scroll_info;<br />
scroll_info.cbSize = sizeof (scroll_info);<br />
scroll_info.fMask = SIF_PAGE | SIF_POS | SIF_RANGE;<br />
scroll_info.nMin = min;<br />
scroll_info.nMax = min;<br />
scroll_info.nPos = position;<br />
scroll_info.nPage = size_of_window;<br />
SetScrollInfo (SB_VERT, &scroll_info);<br />
Stephen C. Steel
Kerr Vayne Systems Ltd.
|
|
|
|
|
How do i put a description comment into the [soap_method] attribute so that it is displayed in the Web Service htm file?
|
|
|
|
|
Hi,
How do I define a member variable for a dialog item that uses my CStatic derived class?
"Add Variable" only has CStatic (the base) and it's greyed out?!?!
Jon
Signature space for rent. Apply Within.
|
|
|
|
|
maybe it wont let you set a variable to it because it has the default id of IDC_STATIC.. try changing it to something unique like IDC_MYSTATIC and then setting a variable to it..
im probably completely misunderstanding your question, but i know when i have a static text item in a dialog i just use: CStatic* pStatic = (CStatic*)GetDlgItem(IDC_MYSTATIC); and then do whatever i need to to it..
sorry if im off base, im a pretty new VC++ coder myself.
-dz
|
|
|
|
|
Hi folks, I'm hoping that someone out ther can help this confused MFC newbie
I'm updating some old MFC code which implements a web browser inside an application (using a class derived from CHTMLView). The html pages I want to load into this browser need to know whether they are running inside the application or in a normal browser (so I can display different content).
I was wondering if it would be possible to set a property of some kind (when the CHTMLView is created) which I can pick up in the html using JavaScript (in the same way as the browser name / version etc), so that it can determine what to display.
Anyone know if it's possible, and if so, how I do it (a web search has revealed very little info on the subject).
Thanks,
Iain
|
|
|
|
|
Yes, and maybe no
When you have loaded a document you may interact with it using the IHTMLDocument2 interface. This way you can add your own kind of properties, say for instance a JavaScript snippet. Trouble is, in your case if I understood you correctly, this will only work once the document is fully loaded, and at that time the original HTML is already displayed, which is probably not what you want. AFAIK, there is no way to control the HTML stream from a web server to the WebBrowser control, unless you make your application act as a HTML proxy server, modifying data as it comes along.
Another solution would be to set up a socket connection to a web server yourself, modify the file, and store it on disk. Load that file into your CHTMLView.
|
|
|
|
|
Thanks, I think I have this sorted now. I'm getting OnDocumentComplete to write out a cookie, which the html looks for via a bit of Javascript, (and alters it's content accordingly). Seems to work great
Cheers,
Iain
|
|
|
|
|
Hi all,
Is there a way to retrieve the bounding rectangle of a popup menu?
Thanks!
|
|
|
|
|
You could do this in the menu's parent window by handling the WM_MEASUREITEM message and calling the base class version from there. Take a look at the base class's return value and you will be able to work out how big the menu was when it was displayed.
Not sure how to get it before its displayed.
Roger Allen
Sonork 100.10016
If I had a quote, it would be a very good one.
|
|
|
|
|
whenever the selection in the list changes this function gets called:
void CSelectReport::OnLvnItemchangedComplist(NMHDR *pNMHDR, LRESULT *pResult)
{
LPNMLISTVIEW pNMLV = reinterpret_cast<lpnmlistview>(pNMHDR);
TRACE("selection = %i\n",m_lstCompanies.GetSelectionMark());
*pResult = 0;
}
however it always returns the item which was just unselected, not what was just clicked on.. its like its always lagged one step behind, which makes it imposible for me to update enabling/disabling of items based on the selection.. can someone please help me understand a way to correct this eroneous microsoft control/event handler?
message map:
ON_NOTIFY(LVN_ITEMCHANGED, IDC_COMPLIST, OnLvnItemchangedComplist)
plz tell me someone else is familiar with this problem! thanks!
-dz
|
|
|
|
|
"help me understand a way to correct this eroneous microsoft control/event handler"
I can try to help you understand, but there is no "correction". This is not erroneous behavior. It is the way its supposed to work (read MSDN). From your description you are using the wrong event. You might want to try LVN_ITEMACTIVATE.
Good Luck,
Bill
|
|
|
|
|
How can I print an image (bitmap) from a file by using gdi+ and visual C++
thank you for help
khaldoun
|
|
|
|
|
Hi,
It's possible to draw text using Himetric ?, Or should I make the conversion LPtoDP to draw the text ? ( I have problems with the DP, because it changes from a printer to the screen, and...).
Thanks, Greetings
Braulio
|
|
|
|
|
You should be able to DrawText in HIMETRIC, but you will need to take into account the different DPI of different devices.
Dave.
|
|
|
|
|
Is there anyone here who's used the monthview control in a dialog based application who can help me out with the problems I'm having (Using "Microsoft MonthView Control 6.0 (SP4)" using MFC and Visual C++ 6)
I'm not sure if either I'm doing something very wrong, or just this control is full of bugs.
Here are my problems:
1) If I display all 12 months, the days in the last month don't get displayed bold (they get set and unset correctly, and if I change the view to display that month anywhere bar the last displayed month it works fine) - My workaround to this is to just display 9 months and make the user flip back and forth to see the whole year (I predict complaints..)
2) The control grabs focus, meaning if I click on a date, then click on a button on the dialog, it just selects that button rather than clicking on it (1 click to deselect the monthview control, and a 2nd to actually click on the button I clicked on)
3) If I call my function that makes the days bold (using SetDayBold) from my OnInitDialog, the days don't get set bold. If I call it from a mouse click event then it works fine.
I've searched MSDN and found a VB workaround to problem 2, but it wasn't much help to me using C++
Any help will be much appreciated
--
Help me! I'm turning into a grapefruit!
|
|
|
|
|
hello people,please read carefully.
I have a situation with someclasses : X,M,S,E and some structures : A,B,C like this.
class X is autonomous.(i dont know the correct word)
class E has variables of type class X,structures A,B and C.
class X has an pointer of type E(later becomes an array and still later destroyed)
class M:public X
class S:public X
M has a pointer of type S.(later becomes an array and still later destroyed)
now,
all these mean class M has class E(and hence part of itself and S-so twice itself ) due to inheritence.I have to store class in list.
two questions.
1.is CList safe?
2.where can I possibly leak memory.
-20365 joe
|
|
|
|
|
Uff... you're giving little information to know whether you will encounter memory leaks or not. A distinction has to be made between having (the "had" object is a member variable of the "haver") and owning (the "owner" has a pointer to the "owned"). In the second case, you have to consider what will hapen when objects are copied:
M m1;
...
M m2=m1; Are you duplicating the owned objects of m1 ? If not, then you will probably run into memory problems, as both m1 and m2 think they own the same objects of type S . You got to think out very carefully these issues, as CList implicitly will make copies of objects contained.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Hi,
can I test list-Box Styles (e.g. LBS_OWNERDRAWVARIABLE) and make sure it is set? Thats better then trusting in a user who sets properties in a dialog resource. Where do I handle this?
|
|
|
|
|
I tried CListBox::OnCreate, it is never called. I'm stuck.
|
|
|
|
|
Try PreCreateWindow
Joel Lucsy (jjlucsy@ameritech.net)
|
|
|
|