|
private:
CButton Comps[5];
CRegKey reg;
.......
(reg.Open(HKEY_LOCAL_MACHINE, "Software\\ShutDown") == ERROR_SUCCESS ) {
reg.QueryDWORDValue("NumOfComputers", num);
POINT pt1, pt2;
pt1.x = 20; pt1.y = 20;
pt2.x = 120; pt2.y = 50;
ULONG Cname_sz;
char buf[20];
CString cn, Cname;
for (int i=0; i< maxComps; i++) {
CRect tmpRect(pt1, pt2);
LPCTSTR val = (LPCTSTR) itoa(i, buf, 10);
int len = Cname.GetLength();
reg.QueryStringValue(val, (Cname.GetBuffer(len)), &Cname_sz);
Comps[i].Create(_T(Cname), WS_CHILD|WS_VISIBLE|BS_AUTOCHECKBOX,
tmpRect, this, 1210+i);
pt1.y += 30; pt2.y += 30;
Cname.Empty();
}
.........
|
|
|
|
|
what is your problem with this piece of code?
Don't try it, just do it!
|
|
|
|
|
Hi Folks,
Iam trying to find out what is the message generated when double clicked on the titlebar of a window.Iam interested with both the messages that is generated during normal to maximize and maximize to normal movement of the window.
Your help is highly appreciable.
Regards,
pradeep
|
|
|
|
|
Use Spy++.
Cheers,
Fredrik
"Felix qui potuit rerum cognoscere causas."
|
|
|
|
|
Hi,
I have rect i want to fill with transparent gradient
( so that one will see what's below the rect ).
The function should look like :
void DrawTransparentGradient(CDC* pDC, CRect* pRect,COLORREF clrStart,COLORREF clrEnd);
Anyone knows how to implement it ?
Thanks a lot!
|
|
|
|
|
You want to do an alpha blend. GDI+ has a few functions that will do that for you.
Sonork 100.11743 Chicken Little
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
Within you lies the power for good - Use it!
|
|
|
|
|
I'll look for it , hopefully it will help
Thanks
|
|
|
|
|
After installing Platform SDK (and setting the include and lib directory in VC++ 6) I am facing a problem with "new" as follows.
when I allocate memory:
if(m_NoData>0)
{
I=new int[m_NoData];
for(i=0;i
|
|
|
|
|
First of all, you haven't closed your 'for-loop' with a ')', but i'm assuming that's a typo and probably isn't the reason for the error. What kind of type is "I" and "m_NoData"?
|
|
|
|
|
How did you set the include and lib directory? I have seen people doing that manually when in fact you should go to Programs->MS SDK Folder(whatever name you're using)->Visual Studio Registration->Register PSDK etc...
// Afterall, I realized that even my comment lines have bugs
When one cannot invent, one must at least improve (in bed).-My latest fortune cookie
|
|
|
|
|
I have a DLL I need to use, and it came with a header file and a DEF file. They appear to have been written in C. I need to make a LIB file from the DEF file before the DLL is useable. I tried using the LIB command with the /DEF switch, but I must not be using it correctly. I also found instructions to modify the header file, compile to get an OBJ file, and then use the LIB command to create a LIB file, but I didn't succeed at that either. Does anyone know how to do this? Here's part of the header file.
#if defined(CALLED_DLL)
# define DLL_IMPORT __declspec(dllexport)
#else
# define DLL_IMPORT __declspec(dllimport)
#endif
extern "C" int DLL_IMPORT __stdcall StoreX(
char* FilePath,
char* ServerAddress
);
#endif
Here's the DEF file:
LIBRARY MYDLL.DLL
EXPORTS
StoreX@80 @1 ; StoreX
|
|
|
|
|
Usually its :-
LIB /DEF:<.DEF file name>
to generate the import library and exports file. The base name of the import library will be the base name of the .DEF file. Use /OUT: to control the output library name.
This is from Microsoft KB Article 131313 (was Q131313)
http://www.codeproject.com/cpp/libfromdll.asp[^] may also be of some use
'hth', Garth
|
|
|
|
|
I want to be able to pass an array of structures in on dialog class to another inorder to update and edit or add, this is being done inorder to limit access in the main dialog and keep the input for the end user simple. This was originally three programs that were originally compiled in C and then in C++, but have decided to combine all three into one using dialogs Can some one help me please
Candleman
|
|
|
|
|
Are the dialogs modal? and in which order are they displayed??
but.. you can make just a public member to the both dialogs:
class Dialog1{
public:
MyArray m_Array[A_LOT];
};
class Dialog2{
public:
MyArray m_Array[A_LOT];
void CopyArray(MyArray*);
};
Dialog1 dlg1;
dlg1.MakeStuff();
Dialog2 dlg2;
dlg2.CopyArray(dlg1.m_Array);
dlg2.MAkeStuff();
|
|
|
|
|
Hi, when i install a application using datagrid in a no-VC environment and register msdatgrd.ocx by regsvr32 msdatgrd.ocx, and run application, i was told that the data can not be bind. Is there any dll or ocx I need to register or installed?
Thanks.
|
|
|
|
|
Actually msdatgrd.ocx is the only thing you need to install. Did regsvr32 tell you that the ocx file was registered successfully? What tells you that data cannot be binded? Are you sure that it is DataGrid related, because if DataGrid was not registered your program would crash giving you a memory write error?
// Afterall, I realized that even my comment lines have bugs
When one cannot invent, one must at least improve (in bed).-My latest fortune cookie
|
|
|
|
|
I am working on tape backup application. I have just started my work. I want to develop this application using SDK tape library but i am unable to find any sample code. If some can provide me some sample code that would be great.
|
|
|
|
|
Hi,
Is it possible to put a circle in a pane of a status bar ?
I want to give a visual clue of warning like: green circle it's Ok, yellow circle it's borderline, re circil it's inacceptable.
Thanks,
Claude
|
|
|
|
|
|
I have tried to use this one to get Video Card information
particulary driver information. When I try to open Resource
View there is an error message pops up saying "atlres.h"
can't be found. Some one has the same experience?
Shin
|
|
|
|
|
|
Hi there,
please help me here!
is there a way i can insert, a ruler in a plain text editor like the one in word pad/Microsoft Word so that i can be able to format, my words or pictures for printing.
How can i also insert static text in a text editor?.
Very gratefull in advance.
thanks
|
|
|
|
|
I developed a application and used datagrid control in this program. Now I want to install this application in no VC environment but I found it did not work? Could anyone tell me how to deal with it?
|
|
|
|
|
Hi,
Does anyone knows how to register a DirectX filter (*.ax) from a application program without using Regsrv32 xxx.ax?
|
|
|
|
|
Call the DllRegister method of the DLL.
You might not have to do this: it is possible to use a filter directly in your program without having registered it. I'm assuming that intelligent connect won't find it and you have to do some weird stuff (use the new operator on a COM object). Search for a SampleGrabber example program on MSDN. I found it a while ago for an older version of DirectX, and did some fiddling but I got it to work.
If you can keep you head when all about you
Are losing theirs and blaming it on you;
If you can dream - and not make dreams your master;
If you can think - and not make thoughts you aim;
Yours is the Earth and everything that's in it.
Rudyard Kipling
|
|
|
|