|
Hello all,
I am using ActiveX control on Internet explorer 7.0. The Backspace is not working. same activeX is properly working on IE 6.0.
Thanks in advance.
Yes U Can ...If U Can ,Dream it , U can do it ...ICAN
|
|
|
|
|
I try to use CImage class for making images, but when i try to create very big images, for example 20 000 X 20 000, the method Create fails.
I wrote 2 different applications, one - is stand alone application, and another one is COM object. All the functionality of both programs are same. So in stand alone application i can create image with such dimensions, but when i use COM my method fails.
Why does it happens?
And how can I solve this problem?
|
|
|
|
|
But why you want to make 20000x20000 image?
|
|
|
|
|
reasonable question Thanks
I now that there is no reason to create images with size more than size of monitor resolution... And i know that I can programmatically capture sections frow wall image and show them on monitor separetly. But as always - i try to find the easiest way
And why in stand alone application i don't have such problems?
Thantks for participation
|
|
|
|
|
I was deciding to suggest this way but you used of it previous but I think also its a good way.;)
|
|
|
|
|
Step into the creation code in CImage. Look for the function that fails.
I would guess CreateDIBSection() is failing because it can't get a big enough
block of memory.
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
I connected to the database use odbc.I am able to select from the database.Can anybody tell me how to update /delete /insert into the table.
Thanks in advance
|
|
|
|
|
are you able to execute queries?
|
|
|
|
|
|
philiptabraham wrote: Can anybody tell me how to update /delete /insert into the table.
If you are using MFC, check out the CRecordset methods.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
In what way union differs from struct?
|
|
|
|
|
Members of a union share the same address.
Maxwell Chen
|
|
|
|
|
On the Union all members have same location on the memory so you can't store different values at the moment to other members.struct is similar to class however they have some differences.
|
|
|
|
|
for example
union Sample
{
int a;
float b;
};
Sample D;
D.a = 10;
then
D.b = 20.0; will destroy D.a value. isn't it?
|
|
|
|
|
Its better chechk this code
union abcd
{
int a;
int b;
};
struct abcd2
{
int a;
int b;
};
int _tmain(int argc, _TCHAR* argv[])
{
abcd dd;
dd.a=20;
cout<<dd.a<<endl; -->output=20
dd.b=110; cout<<dd.b<<endl; -->output=110
cout<<dd.a<<endl; --> output=110;
abcd2 aa;
aa.a=20;
cout<<aa.a<<endl; -->output=20;
aa.b=110;
cout<<aa.b<<endl; -->output=110;
cout<<aa.a<<endl; -->output=20;
return 0;
}
|
|
|
|
|
Thanks to all.
Now it gives clear understanding.
|
|
|
|
|
union A
{
unsigned char cc[4];
unsigned int nn;
};
void main()
{
A obj;
obj.nn = 0xabcd1234;
printf("obj.cc[0]=0x%X, obj.cc[1]=0x%X, obj.cc[2]=0x%X, obj.cc[3]=0x%X\n",
obj.cc[0],obj.cc[1],obj.cc[2],obj.cc[3]);
}
obj.cc[0]=0x34, obj.cc[1]=0x12, obj.cc[2]=0xCD, obj.cc[3]=0xAB
Press any key to continue . . .
Maxwell Chen
|
|
|
|
|
can any body explain some example like, where and in which contexts this can be applied?
|
|
|
|
|
What do you need exactly?
|
|
|
|
|
some realtime example do demonstrate the use of union.
|
|
|
|
|
For see some detaily of union I suggest see Other Data Types section on the www.cplusplus.com.;)
|
|
|
|
|
chandu004 wrote: some realtime example do demonstrate the use of union.
from wdm.h (a driver include file):
typedef struct _PCI_COMMON_HEADER {
USHORT VendorID;
USHORT DeviceID;
USHORT Command;
USHORT Status;
UCHAR RevisionID;
UCHAR ProgIf;
UCHAR SubClass;
UCHAR BaseClass;
UCHAR CacheLineSize;
UCHAR LatencyTimer;
UCHAR HeaderType;
UCHAR BIST;
union {
struct _PCI_HEADER_TYPE_0 {
ULONG BaseAddresses[PCI_TYPE0_ADDRESSES];
ULONG CIS;
USHORT SubVendorID;
USHORT SubSystemID;
ULONG ROMBaseAddress;
UCHAR CapabilitiesPtr;
UCHAR Reserved1[3];
ULONG Reserved2;
UCHAR InterruptLine;
UCHAR InterruptPin;
UCHAR MinimumGrant;
UCHAR MaximumLatency;
} type0;
struct _PCI_HEADER_TYPE_1 {
ULONG BaseAddresses[PCI_TYPE1_ADDRESSES];
UCHAR PrimaryBus;
UCHAR SecondaryBus;
UCHAR SubordinateBus;
UCHAR SecondaryLatency;
UCHAR IOBase;
UCHAR IOLimit;
USHORT SecondaryStatus;
USHORT MemoryBase;
USHORT MemoryLimit;
USHORT PrefetchBase;
USHORT PrefetchLimit;
ULONG PrefetchBaseUpper32;
ULONG PrefetchLimitUpper32;
USHORT IOBaseUpper16;
USHORT IOLimitUpper16;
UCHAR CapabilitiesPtr;
UCHAR Reserved1[3];
ULONG ROMBaseAddress;
UCHAR InterruptLine;
UCHAR InterruptPin;
USHORT BridgeControl;
} type1;
struct _PCI_HEADER_TYPE_2 {
ULONG SocketRegistersBaseAddress;
UCHAR CapabilitiesPtr;
UCHAR Reserved;
USHORT SecondaryStatus;
UCHAR PrimaryBus;
UCHAR SecondaryBus;
UCHAR SubordinateBus;
UCHAR SecondaryLatency;
struct {
ULONG Base;
ULONG Limit;
} Range[PCI_TYPE2_ADDRESSES-1];
UCHAR InterruptLine;
UCHAR InterruptPin;
USHORT BridgeControl;
} type2;
} u;
} PCI_COMMON_HEADER, *PPCI_COMMON_HEADER;
Depending on the value in HeaderType, one of the three unions (type0, type1 or type2) is the "correct" one to be used.
|
|
|
|
|
i used to use it when programming microcontrolers in my electronic classes... i had some devices sharing the same memory address with different registers, for which the union is the exact logical representation then...
|
|
|
|
|
|
A structure is a collection of items of different types; and each data item will have its own memory location. Where as only one item within the union can be used at any time, because the memory allocated for each item inside the union is in a shared memory location i.e., only one memory location will be shared by the data items of union.
Size of union will be the size of the biggest variable.
For eg
#include "stdafx.h"
struct s
{
int i;
char ch;
float f;
};
union u
{
int i;
char ch;
float f;
};
int main(int argc, char* argv[])
{
printf("Hello World!\n");
s s1;
u u1;
printf("%d %d",sizeof(s1),sizeof(u1));
return 0;
}
than result is 12 and 4 .I think now it is clear for u.
Yes U Can ...If U Can ,Dream it , U can do it ...ICAN
|
|
|
|