|
Why do i get in Windows 98 GetClipboardSequenceNumber undeclared identifier?
RegisterShellFilesType(TRUE) for a dialog box based on CRichEditCtrl gives me a debug
assertion failed: appui2.cpp line 191. I find ASSERT(m_pDocManager != NULL); and
m_pDocManager is CDocManager variable type which is a derived class from Object, but what is
CDocManager and what do i have to do in order not to appear this assert?I get this message after i close my app.
How ca I implement MRU list in a dialog box?I know about CRecentFileList, but how can i do it because i need a menu item?
Where I can have the mfc faq?
And please don't tell me about CRichEditView , I already know about it but I can't re-write my entire app because it is quite complex.
I have the following code for Find/Replace , but it doesn't working and not even the selection is not working as it should be.
bool CMyRtfDlg::FindWhatYouNeed( bool bMatchCase, bool bMatchWholeWord, bool bSearchDown)
{
FINDTEXTEX findText;
findText.lpstrText = (LPTSTR) (LPCTSTR) findName;
findText.chrg.cpMin = 0;
findText.chrg.cpMax = -1;
int nLen=findName.GetLength();
long lResult = m_rtf.FindText(0, &findText);
CString s;
s.Format("%d",lResult);
SetWindowText(s);
if (lResult == -1)
{
MessageBox("No matches!");
bSearchDown = false;
return false;
}
else
{
m_rtf.SetSel(lResult,nLen);
bSearchDown=true;
//findText.chrg.cpMin = lResult + 1;
//long lResult = m_rtf.FindText(0, &findText);
}
return true;
}
Thanks a lot.
|
|
|
|
|
Filomela wrote:
Why do i get in Windows 98 GetClipboardSequenceNumber undeclared identifier?
I assume you have the right .h files included. Do you have WINVER defined? If not, take a look at line #4389 of wsinuser.h.
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
I need a MIS.The personnel asministrative system of company,if you have the source code ,can you give to me as an example,thank you .
my mail box is:xuxu83@hotmail.com
|
|
|
|
|
This makes no sense. What does Management of Information Services have to do with source code?
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
what class can use "serialize()"?
|
|
|
|
|
Any class which is derived from Cobject can use Serilize function.
|
|
|
|
|
I want to write OPC client application...I collected some information on it...The information is...to write OPC client application i have to buy OPC client Toolkit which contains COM based interface...and used it with c++ or Visual basic....
Now I want to know that is this information correct?...plz help
|
|
|
|
|
Well, I seriously doubt about it. OPC is just a standard set of interfaces, used for hardware/software communication. All you need is description of interfaces, which you can easily get in internet. However, that toolkit may contain templates and test application, which you will find extremely usefull during development. But maybe such tester and sample is available in internet too, see http://www.opcfoundation.org/
Igor Green
http://www.grigsoft.com/ - files and folders comparison tools
|
|
|
|
|
why to add _cdecl?what is the meaning of " __cdecl time(time_t *)"?
|
|
|
|
|
check
http://www.codeproject.com/cpp/calling_conventions_demystified.asp
greatest thing is to do wot others think you cant suhredayan@omniquad.com
messenger :suhredayan@hotmail.com
|
|
|
|
|
__cdecl, from MSDN:
"This is the default calling convention for C and C++ programs. Because the stack is cleaned up by the caller, it can do vararg functions. The __cdecl calling convention creates larger executables than __stdcall, because it requires each function call to include stack cleanup code. The following list shows the implementation of this calling convention."
|
|
|
|
|
3 months ago I started writing an VC6-ActiveX-project. I choosed to have Runtime License in the project-startup-Wizard.
Now I’m trying to publish it on the net but it will not work. I’ve managed to create an ActiveX in .NET with no Runtime Licence and after creating a CAB-project of my .ocx it all worked on the net…
(All clients that didn’t have the .NET-ActiveX got it to work but not the one with Runtime License created in VS6.)
For me very strange…
Is it possible to take away the Runtime License setting from my old ActiveX-project?
...and justice for all
APe
|
|
|
|
|
Hi everybody,
now i face a strnage problem ,in vc++ 6.0 IDE
when i put the Dot operator after an object , the corresponding member fucntions and variables didnt come..
i deleted the .ncb, .opt, .clw, .aps files and opend the workspace. now member methods & functions window working for the MFC clasess like CString, CDialog etc.. but not for my custom clasess...how can i resolve this..?
The returned pointer may be temporary and should not be stored for later use.
|
|
|
|
|
It can be a little temperamental, especially with custom classes.
Why not try a third-party product called Visual Assist? I've used it for a long time now and just couldn't live without it - check it out at www.wholetomato.com, the latest version is called "Visual Assist X", you can trial it for 30 days free. It offers boat-loads more features than the standard VC++ 6.0 IDE.
|
|
|
|
|
I agree with Rory. I've been using Visual Assist for a few months now and it solves the problems you mentioned and more.
|
|
|
|
|
I agree. The built in intellisense in VC6 just plain sucks. It is very slow at times and often quits working at all. Try visual assist. It fixes all these problems.
John
|
|
|
|
|
Hi all,
I have a small problem of adding a toolbar to outlook express.. i was unable to find any example or code where it can be done... and no tutorials at all..while there are few gurus who can add toolbar to outlook express too.. I hope any one of you people out here at cp can help me out.. any help or pointers are highly appreciated.. thanks a lot in advance..
Regards
himanshu
|
|
|
|
|
hi,
Im developing a VC++ application in which one requirement is to print the dialog with its control(basically edit box and static text).
Im using the followinf code for this purpose.
CPrintDialog printDlg(FALSE, PD_ALLPAGES | PD_RETURNDC, NULL);<br />
printDlg.m_pd.nMinPage = printDlg.m_pd.nMaxPage = 1;<br />
printDlg.m_pd.nFromPage = printDlg.m_pd.nToPage = 1;<br />
printDlg.DoModal();<br />
HDC hdcPrn = printDlg.GetPrinterDC();<br />
if (hdcPrn != NULL) {<br />
CDC *pDC = new CDC;<br />
pDC->Attach (hdcPrn);
pDC->StartDoc("job");
pDC->StartPage();
Print(pDC,PRF_CHILDREN|PRF_CLIENT|PRF_ERASEBKGND);<br />
pDC->EndPage();
pDC->EndDoc();
pDC->Detach();
delete pDC;<br />
}
The problem im facing is that the content of the print is very small.Any idea where im wrong.I need help to print in a enlarged mode(i.e)bigger print
|
|
|
|
|
the program segment below show pOldFont,why to use it ,i often see it?
font.CreateFont(-200,0,0,0,400,FALSE,FALSE,0,ANSI_CHARSET,OUT_DEFAULT_PRECIS,CLIP_DEFAULT_PRECIS,
DEFAULT_QUALITY,DEFAULT_PITCH|FF_ROMAN,"Times New Roman");
CFont*pOldFont=(CFont*)pDC->SelectObject(&font); //作用是什么?
//pDC->GetTextMetrics(&tm);
nHeight=tm.tmHeight+tm.tmExternalLeading;
j=pDoc->m_stringArray.GetSize();
for(i=0;i<j;i++)
{pdc-="">TextOut(720,-i*nHeight-720,pDoc->m_stringArray[i]);
}
pDC->SelectObject(pOldFont);
|
|
|
|
|
You want to ensure that a device context always contains valid data. So when you select a specific handle into a dc for the first time, the original handle is returned. Before exiting, you then put that original back. Otherwise, when, using your example, "font" is deleted, the handle in pDC would be invalid.
Anyone who thinks he has a better idea of what's good for people than people do is a swine.
- P.J. O'Rourke
|
|
|
|
|
Not quite right. Drawing objects are reference counted; a DC holds a reference to any objects selected into it, so those objects aren't actually deleted. DeleteObject only reduces the reference count by one - the object gets deleted when the reference count drops to zero.
However, some parts of Windows pass you a DC expecting to receive it back in the same state as it was when you received it; if you don't follow this rule, the drawing of some standard components can get screwed up.
Stability. What an interesting concept. -- Chris Maunder
|
|
|
|
|
You are correct. After posting my response I weighed revising it, but I'd already shut down my computer.
The problem arises that if you create an object, assign it to the DC and don't delete it, the next time around, you create a new object, assign it to the DC and throw away the return value, you can easily create a resource leak.
Anyone who thinks he has a better idea of what's good for people than people do is a swine.
- P.J. O'Rourke
|
|
|
|
|
i want to develope some software which must use sdk,exactly the tapi in sdk.i just find find the online setup on microsoft.com,but my net speed is slow,it wouldn't complete!so,is there other place that i can get it??
who can give me some address? thanks very much!
|
|
|
|
|
|
for some reason this call crashes my app on some machines.
When I set a breakpoint at the point where this function is called and attempt to step into it I end up in CEnumArray::XEnumVOID::Skip(ULONG celt) which I cant explane. First line of this function is the COM method prolog macro which causes an access violation.
Can anyone explain why this is happening?
Thanks
Josh
|
|
|
|