|
|
how to create c# code in the msi installer setup using vc8.
Rajarishi
|
|
|
|
|
Can you more explain,please?
|
|
|
|
|
How to Check Baterry status of LAPTOP programatically ?? Any APIs are available ??
thanks
|
|
|
|
|
Windows Management Instrumentation (WMI) has it all.
Specifically you probably want to check out
Class name = "Win32_PortableBattery"
Property name = "EstimatedChargeRemaining"
WMI is DCOM based so it's a bit tricky to get started so be prepared for a fair amount of research, especially if you've not entered the realm of COM before.
Good luck.
|
|
|
|
|
See this[^] site it has an article that on that article you can see Win32_* but its not english.
|
|
|
|
|
saksp wrote: How to Check Baterry status of LAPTOP programatically ?? Any APIs are available ??
look at simple api GetSystemPowerStatus
"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
Support CRY- Child Relief
|
|
|
|
|
Thanks , Using this my problem is solved.
thanks
|
|
|
|
|
I want to display pixel data in a static control on a dialog.
can anybody....help me out in this
Ashok
|
|
|
|
|
Im not sure do you need to SetPixelV ?
|
|
|
|
|
what do you mean by pixel data? Is it simply an image? Can you convert it to HBITMAP? If so you can use SetBitmap API of CStatic.
- NS -
|
|
|
|
|
Yes..its an image data .
I am receiving continously...I need to display as and when I revceive.
thanks in advance
Ashok
|
|
|
|
|
If you can convert it to bitmap, then as I early mentioned, you can use SetBitmap.
Another option is that customize the static control (deriving from CStatic) and put each pixel in to the DC in OnPaint(). SetPixelV API can be used for that.
- NS -
|
|
|
|
|
|
Welcome
- NS -
|
|
|
|
|
Better to copy the pixel data to a array , and disaply as a bitmap .
it is faster than SetPixel method.
If u can Dream... U can do it
|
|
|
|
|
I am creating a new CButton programatically using following syntax :
CButton *xtn;
xbtn = new CButton();
xbtn->Create(... // relevant syntax
My problem is text of the caption of button is always BOLD. I want it to be default-NON BOLD. I also tried getting a device context and then font and then LOGFONT ... change its weight property to 100 and then setting it as font of button's DC using selectobject() bt even that didnt work.
Please help.
-Cagespear
|
|
|
|
|
Use xbtn->SetFont( ...
- NS -
|
|
|
|
|
You can change font of button with SetFont and also make your font with CreateFont and then use of it on the button.
|
|
|
|
|
Hi,
I am creating a dialog which is at 4 levels down in inheritence. Like
Cdialog->MyDialog1->Mydialog2->MyDialog3
MyDialog3 has its own resource file and Dialog resource ID. Mydialog1 and 2 have their own resource file and Dialog resource ID. But everytime I use new Dialog resource id the program crashes at MyDIalog3->create() call itself.
So MyDialog3::create(NEW_IDD, Ptr_to_wnd) calls
MyDialog2::create(NEW_IDD, Ptr_to_wnd) calls
MyDialog1::create(NEW_IDD, Ptr_to_wnd) calls
CDialog::create(NEW_IDD, ptr_to_wnd) - the program crashes here in PreCreateDIalog(). If I give the dialog resource id of mydialog2 or 1 then it works but it doesnt work with MyDialog3's dialog resource id passed in create call.
Can you please advice ?
-Cagespear
|
|
|
|
|
Is there any control in the dialog1 or dialog2 resource in use by those dialog classes, which is not present in the dialog3 resource?
- NS -
|
|
|
|
|
If you make your dialog with Create dont need to make it again you can use of ShowWindow(SW_HIDE or SW_SHOW) for use it and why you didnt use of CPropertyPage.
|
|
|
|
|
Greetings, and apologies if you have already read this under COM.
I have created a DLL using the ATL COM AppWizard, and have successfully added a class and functions. I was also successful in create and an expose an enum by including
typedef enum {aa,bb,cc} testEnum;
in the .idl file.
PROBLEM: how do I add definitions of global members? In other words, I would like some constants, variables and functions to be immediately available to VB applications that use my dll, in the same way that the "Load" method or the "App" property become available once the a reference to VB6.olb is created.
Thanks is advance,
zgilboa
|
|
|
|
|
How does a Windows "VIEW" page send a BEEP code (ASCII 0x07) to the console. The _putch() function does not do it from a VIEW.
|
|
|
|
|
MessageBeep(-1) maybe?
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|