|
Member 3112447 wrote: please help me write the same thing in c++...
This just does not make any sense. At a minimum, you need to show the declaration of dfsnum , v , akt , and gw . You might also hint at what you are trying to accomplish. The less time we spend guessing, the better off you are.
Member 3112447 wrote: ...i am getting errors...!!
Care to share?
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
Member 3112447 wrote: gw.set_user_label(...)
That looks awfully like C++ anyway - C doesn't have methods of structs. I suppose set_user_label could be a function pointer in gw...
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
Stuart Dootson wrote: C doesn't have methods of structs
function pointers
|
|
|
|
|
|
I am using VC++ (MFC application)6.0. In my project i use a dialog box in which 2 Edit boxes are there. The Edit boxes value changes dynamically during the program, but the Edit box do not update the value. The Edit box shows only the last value.
How can I overcome to this problem?
Please help me, i will be thankful for that.
|
|
|
|
|
Sanjeev.Kr.mit wrote: The Edit boxes value changes dynamically during the program, but the Edit box do not update the value.
How can an edit control's value change yet not change? To update an edit control, simply use:
m_edit.SetWindowText("This is my new value.");
...
CString str;
str.Format("I have %d", 5);
m_edit.SetWindowText(str);
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
Hi.
Maybe you can use
BOOL UpdateData(
BOOL bSaveAndValidate = TRUE
);
UpdateData(TRUE); means refresh the value of control to the variable
and UpdateData(FALSE); means put the value of the variable to the control.
|
|
|
|
|
if u call the SetWindowText() api, it will be update the UI display itself.
if u only modify the control's member val, u should call UpdateData(false) to force DDX to update UI
|
|
|
|
|
Hello,
I am trying to create a Windows service with the following WMI code from MSDN(except reading the credentials which I am hard coding):
Example: Getting WMI Data from a Remote Computer
- When I run this code as application, it runs fine. When I run this code as Windows service, it gives me "Access Denied" in ExecQuery().
- In ConnectServer(), when I pass NULL as username/password, as application it runs fine but in service it gives "Access Denied". Is there API or something to know the username and password used to start the service , so that I can use it in ConnectServer().
Please help.
|
|
|
|
|
hackcrackvirus wrote: I am trying to create a Windows service with the following WMI code from MSDN(except reading the credentials which I am hard coding):
Example: Getting WMI Data from a Remote Computer
- When I run this code as application, it runs fine. When I run this code as Windows service, it gives me "Access Denied" in ExecQuery().
Hi,
Yes the Microsoft sample may return 0x80070005 on Windows 2003/Vista/Win7. This Help and Support article addresses the issue:
WMI Sample in MSDN to remotely target a machine results in an 0x80070005 - Access Denied errorr[^]
Best Wishes,
-David Delaune
|
|
|
|
|
- In ConnectServer(), when I pass NULL as username/password, as application it runs fine(i.e. uses login credentials) but in service it gives "Access Denied".
Please help.
|
|
|
|
|
Maybe simple but ..
Using VC Studio 2003.
MFC cstring related to formating a UINT64 in hex .
CString cstrFormat;
WORD wRow,wCol;
UINT64 n64Address = 0x100000000;
char * pcFmt;
cstrFormat.Format (pcFmt, n64Address);
pCtrl->SetItemText( wRow, wCol, (LPCTSTR) cstrFormat);
Result of CstrFormat is 0 , upper bytes are truncated to a 32 bit result in cstring
So I know I can use printf ... but their must be a way to get the format to work.
|
|
|
|
|
something like this?
cstrFormat.Format("%I64", *n64Address);
|
|
|
|
|
Thanks,
You sent me down the right path.
cstrFormat.Format("%I64d", *n64Address); works
|
|
|
|
|
Hi,
I am using VC7. and make thumbnails of images when we call Bitmap::FromFile(L"C:\\Test.bmp") and return value store in Bitmap pointer. It return 0x0000000 address and we get error code 8. I have included gdiplus.h header file and GdiPlus.lib file.
But it is working well with other downloaded sample program
|
|
|
|
|
need to check your code. can you post code snippet here
|
|
|
|
|
I have fully checked and also only call that funcyion
but problem still
|
|
|
|
|
Do u have the "GdiplusStartup"?
|
|
|
|
|
Hi,
I am using VC7. and make thumbnails of images when we call Bitmap::FromFile(L"C:\\Test.bmp") and return value store in Bitmap pointer. It return 0x0000000 address and we get error code 8. I have included gdiplus.h header file and GdiPlus.lib file.
But it is working well with other downloaded sample program
ghy
|
|
|
|
|
Hi,
I am using VC7. and make thumbnails of images when we call Bitmap::FromFile(L"C:\\Test.bmp") and return value store in Bitmap pointer. It return 0x0000000 address and we get error code 8. I have included gdiplus.h header file and GdiPlus.lib file.
But it is working well with other downloaded sample program.
ghy
|
|
|
|
|
HI,
How can i change the width of Crect variable..
ie CRect rect;
need to change the width of rect...
|
|
|
|
|
InflateRect (n,0);
or, it's only four members...
rc.left -= 3;
rc.right += 3;
Iain.
I have now moved to Sweden for love (awwww).
If you're in Scandinavia and want an MVP on the payroll (or happy with a remote worker), or need cotract work done, give me a job! http://cv.imcsoft.co.uk/[ ^]
|
|
|
|
|
HI Guys iam converting a CString to LPSTR iam getting only first charcter what can any body suggest me how to get complete string I tried the folowing i did n't get it
CString str=_T("Hello");
LPSTR ptr=str.GetBuffer(0);
iam getting only first character into ptr and tried other also its not working
LPSTR ptr=str.GetBuffer(str.GetLength());
|
|
|
|
|
Please, read the documentation about the GetBuffer to understand why you should never call this function without knowing what it does.
Furthermore, CString provides a cast operator that returns the same type as the GetBuffer function.
And how are you checking that you only get the first character ? Why do you need to store that into a LPSTR variable ?
|
|
|
|
|
Cedric Moonen wrote: CString provides a cast operator that returns the same type as the GetBuffer function.
CString has an LPCTSTR operator, whereas GetBuffer() returns an LPTSTR (which is not const ).
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|