|
Without the code giving debugging advice is difficult. Some suggestions:
- Did you declare the member variables?
- Did you include all required header files?
- Did you spell the class names for the edt boxed correct?
- Dit you include semicolons after each declaration?
- Did you use the correct numer of braces?
- Did you close your function with a curly brace? This can be very nasty to find out.
Sometimes you get strange error messages if you forget a token. The error also may occur at upexpected places.
|
|
|
|
|
Hi swapna
did u got my mail
I hv posted u sample application
|
|
|
|
|
swapna_signsin wrote: ...when I try to declare a recordset var say *m_prs I get an error .
Did you use ClassWizard to derive a class from CRecordset ? In the dialog's .h file, add a member variable (not a pointer) of this new class. In the dialog's OnInitDialog() method, call the recordset's Open() method.
When you get all of this done correctly, post back and we can give you the rest of what is required.
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|
|
How to make an owner drwan Picture Box in ATL ( not using MFC support)
I need the picture transparent in the dialog.
I am using ATL composite control dialog
Any suggestion , code are welcome
Thanks
Anil
|
|
|
|
|
use the CreateCompatibleDC win GDI function, then when u have the dc, just bitblt the bitmap in it.
to make it transparent use the alpha blend there are many samples of transparent bitmaps in codeproject...
hope this helps
Ask not what your application can do for you,
Ask what you can do for your application
|
|
|
|
|
But there Picture Control, there is no Owner draw property listed in Property Window. I manuall modified rc file and add SS_OWNERDRAW, But i am not gettiing the WM_DRAWITEM message....
So i cant do any drawing for this picture box
|
|
|
|
|
oh now i see the problem....
as far as i know, you can not do a picture control owner draw, the idea of a picture control is to load a picture stored in the resources....
do it an a different way, one would be to get the window/dialog DC and then continue as suggested above, without using the picture control...
hope it helps
Ask not what your application can do for you,
Ask what you can do for your application
|
|
|
|
|
Hi all,
I am trying to use WMI (just learning) in VC++. However, there seems
to be a problem when it comes to connecting to a Remote Host . Which
works very well on the local computer. The machine I am trying to
connect has Win2K on it and I have WinXP installed on my machine. Now,
when I try to execute the following code snippet, it gives me an Access
Denied error. Also when I try to query the same through WBEMTEST.exe,
everything work fine. Here is the code snippet : -
// Initialize Security
hrRetVal = CoInitializeSecurity(NULL,
-1,
NULL,
NULL,
RPC_C_AUTHN_LEVEL_CALL,
RPC_C_IMP_LEVEL_IMPERSONATE,
NULL,
EOAC_NONE,
0);
// CreateInstance
hrRetVal = CoCreateInstance(CLSID_WbemLocator,
NULL,
CLSCTX_INPROC_SERVER | CLSCTX_LOCAL_SERVER,
IID_IWbemLocator,
(void **) &pWbemLocator);
BSTR bsNameSpace = SysAllocString(L"//RemoteComputer/root/cimv2");
BSTR bsUserName = SysAllocString(L"abc");
BSTR bsPassword = SysAllocString(L"123");
// Connect to the Server
hrRetVal = pWbemLocator->ConnectServer(bsNameSpace,
bsUserName,
bsPassword,
0,
NULL,
NULL,
0,
&pWbemServices);
// Query the Proxy Blanket for Authorization Level
hrRetVal = CoQueryProxyBlanket(pWbemServices,
NULL,
NULL,
NULL,
&dwAuthLevel,
NULL,
NULL,
NULL);
// Set the Proxy Blanket to the Authorization Level
hrRetVal = CoSetProxyBlanket(pWbemServices,
RPC_C_AUTHN_WINNT,
RPC_C_AUTHZ_NAME,
NULL,
dwAuthLevel,
RPC_C_IMP_LEVEL_IMPERSONATE,
NULL,
EOAC_NONE);
// Execute Query --> Access Denied
hrRetVal = pWbemServices->ExecQuery(L"WQL",
L"Select * from Win32_Service",
WBEM_FLAG_RETURN_IMMEDIATELY,
NULL,
&pEnumObject);
It is here that I receive an Access Denied error. I don't seem to know
what is th problem.
Any help would be appreciated.
Thanks
TobeyMag
|
|
|
|
|
Hello,
Isn't there anyone who could help me.
Thanks
-TobeyMag
|
|
|
|
|
Hi all,
In visual c++ InternetGetConnectionStatus() Function does not return connection status rather it return Connection is whether through modem or proxy. I want to check it is currenty connected or not. Please help.
Thanks Regards
Mahesh
|
|
|
|
|
Try InternetGetConnectedStateEx(), in wininet.dll.
But beware, all versions of wininet.dll doesn't have InternetGetConnectedStateEx().
In that case, use InternetGetConnectedState()
|
|
|
|
|
Hi,
You can use IcmpSendEcho2 to send an ICMP Echo request (ping) to an well-known server i.e. www.google.com.
-----------
Mila
|
|
|
|
|
I'm not sure, but what about those who connects via DUN/modem?
Won't a ping bring up the DUN connection dialog (if the connection isn't there)?
As I remember, that was the reason for me to use the metod above, it tests silently whether there is an Internet connection or not. Without a DUN connction dialog.
|
|
|
|
|
Dear All,
I have the following problem:
Environment:
Visual Studio 6.0, Service Pack 6, C++, Windows XP
Software is using “Microsoft.Jet.OLEDB.4.0”
After a view hours of operation in debugger, the software stops with the message box “User defined breakpoint”.
Message in output window is:
HEAP[Ellipson.exe]: HEAP: Free Heap block 5cbf760 modified at 5cd2f4c after it was freed
(Ellipson.exe is my program)
Output in callstack window:
NTDLL! 7c911230()
NTDLL! 7c959b79()
NTDLL! 7c9369a9()
NTDLL! 7c97e062()
NTDLL! 7c95a5d0()
NTDLL! 7c9368ad()
MSJET40! 1b005262()
MSJET40! 1b04af35()
MSJET40! 1b01a6f2()
05356890()
Memory and 5cbf760:
05CBF760 14 2D 15 24 AC 14 18 01 78 01 34 05 48 AE C9 05 EE FE EE FE EE FE EE FE EE FE EE FE EE FE EE FE EE and so on …
Memory at 5cd2f4c:
05CD2F4C EE FC EE FE EE FE EE FE EE FE EE FE EE
Here is this FC. This is causing the problem.
I have no idea, how this FC was written to this address. But before allocating memory the debugger checks the memory for the sequence of FE EE. FC is not expected and so the debugger stops the software.
Has anybody an explanation what FC in terms of memory means?
I also can not explain the callstack. This thread is not the main thread and no thread I did start (they all have names). The software is doing inter process communication to a service by COM. Maybe it is a callback from this service?
Thanks for some good advice.
Dirk.
Dirk
|
|
|
|
|
i don't understand...
if the memory was freed, so you don't own it anymore, so any other data can be put at this address so...
|
|
|
|
|
Here is a sample to force this error:
m_nSize = 1000;
m_pbArray = new BYTE[m_nSize];
for(int itr=0; itr
|
|
|
|
|
I need to decide between SQLite or Access Data Base, to build dynamically in my project.
Can you please give me advantages and disadvantages for each one, and advice me wich one to use?
aukh
|
|
|
|
|
i would use sqlite because it's easy, simple and quite handy. api is developer-friendly. if your project is not too complicated and you don't need really huge functionality of database, sqlite is just fo you.
|
|
|
|
|
I would recomend SQLite even for advanced database operations. It is so easy to use, completely free (unlike MYSQL), does almost everything standard SQL does (well everything you need anyway) and it's small.
There is also an excellent C++ wrapper somewhere here on CP that makes using SQLite even easier.
|
|
|
|
|
Where can I get the C++ wrapper?
aukh
|
|
|
|
|
|
here[^]
I would recomend reading the samples first, and making some small command lines test programs to get the feel for it. But really, it is so easy to use. And what is it with this Mihai Moga? He floats around throwing in stupid answers never actually answering the question asked????
|
|
|
|
|
hi guys!
how do i checking the disk in the dvd-rom either dvd or cd?
thanks
|
|
|
|
|
I think you want to check if there is a disk or not in the drive...
Use GetVolumeInformation . To prevent an error message being popped up use SetErrorMode . This could happen if you are using GetVolumeInformation .
Nibu thomas
Software Developer
|
|
|
|
|
i meant how do i know it is a dvd or cd disk ?
thanks
|
|
|
|