|
Hello,
How to get the print feature for different doc templates.
Just handling id_file_print doesn't do anything.Could any one help by listing the steps or something.
Bye.
|
|
|
|
|
In MFC, its the view which handles the printing of data from a document. All CView derived class's have the OnPrint() member function, which gets called once per page of output. You have to implement that printing code in this function for your document template view class.
Take a look at the examples in the printing section here.
Roger Allen
Sonork 100.10016
I have a terminal disease. Its called life!
|
|
|
|
|
hi evry1
i have got a strange prob ,whenever i select context sensitive help option from appwizard , the project created does not builds,it just hangs and is unable to create help files.i tried directly exec the "makehelp" file
but it says that some hcw file is missing,.
I have even tried reinstllg VC++ but to no avail.
pls i need urgent help as myproject rquires this feature
thnx
bhushan
|
|
|
|
|
The makehelp.bat file generate the yourprojectname.hm file used by the help compiler to match topic ID's with the dialog/control ID's in your application. You only need to run this .bat file when you add new ID's to your project etc.
HCW.EXE is the microsoft supplied help compiler. On my PC this is installed in Program files\Microsoft visual studio\common\tools. You may need to correctly setup your VS environment variables so that it can find the tool when you come to compile your help file.
Goto Tools:Options in VS studio. Sleect Directories and the sub option Executable files. Make sure the path top the location of your installed tools directory is present.
Roger Allen
Sonork 100.10016
I have a terminal disease. Its called life!
|
|
|
|
|
In windows registry (RegOpenKeyEx ) what means KEY_ENUMERATE_SUB_KEYS ? Is this more than reading it?
I'm confused when using KEY_READ or KEY_QUERY_VALUE . Thanks
|
|
|
|
|
KEY_ENUMERATE_SUBKEYS : you request the right to enumerate the sub keys:
the registry is a tree structure, e.g. in the following B and C are subkeys of A
key A
key B
key C
key D
KEY_QUERY_VALUE: request the right to call RegQueryValueEx to read a value of the item
KEY_READ combines KEY_QUERY_VALUE, _ENUMERATE_SUBKEYS, KEY_NOTiFY (subscribe to change notifications), and STANDARD_RIGHTS_READ (currently: read the security descriptor of the key).
Auch den Schatten will ich lieben weil ich manchmal lieber frier' Rosenstolz [sighist]
|
|
|
|
|
so when reading a value from registry KEY_QUERY_VALUE should be okay instead of KEY_READ. At least it works.
|
|
|
|
|
Hi i have the following piece of code
temp= some_memoryAddress
while(temp)
{
doSmth();
temp = anotherMemoryAddress
}
what does the expression while(temp) do, i never seen memory address as an condition in the while loop.
Thanks
|
|
|
|
|
This is equal to:
temp= some_memoryAddress
while(temp != 0)
{
doSmth();
temp = anotherMemoryAddress
}
Clippy: It seems you're mantaining someone else's code, who knew C++ better than you. Good luck!
lazy isn't my middle name.. its my first.. people just keep calling me Mel cause that's what they put on my drivers license. - Mel Feik
|
|
|
|
|
doSmth should do something and change anotherMemoryAddress, otherwise this code doesn't make any sense. some_memoryAddress should be initially non-NULL.
The while loops until anotherMemoryAddress is NULL. This is normally the case when doSmth fails or doSmth has enumerated all memory addresses of anything.
-Dominik
|
|
|
|
|
great! this is the answer i need!!!
<quote>The while loops until anotherMemoryAddress is NULL
so this equals to
while(memory_address != NULL)
{
DoSomth();
}
Regard,
|
|
|
|
|
Exactly
-Dominik
|
|
|
|
|
As I said: I want to read the summary information out of an word file.
I got a definition page of a wordfile (v8.0) at http://www.wotsit.org.
But the offsets described in this file seems to be invalid.
Infos:
SummaryInformation -> STTBFASSOC (Table of Associated Strings)
STTBFASSOC -> offset in FIB: 410 0x019A fcSttbfAssoc long
the FIB starts at offset 0x0000
Maybe somebody had the same problem ... and fixed it? So that he can help me...
thx
Martin
|
|
|
|
|
the following expression:
for( ; ; )
{
doSmth();
}
Can anyone explain what the for(; ; ) does! Thank you
|
|
|
|
|
It is an infinite loop, exactly the same as:
while(1) { }
-Dominik
|
|
|
|
|
It loops forever.
No setup, No exit condition, No incrementer
|
|
|
|
|
thanks!!!
|
|
|
|
|
I use a <defines.h>
where I #define EVER (;;), so writing this:
for EVER {}
will loop for ever
neat!
|
|
|
|
|
thanks for the tip, Hugo! It's quite usefull and make so much sense
|
|
|
|
|
I want to create a project without the document support, only html view support. How can I change the default CWnd to a WebBrowser control? I've tried to use CWnd::CreateControl instead of regular create, but I recieve an error in the destructor of it.
|
|
|
|
|
Drop the MSIE ActiveX onto either dialog of your project. If you are using VC6, this will create a class wrapper. You can then use this class wrapper to create the control from anywhere you want.
Now, if you want to subscribe for MSIE events, you'll have to declare an event sink. See MFC\Src\viewhtml.cpp for more info (that's the actual CHtmlView implementation).
How low can you go ? (MS rant)
|
|
|
|
|
hi,
can you give me an exanple that show how to use the progress bar,
thank's
|
|
|
|
|
|
Hi,
I've previously only dealt with collections of BSTRs that really were just 1 layer.
I currently am working on a project where I need a Property of my Main Interface to return the Collection of Objects that are constructed.
IApplication(CApplication) (the main location of all the properties and processing information)
IProcess(CProcess) (1 individual process) (EXEName, ProcessID, Caption, memory etc)
IProcesses(Processes) (I want to have a all running processes(IProcess) returned inside this)
CProcessInfo (is a class only not an ATL object) to temporarily hold all the process information
I've looked at the ATL Collection wizard here on codeproject, and it's made it easy to construct the actual collection code, BUT how do I actually setup the collection to be returned.
I call ExecQuery, and this is currently populating a vector of all the process infomation (into CProcessInfo.
Then I want to call set xx = myObj.QueryResult from VB and have it return the Collection of Processes. and then
for each oProcess of myObj.QueryResult
debug.print oProcess.EXEPath
next
How do I do this... I feel really lame..
Links or examples greatly appreciated.
|
|
|
|
|
If you want to support the For Each syntax in VB your collection must implement _NewEnum. You might want to check out ATL's IEnumOnSTLImpl which can take care of almost all of it for you. You can also check out this link[^] that has another example that uses CComEnum which can also be helpful.
Wenn ist das Nunstück git und Slotermeyer? Ja! Beierhund das oder die Flipperwaldt gersput!
|
|
|
|