|
|
Thanks,
but I have some problems to use the functions Win32_DiskDrive.
I have to define these symbols using 'Cimwin32.mof'.
But, How can I use this strange (for me ) files 'mof'?
And also it needed namespace '\root\cimv2', but the compiler give some errors!
If it is a problem, I'm writing a simple MFC doc\view application.
Thank you
Have a nice code day
|
|
|
|
|
_Russell_ wrote: If it is a problem, I'm writing a simple MFC doc\view application.
this article will help
http://www.codeproject.com/system/UsingWMI.asp[^]
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
For cpu-id look for the assembly function cpuid.
|
|
|
|
|
Thank you very much.
It works!
Do you know others assembly functions to know the other devices id (ram, motherboard)?
Have a nice code day
|
|
|
|
|
how to change the readonly option of a record set to upateonly or appendonly..
i am getting an error "recordset readonly"when i go for adding a record thru ODBC api in vc++
if(m_pSet->CanAppend())
{
m_pSet->AddNew();
m_pSet->m_programname="parser";
m_pSet->m_paraname= "main";
if(m_pSet->Update())
TRACE("Row Added OK\n");
else
TRACE("Row Not Added\n");
} // end if CanAppend()
else
MessageBox("Cannot Append");
thanks in advance
Get
|
|
|
|
|
Check out the third parameter of CRecordset::Open() .
"Take only what you need and leave the land as you found it." - Native American Proverb
|
|
|
|
|
wrote an application that uses twain for scanning an images using
a scanner.
when the scanner is not connected I get the return value and want to
display my own popup but there is another popup from the scanner.
I tried to call :
ShowOwnedPopups(DefWnd(NULL)->m_hWnd,false);
("DefWnd(NULL)->m_hWnd" has my main window handle).
Still the popup is shown. I think that probobly the popup is generated by
the operating system (Windows).
Is anyone can help me on this?
Thanks,
Lior.
|
|
|
|
|
1)Actually, what i am doing is to integrate two separate Excel & access automation applications into one.
2)First, i finish Excel automation(used excel9.olb(library) & included excel9.h as header file).Upto now it works fine.
3)Now The problem begins. For access automation functionality i use msacc9.olb & include access9.h as header file.As soon as i compile, even before adding any functionality, it shows class redefinition errors for _Application etc.
Apparently, these are due to the object models of Excel & Access which have some same class names like _Application etc. which cause the clash.
There seems nothing wrong with the code but with the libraries of access & excel which have some same class names.
How should i resolve the clash?Please, Please, Please Help!!
Ankush Mehta
|
|
|
|
|
in your headers, did you thought to well add such code :
<font color=blue>#if</font> !<font color=blue>defined</font> (__MY_HEADER_H_INCLUDED__)
<font color=blue>#define</font> __MY_HEADER_H_INCLUDED__
<font color=green>
<font color=blue>#endif</font> <font color=green>//__MY_HEADER_H_INCLUDED__</font>
TOXCCT >>> GEII power [toxcct][VisualCalc 2.20][VisualCalc 3.0]
|
|
|
|
|
No, i didn't add any such code.where should i add it.please tell in detail.
Ankush Mehta
|
|
|
|
|
i thought it was clear enough... it must round all your definitions in the header it is on...
so, the #if and #define must be before what you declare in the header (others #include can be before that, as they may have their own exclusive statements already) ans the #endif put at the end of the file...
if you have several headers in that case, choose different #define macros for each header, to avoid any problems...
you could look into any compiler header to see how to do...
TOXCCT >>> GEII power [toxcct][VisualCalc 2.20][VisualCalc 3.0]
-- modified at 5:39 Wednesday 14th December, 2005
|
|
|
|
|
well, please forgive me for asking rather stupid questions. i am a newbie.Let me restate what i have done.
the libraries msacc9.olb,excel9.olb provided by ms-office for automation are added to the project.These libraries contain header files msacc9.h & excel9.h. i include these header files at the top of the .cpp file of my application like this.
#include"msacc9.h"
#include"excel9.h"
Now, please give me directions to resolve the clash(classes like _Application are in both libraries)
Ankush Mehta
-- modified at 6:13 Wednesday 14th December, 2005
|
|
|
|
|
The directives that toxcct suggested you to add should enclose all the 'code' in all of your .h files. Are you using AppWizard to generate the files for new classes ? If yes, these directives are automatically inserted in your code.
So if this is the case, the problem is probably elsewhere. Then post the exat and COMPLETE error message.
|
|
|
|
|
|
yeah, toxcct you are right.
Following errors are generated:
error C2011: 'FormatConditions' : 'class' type redefinition
error C2011: 'Module' : 'class' type redefinition
error C2011: 'Modules' : 'class' type redefinition
error C2011: '_Application' : 'class' type redefinition
These classes exist in both the headers(but they have different definitions.e.g, _Application object is an open access db for access header file while _Application object for excel header file is an open excel).I have used appwizard to generate related files.These headers are provided by msoffice.
Any Ideas please......
Ankush Mehta
|
|
|
|
|
What line i am following................
i heard of namespace.as i am a newbie, i am not sure about this.at the top of my main .cpp file i tried using this:
namespace anyname1
{
#include "msacc9.h"
}
namespace anyname2
{
#include "excel9.h"
}
But this again didn't work out...
Seeking help......Please.........
Ankush Mehta
|
|
|
|
|
Please Guide how can i print a webpage in a console application. Actually i achieved printing using webbrowser control in dialog based application.Now i want to print in console application.
In other words,in dialog based application i used web browser control(Active X component), dragged it on my Dialog form & used its methods to achieve printing.
Now how can i achieve printing webpage in console based application.ShellExecute won't work to print a webpage(neither in dialog-based nor in console), it is confirmed.
Please Guide... It is a bit urgent
Ankush Mehta
|
|
|
|
|
In VC++ , property pages are of three types - small, medium, large.
I have no of properties to set for activex control for which the specified
size property page is not suffient. So how to increase the size of the property page while creating activex control.
|
|
|
|
|
Sac87Rak wrote: In VC++ , property pages are of three types - small, medium, large.
What do you mean by this? As it's just a dialog box, a property page can be made any size you want. The size of the property sheet, however, is governed by the size of the largest property page.
"Take only what you need and leave the land as you found it." - Native American Proverb
|
|
|
|
|
Sir,
I am writing a activex control and it has lots of properties.
I can't put all these properties on same page so for that i want big
property page in which i can put all properties of the control in same
property page.
sachin
|
|
|
|
|
Sac87Rak wrote: I am writing a activex control and it has lots of properties.
Ok, but I still fail to see the problem.
Sac87Rak wrote: I can't put all these properties on same page so for that i want big
property page in which i can put all properties of the control in same
property page.
This makes no sense. First you say that you can't put all of the properties on the same page, then you say that you want to put all of the properties on the same page. Which is it?
"Take only what you need and leave the land as you found it." - Native American Proverb
|
|
|
|
|
Thank u sir,
I got a solution, i can increase size of property page but it gives warning
: saying that property page is not of standard page size'
Any way thanks for ur help
Sachin
|
|
|
|
|
I've never seen such a message. Does it come from within MFC?
"Take only what you need and leave the land as you found it." - Native American Proverb
|
|
|
|
|
yes it comes from MFC when we compile our application with property page's size greater than specified sizes
|
|
|
|