|
Still to get an answer.
Z.A
|
|
|
|
|
It's an ActiveX control so I'd use the OLE viewer that comes with visual studio to have a peek at its type library. Look for out going interfaces. Once you find the correct out going method (assuming one exists) you'll probably have to use connection points to hook up your sink (which ypu'll have to implement). How you do this will depend to what libraries you using (or not using). e.g. ATL and MFC have different ways of going about this.
Steve
|
|
|
|
|
hi,
i m facing prblm while opening an url through mfc. i wanna open one exixsting webpage (say http://www.msn.com) on one button click. i have used OpenURL method of MFC. Its returning success. But the webpage is not opening. i wanna know what exactly i should do to open the webpage also.
|
|
|
|
|
you can use ShellExecute
something like :
::ShellExecute(AfxGetMainWnd()->GetSafeHwnd(), "open", "http://www.msn.com", NULL, NULL, SW_SHOW);
Maximilien Lincourt
Your Head A Splode - Strong Bad
|
|
|
|
|
Aryan S wrote: i have used OpenURL method of MFC. Its returning success.
OpenUrl method of which class CInternetSession or CHtmlEditDoc.. if you are using CInternetSession, then it will give you pointer to file of webpage..
or if you using CHtmlEditDoc one, then you need a View derived with same in your project
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
Hi,
how can i place around 500 controls simultaneously on a single Dialog?
Any idea?
Thanks in advance.
Anish.
|
|
|
|
|
you can, but you won't be able to place all of them at design, because the editor is limiting you.
add the additionnal controls it at runtime...
TOXCCT >>> GEII power [toxcct][VisualCalc 2.20][VisualCalc 3.0]
|
|
|
|
|
AnsGe wrote: 500 controls simultaneously on a single Dialog?
OMG, I hope that I will never use your application.
but on a more serious note, explain what you want to do, maybe there are better ways that we could suggest.
Maximilien Lincourt
Your Head A Splode - Strong Bad
|
|
|
|
|
Maximilien wrote: OMG, I hope that I will never use your application.
LMAO
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.
|
|
|
|
|
I think you could:
1- Create the controls dynamically with pre-defined ID's.
2- Create a few child dialogs, each having a couple hundred controls.
3- Edit the .RC file, and add them manually.
4- Some other way.
Why?
this is this.
|
|
|
|
|
Here's a fragment of code from a dialog I wrote earlier:
Declare some controls
CStatic m_txtLabelIn [ 500 ];
And create them with any arbitrary size for now
for (i = 0; i < sizeof(m_txtLabelIn) / sizeof(m_txtLabelIn[0]); i++)
m_txtLabelIn[i].Create("", SS_LEFTNOWORDWRAP, rect, this);
and then do a SetWindowPosition on each one to put them where you want them. (You ARE sure they will all fit the space available?)
Shraddhan
|
|
|
|
|
No I am not sure that they all will fit on one dialog. If you are using it maximized with screen resolutions 1024 x 768, then maybe it is possible.
Actually it all depends on the size of individual controls, and what you choose to put in them, like text, icons, images etc.
Suggestion:
You should rather use a property sheet with a few property pages in it. That way, you can put fewer controls on each page, and it would be easier to create and use, and would fit in a smaller screen area.
Now about your code:
CStatic m_Static[500];
CStatic* m_pStatic;<br />
m_pStatic = new CStatic[500];
However, I strongly recommend using property sheet and pages.
this is this.
|
|
|
|
|
Whether or not 500 controls will fit on a mere 1024 x 768 display surely depends on how big they are and what they do. I don't know what the original questioner had in mind.
I know that I have a dialog that will hold up to 120 CEdit controls and about a dozen others, and the property sheet technique will not help as they all need to be visible at the same time. However, as my screen resolution is a pleasant 2304 x 864, this is perfectly OK.
I note with interest your comment on my code smippet that
CStatic m_Static[500];
is not a very good idea. Please tell me why not? As the array is a member of a class (a CDialog), I don't need to worry about deleting it.
So in what way is using new better?
Shraddhan
|
|
|
|
|
Statically creating so many controls will take more memory out of the stack space for the thread. If you have a large amount of code with that, then the stack might even get corrupted. I tried once with about 16 objects of CView, with a lot of other code and controls, and the program simply crashed on some machines without showing any error at all.
So, it would be wiser to allocate so many controls on the heap.
this is this.
|
|
|
|
|
khan++ wrote: then the stack might even get corrupted
Didn't I say that the array of CEdit controls was a member of the window class, a CDialog? I assumed that the controls would be allocated memory anywhere but the heap, and being created by the class's constructor, if this failed the dialog would surely not open.
Or am I missing something here?
Shraddhan
|
|
|
|
|
Well, if it works, then you don't need to worry.
What I actually meant was that when you have lots of controls and lots of code, then it is safer to allocate them using new instead of statically. But if it works, then who cares where and how they are created.
this is this.
|
|
|
|
|
go windowless
and draw the controls yourself
My blogs:
http://blog.joycode.com/jiangsheng
http://blog.csdn.net/jiangsheng
http://bloglines.com/public/jiangsheng
Command what is yours
Conquer what is not
---Kane
|
|
|
|
|
AnsGe wrote: how can i place around 500 controls simultaneously on a single Dialog?
IMHO, Putting 500 control on single dialog is not part of good design, better try breaking them into diffrent property sheets!
if you still insist on putting 500 control on single dialog... htne dynamically generating control will better option
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
Hello,
within Visual Studio .NET 2003, I have a project that wraps a class(this is for parsing ini-files).
This old-style class is compiled by VS6.0 and is located in a DLL. That this work, i've used "Managed Extensions". So far, all works fine.
Here my problem: I would like to debug my class which is located in the dll. Source code is available, however i couldn't find any information through google the web.
Perhaps there are anybody, who can help me ?
thanx
Eddy
-- modified at 9:33 Friday 13th January, 2006
Nodbody knows a solution ?
|
|
|
|
|
eddyroth wrote: Nodbody knows a solution ?
sometimes it takes more than an hour...
eddyroth wrote: I would like to debug my class which is located in the dll.
there are a number of ways.
the one i use most often is to open the DLL project in VC6, set it as the Active Project, then run it (Start Debugging). the debugger will ask you for an executable. give it the path to your VS.Net EXE. it will run the EXE and you can debug your DLL. this works in many situations - i use it most ofter to debug DLLs that interact with VB (just make VB.EXE the DLL's EXE).
you should probably put a copy of your DLL in the Windows folder, or someplace the EXE can find it. you'll need to put a new copy there each time you make a change to the DLL, so that the debug info maps to the source files correctly.
or, you can just import the DLL project into VS.Net and build it there. that's probably the simplest way.
Cleek | Image Toolkits | Thumbnail maker
|
|
|
|
|
Hi Chris,
thanx for your respond, but in this case your recommentions doesn't work, unfortunatelly.
I know this ways which you described because i applied these solutions also.
Do you have any other experience with "managed extensions" and "debbuging dll" ?
Someone else tells me, that VS.NET 2003 automatically break the debug into VS6.0. For this i
have to set only the debbugertyp to mixed or auto. I did it and nothing happens ?
Any ideas what i also could do ?
Eddy
|
|
|
|
|
eddyroth wrote: your recommentions doesn't work
why not?
eddyroth wrote: Any ideas what i also could do ?
can you build the DLL in VC7 ?
Cleek | Image Toolkits | Thumbnail maker
|
|
|
|
|
It doesn't work because:
- 1.) call the C#-Exe creates crashes
- 2.) the project I need and use is part of a framework with a lot of projects.
Therefore it isn't also as easy to build it in VC7
|
|
|
|
|
Have you tried what I suggested in the other thread? Put an int 3 instruction in the VC6 DLL where you want it to break, and you can open it in your debugger (by default it'll open VC 2003).
Regards,
Nish
|
|
|
|
|
Ok nish,
i've read your thread not proper enough... ...
Now i've implemented it and something happend, so far.
Windows creates an Exception-Window and I can choose between VS .NET 2003 and VS 2005.
But how can I debug with VS 6.0 ?
|
|
|
|