|
|
I have an ActiveX control (.OCX) which will be used in normal HTML page. So far so good. But, I am not able to use this from within a .NET application. When that page is loaded, an error pops up telling there was an unsafe item and was blocked from running. The following is the exact error message. "This page provides potentially unsafe information to an ActiveX Control. Your current settings prohibit running controls in this manner. As a result, this page may not display correctly."
I have tried modifying all the security settings to low, manually in IE. Doesn't work still! How do I make it a safe control so that it wont display such a warning or it will not be blocked? Any help or pointers in this direction is highly appreciated.
Regards and thanks,
Rajesh R. Subramanian
You have an apple and me too. We exchange those and We have an apple each.
You have an idea and me too. We exchange those and We have two ideas each.
-- modified at 0:12 Monday 20th February, 2006
|
|
|
|
|
|
That's so nice of you. Can you explain me how can I do this? Or direct me to an example somewhere? I am very new to COM and ActiveX stuff please bare with me if this is an extremely stupid question.
Thanks and Regards,
Rajesh R. Subramanian
You have an apple and me too. We exchange those and We have an apple each.
You have an idea and me too. We exchange those and We have two ideas each.
|
|
|
|
|
|
Hi All,
I need to implement this,
typedef struct
{
T1 m;
T2 m;
T3 m;
........
}XX;
XX a;
....
note T1,T2,T3... has no basic class, I hope
a function can auto visit the data member one by one like this
for(int pos=0; pos< size(pos);pos++)
//size function get struct data member number
{
.......
stmt.setParam(pos, getData(pos));
//getData function get struct data member by pos
.......
}
I only want to use struct please do no tell me use vector or list
thanks a lot
i hope some one can do it although it is not easy
-- modified at 23:37 Sunday 19th February, 2006
|
|
|
|
|
Unless all the members of the structure are the same type, it's extremely difficult. At runtime, the structure is just a single block of memory; the compiler sorts out which offsets into the memory to use at compile time. If your members are all the same type, you can calculate the address of each member like this (assuming they're int s):
address = struct_addr + (pos * sizeof(int)); where struct_addr is a pointer to the structure and pos is the index of the structure member.
Why don't you want to use a vector or list? You're trying to store an array of data, so why not use an array?
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
Even that calculation won't work if the packing size was, say 8 bytes. What he's asking for can't be done in a nice implementation-independent way.
--Mike--
Visual C++ MVP
LINKS~! Ericahist | NEW!! PimpFish | CP SearchBar v3.0 | C++ Forum FAQ
|
|
|
|
|
Ugh. Yes, of course. Thanks for reminding me.
Although if the types are all the same, and you assume the packing is the same between each member it can be done similarly:
address = struct_address + (pos * sizeof(struct_name) / member_count); It still isn't a good idea though.
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
I got a C++/CLI answer
why c++ did not add this function when designing
using namespace System;
using namespace System::Reflection;
public ref struct Record
{
String ^ name;
int age;
};
int main(array<system::string ^=""> ^args)
{
Record ^ rec = gcnew Record;
rec->name = "George Washington";
rec->age = 274;
array<fieldinfo ^=""> ^ fieldInfo;
Type ^ recordType = Record::typeid;
fieldInfo = recordType->GetFields(
static_cast<bindingflags>(
BindingFlags::Public | BindingFlags::Instance));
for (int i = 0; i < fieldInfo->Length; ++i)
{
Console::WriteLine("{0} = {1}",
fieldInfo[i]->Name,
fieldInfo[i]->GetValue(rec));
}
return 0;
}
|
|
|
|
|
That's not a C++ function - you're using the features of the .NET class library. It won't work anywhere but under .NET.
I still maintain that it's a bad idea - you're using a structure like an array, so why not just use an array?
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
How to create a custom control at runtime?
Thanks.
|
|
|
|
|
Call the control's Create() member function.
You may be right
I may be crazy
But it just may be a lunatic you’re looking for
-- Billy Joel --
Within you lies the power for good - Use it!
|
|
|
|
|
Hi guys,
I have written a simple VC++ program, it works perfectly ok when i excute it with ctrl+F5. but when i set a break point and start excuting it in Debug mode i get the following errors msgs.
Loaded 'C:\WINNT\system32\ntdll.dll', no matching symbolic information found.
Loaded 'C:\WINNT\system32\KERNEL32.DLL', no matching symbolic information found.
Loaded 'C:\WINNT\system32\EntAPI.dll', no matching symbolic information found.
Loaded 'C:\WINNT\system32\ADVAPI32.DLL', no matching symbolic information found.
Loaded 'C:\WINNT\system32\rpcrt4.dll', no matching symbolic information found.
Loaded 'C:\WINNT\system32\msvcrt.dll', no matching symbolic information found.
Loaded 'C:\WINNT\system32\psapi.dll', no matching symbolic information found.
Loaded 'C:\WINNT\system32\NETAPI32.DLL', no matching symbolic information found.
Loaded 'C:\WINNT\system32\dnsapi.dll', no matching symbolic information found.
Loaded 'C:\WINNT\system32\wsock32.dll', no matching symbolic information found.
Loaded 'C:\WINNT\system32\ws2_32.dll', no matching symbolic information found.
Loaded 'C:\WINNT\system32\ws2help.dll', no matching symbolic information found.
Loaded 'C:\WINNT\system32\netrap.dll', no matching symbolic information found.
Loaded 'C:\WINNT\system32\ntdsapi.dll', no matching symbolic information found.
Loaded 'C:\WINNT\system32\WLDAP32.DLL', no matching symbolic information found.
Loaded 'C:\WINNT\system32\secur32.dll', no matching symbolic information found.
Loaded 'C:\WINNT\system32\samlib.dll', no matching symbolic information found.
The program 'C:\TMP\VCplus\Debug\VCplus.exe' has exited with code 0 (0x0).
Can any one of you guys help mee.....
Thank you guys.....
Tuscon.....
|
|
|
|
|
Those are not errors. Those messages are just telling you that the dlls were loaded by your program, and that they do not contain any debugging information so the debugger will not be able to step into any code in those dlls.
You may be right
I may be crazy
But it just may be a lunatic you’re looking for
-- Billy Joel --
Within you lies the power for good - Use it!
|
|
|
|
|
Thank You very much...
Thank you guys.....
Tuscon.....
|
|
|
|
|
Hi,
Please show me how to append text into the editbox.
I have a editbox, with has the associated variable:
CEdit m_Edit;
CString m_StringEdit;
I use this function to display text in the editbox:
void CMyEditClass::DisplayOnDebugWindow(CString debugdata)
{
UpdateData();
m_StringEdit = debugdata;
UpdateData(FALSE);
}
the problem is each time, when I use this function, only the new debug data is displayed. The current display data in the editbox is flushed out. I want to append the new debugdata into the editbox. Please show me how to do this.
Thank
Jim
Jim
|
|
|
|
|
CString text = m_Edit.GetWindowText();
text += NewText;
m_Edit.SetWindowText(text);
You may be right
I may be crazy
But it just may be a lunatic you’re looking for
-- Billy Joel --
Within you lies the power for good - Use it!
|
|
|
|
|
Pj,
Thank you so much. It works!
Jim
Jim
|
|
|
|
|
Hello,
I am able load image (*.bmp,*.tiff,*jpg)on Cstatic picture control using gdi+ API graphics.Drawimage() and it fits to my cstatic resized box of MFC dialog based application.
when i load large images of size 80MB or 1GB tiff it takes hell lot time
and i need to process it using my interpolation algorithm for getting result image this goes double the time of loading. made me unconsiderable code/appln.
so i decided to copy only Cstatic loaded images for algorithm process stucked up how to copy image data with reduced image size.
please help on this regard
thanks in advance
Neel
|
|
|
|
|
hi,
i've got another question... this time about system tray icons. i've looked at chris's article at http://www.codeproject.com/shell/systemtray.asp but i'm doing something wrong (obviously). i don't know where to put CSystemTray m_TrayIcon;. can someone tell me? i think if knew that i could figure out the rest from the article.
thanks in advance,
sam kline
|
|
|
|
|
Sam Kline wrote: i don't know where to put CSystemTray m_TrayIcon;. can someone tell me?
It's a member of the dialog class, or the CFrameWnd class if you are doing an SDI or MDI application.
"The greatest good you can do for another is not just to share your riches but to reveal to him his own." - Benjamin Disraeli
|
|
|
|
|
so where do i put it?
i can't find a place.
thanks for the help,
sam kline
|
|
|
|
|
Sam Kline wrote: so where do i put it?
In the class' declaration, which is usually the .h file.
"The greatest good you can do for another is not just to share your riches but to reveal to him his own." - Benjamin Disraeli
|
|
|
|
|
Use CBS_DROPDOWNLIST style
Manish Rastogi
|
|
|
|