|
I want create CHM from existing internet files -that was downloaded by IE,
by seconds.
That is- run program - press include file- press complile- result received.
VISUAL CHM is a sample,
but do not works with DHTML.
|
|
|
|
|
Just curious as to how one could create the equivalent of .Net Attributes as used in C# in C++ in a non .Net environment. Any links or pseudo code would be great.
Thanks
|
|
|
|
|
Some programs very dislike DHTML,
for sample Viasual CHM4.0,
(chm creator)
they need to eliminate all DHTML from file to work correctlu with them.
Is there utilities that can remove DHTML from file ?
Thanks.
|
|
|
|
|
Hi
The text on every line from a multi-line editbox should be added to a 'CStringArray'.
This works most of the times, but sometimes not. When there is little typed into the edit box, like 1 character ... the array isn't filled.
(added the code below)
for example:
I've typed in the editbox 'a' then debugged it.
It appears that iLen gets on '1' but iDummy is left on '0'. strTemp is empty too so he doesn't add the text to the array.
Can anyone see the mistake i have made?
<br />
CString strTemp;<br />
CEdit* pEdit = (CEdit*) GetDlgItem(MY_EDIT);<br />
CStringArray m_array;<br />
m_array.RemoveAll();<br />
<br />
for (int i=0; i<(pEdit->GetLineCount()); i++)<br />
{<br />
int iLen = pEdit->LineLength(pEdit->LineIndex(i));<br />
int iDummy = pEdit->GetLine(i, strTemp.GetBuffer(iLen));<br />
strTemp.ReleaseBuffer(iLen);<br />
if ( iDummy != 0 )<br />
{<br />
m_array.Add(strTemp);<br />
}<br />
strTemp = "";<br />
}<br />
|
|
|
|
|
Only suggestion:
If CEdit::LineLength() and CEdit::GetLine behave different concerning the terminating '\0' you may solve the problem by changing strTemp.GetBuffer(iLen) to strTemp.GetBuffer(iLen+1)
Another tipp from the documentation of CArray in MSDN:
"Before using an array, use SetSize to establish its size and allocate memory for it. If you do not use SetSize, adding elements to your array causes it to be frequently reallocated and copied. Frequent reallocation and copying are inefficient and can fragment memory."
MS
|
|
|
|
|
The m_array.RemoveAll(); statement is not necessary as there is obviously nothing in the array to remove.
The int iLen = pEdit->LineLength(pEdit->LineIndex(i)); statement should probably be int iLen = pEdit->LineLength(i); instead.
|
|
|
|
|
Hi all! I'm new to SAPI and I was wondering how you can get your application to use another speech engine other than the MS ones. I installed the Dragon Naturally Speaking 7 engine but it doesn't show up in the speech properties dialog so you can't select it. I've heard that you can use SpEnumTokens() to find all the engines available but am I right in thinking that this only searches in the Microsoft directory in the registry and not any others? Please help me! I'm desperate!!
Thanks for ANY help!
|
|
|
|
|
Hello all,
I am having some troubles with tracing memory leaks in VC++ 6. I have a program which includes a bunch of DLLs, now when I execute it and shut it, it dumps quite a bit of garbage from memory. Usually it states where the object was created, but in this case it doesn't, it only dumps objects. This leads me to believe that the memory leak is generated in one of the linked DLLs.
Is there any trick or program which can figure out where the memory leak comes from? I have no idea where it originates and I'd like to clean it up...
Thanks,
- Fahr
|
|
|
|
|
Did you take a look at the bottom of the "Debug" pane? That shows where they usally come from? (I assume you have done that). Next, do you have access to the dll source code? There is an application that will determine memory leaks, but I cannot think of it right now...
Larry
Larry J. Siddens
Cornerstone Communications
TAME THE DOCUMENT MONSTER
www.unifier.biz
|
|
|
|
|
I have access to the source of all the DLLs. And like I said; it does NOT state the origin of the memory leaks, it must be one of the DLLs, but I can't figure out which one.
Please remember the title of that program!
|
|
|
|
|
Make sure you build all the dll's in Debug. Run you application in Debug (inside the studio). Exit your application (when you know that the leaks (or suspected leaks occurre)). Open the output pane window, click the "Debug" tab, then go to the bottom. If there are memory leaks (that VS can find) they will be listed. Then if you double click on the source file, it will take you to where the item was created and then not released.
Again, I am assuming that you have done all this.
Larry
Larry J. Siddens
Cornerstone Communications
TAME THE DOCUMENT MONSTER
www.unifier.biz
|
|
|
|
|
Yes, I have done it all.
The point is that I DO see a HUGE list of memory leaks, I have a slight idea from which DLL and even class they come, but it wont give out any source files and/or lines. Only dumps objects...
|
|
|
|
|
Now I'm confused. I have several projects that I check that are built (the whole project including the dll's) and when there is a leak, it will give me the file/line of the offending object even if it is in the dll!
When you compile your project, is the dll a dependency(sp) of the main project?
Larry
Larry J. Siddens
Cornerstone Communications
TAME THE DOCUMENT MONSTER
www.unifier.biz
|
|
|
|
|
No, they're not dependencies. We have multiple actual programs which use the same shared DLLs, so the DLLs are mostly standalone projects alltogether.
You think I can trace the leaks when I include the DLLs in question in the workspace of my project?
|
|
|
|
|
Yep I do. I thought you were already doing that. Do you know how to make them a dependancy? I'm assuming yes.
Larry
Larry J. Siddens
Cornerstone Communications
TAME THE DOCUMENT MONSTER
www.unifier.biz
|
|
|
|
|
I guess just adding them to the workspace will do the trick, no?
If not, then please tell me
- Fahr
|
|
|
|
|
Yes. But you have to make sure that the main exe project depends upon these dll's. This is done by: In the File View, right click on the "Workspace", Select "Insert Project into Workspace", when the dialog comes up, select the project to insert (the DLL in question), then check the "Dependency of" and select the main exe. When finished, make sure that you have "Debug" selected as the build and do a "Build All". This will compile the files for the DLL and your exe that uses them. Run the puppy and see what happens.
Larry
Larry J. Siddens
Cornerstone Communications
TAME THE DOCUMENT MONSTER
www.unifier.biz
|
|
|
|
|
Ok, I will try this when I'm back at work tomorrow
Thanks a lot for the info, I'll let you know how it ended
- Fahr
|
|
|
|
|
Any luck?
Larry J. Siddens
Cornerstone Communications
TAME THE DOCUMENT MONSTER
www.unifier.biz
|
|
|
|
|
eh, sorry, forgot to reply... it all worked out fine
Mem leaks found and resolved, thanks a lot for the tip!
|
|
|
|
|
i am new to visual C++, need to create an SDI where I have a view frame for 3D visualization and another frame where i have all the controls such as buttons, listboxes. How do i do this?
|
|
|
|
|
Look at the 'Splitter windows' articles in the 'MFC controls' section. You'll find some interesting articles!
|
|
|
|
|
Hi,
I want to add a button on title bar..just previous to close button and add some functionality to it..can i do that first of all..and if i can then can you show me some pointers or path or tutorials to do it..I need it urgently..Please reply..Thanks in advance for the help..
Himanshu
|
|
|
|
|
You should be able to simulate a button on the title bar simply by positioning it with MoveWindow.
|
|
|
|
|
Why toolbar is drawn in window created by CreateEx() -
not LoadFrame() like CMainFrame,
shows only CView-like toolbar -
it under flat level menu of window?
And CView size must take toolbar size into account in
client area in OnSize() ?
<br />
hr = m_PAlarmWnd-><br />
CreateEx(<br />
NULL|WS_EX_CLIENTEDGE ,
NULL,(LPCTSTR)strHeading<br />
,WS_VISIBLE |WS_CAPTION|WS_POPUP|
WS_SYSMENU| WS_THICKFRAME| WS_MINIMIZEBOX| WS_MAXIMIZEBOX <br />
,0,0,900,600, <br />
pParent->GetSafeHwnd(),<br />
pMenu->GetSafeHmenu()
,0);<br />
____
why also
do not displays tooltips,
but if to do not insert style TBSTYLE_FLAT
tooltip appears ?
|
|
|
|