|
well we have been using tinyXML[^] with great success, see if you can find anything usefull
C makes it easy to shoot yourself in the foot; C++ makes it harder, but when you do, it blows away your whole leg
|
|
|
|
|
Hi,
Thanks for your reply. My problem is that our application is organized in such a way that I cant use the wrappers. I have to make certain functions as my application needs in a way, or I have to change all the calls which are atleast 2000 or above. Actually we were using third party class which was using array and templetes to read and write the XML file. So the calls are sutaible to that fassion only. However I have replaced all the third party class function using DOM and wrorks fine, probleam is or UNICODE only, as the Load function is not at all loading the file.
Thanks.
|
|
|
|
|
well can the load function read from a Buffer cause most libs can read from file and Parse from a string, if it can't you could always read from file and write to a non-unicode(ascii) file and have the lib read from that, not elegant but there seems to be no other way.
C makes it easy to shoot yourself in the foot; C++ makes it harder, but when you do, it blows away your whole leg
|
|
|
|
|
Hello all,
I have to place tooltips for the buttons created in vc++ 6.0.
I used the follwing method.
1)i have an added an variable
CToolTipCtrl m_tooltip;
2)In PreTranslateMessage(
m_tooltip.RelayEvent(pMsg);
return CDialog::PreTranslateMessage(pMsg);
3)In OnInitDialog(...
m_tooltip.Create(this);
EnableToolTips(true);
m_tooltip.AddTool(GetDlgItem(IDC_BUTTON1,_T("play"));
m_tooltip.Activate(true);
but my problem is, I am not getting tooltips over the buttons.I dont know where the bug is.
Plz help me to find out the problem.
Thanks in advance
cheers
sangeet
|
|
|
|
|
did u see this[^]
C makes it easy to shoot yourself in the foot; C++ makes it harder, but when you do, it blows away your whole leg
|
|
|
|
|
I test tooltip for you and this is your answer
m_tooltip.Create(this);
SetToolTip("ADAD");
void CAnswerView::SetToolTip(LPCTSTR lpText)
{
TOOLINFO ti;
ti.cbSize = sizeof(TOOLINFO);
ti.lpszText = (LPTSTR)lpText;
ti.hinst = AfxGetInstanceHandle();
ti.hwnd = GetDlgItem(IDC_BUTTON1)->m_hWnd;
ti.uFlags = TTF_SUBCLASS | TTF_IDISHWND;
ti.uId = (UINT) GetDlgItem(IDC_BUTTON1)->m_hWnd;
m_tooltip.SendMessage(TTM_ADDTOOL, 0, (LPARAM) &ti);
}
you can change IDC_button1 to your hWnd
|
|
|
|
|
hi whitesky,
I included ur codings in my project..now am getting tool tips..really ur codings are very useful to me..
thanks a lot
cheers
sangeet
|
|
|
|
|
What is involved in converting a program so that it runs as a service.
Regards,
Alan Buchanan
Alan Buchanan
|
|
|
|
|
Try this[^]
C makes it easy to shoot yourself in the foot; C++ makes it harder, but when you do, it blows away your whole leg
|
|
|
|
|
Thansk for that. Looks like a very easy way to port across
Alan Buchanan
|
|
|
|
|
|
i have read a few tutorials here and have learnt a good bit but im looking for a tutorial on how to create a dialog box which has a button to close/hide that dialog box and show another, so say i have about 4 dialog boxs but only one is showing at a time and others that are hidden can be seen by clicking a button.
thx
|
|
|
|
|
Do search in Code project(CP). Plenty are available.
Nibu thomas
Software Developer
|
|
|
|
|
You can show or hide a window by CWnd::ShowWindow (nShow); where nShow is either SW_SHOW or SW_HIDE. You need to use modeless Dialog boxes in order to be able to pass command from one dialog to another.
William
|
|
|
|
|
Hi All,
Does anyone have any idea as what and all could be the drawbacks of MFC's.
Regards
|
|
|
|
|
Programs created with MFC expects supporting MFC dll in the target system. and when compared with Win32SDK programs , MFC weighs a little more heavier.
Expect these, MFC doesn't give you any other drawbacks. and BTW when you compare in the reverse way, i mean, when you look at the
complexity of a Win32SDK program, you'll realize how affordable the few extra KBs are. MFC has everything readymade. it just tells you wheels have been invented already.
VuNic
|
|
|
|
|
It's not 100% compliant to C++ standards. However, that is only a drawback if it negatively affects what you are doing. For the projects that I have been working on since 1993 or so, being compliant was not a requirement. Your requirements may be such that compliance is a must.
There are others, too. Folks that prefer STL will no doubt have more to say on the subject.
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|
|
|
Looks like homework
C makes it easy to shoot yourself in the foot; C++ makes it harder, but when you do, it blows away your whole leg
|
|
|
|
|
HI,
Thanks In Advance.
I am creating a Dialog Based Application for getting the current Time and displaying the time in the Edit Box. I got it using COleDateTime class. But i want to get the seconds Edit Box to be Updated continuously.I mean the application to be in running state.
void CTimeDlg::OnTime()
{
COleDateTime d,t;
d = t.GetCurrentTime();
m_hour = d.GetHour();
m_min = d.GetMinute();
m_sec = d.GetSecond();
UpdateData(FALSE);
// I tried the below line but in vain.
// I realized that OnTime() method is BN_CLICKED event
OnTime();
}
Here i want to call the OnTime() method repeatedly. Is it possible to do so?
Helping others satisfies you...
|
|
|
|
|
|
Look up the SetTimer API - It should do the trick.
Steve
|
|
|
|
|
beat me to it
C makes it easy to shoot yourself in the foot; C++ makes it harder, but when you do, it blows away your whole leg
|
|
|
|
|
Yeah, but you went into more detail - I was going to but I was too lazy.
Steve
|
|
|
|
|
Stephen Hewitt wrote: I was going to but I was too lazy
Nah generally you are not, you helped me a lot in the ATL forum
thanks
C makes it easy to shoot yourself in the foot; C++ makes it harder, but when you do, it blows away your whole leg
|
|
|
|