|
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 ?
|
|
|
|
|
eddyroth wrote: But how can I debug with VS 6.0 ?
Open VC6. Take Tools - Options - Debug tab - check Just-in-time debugging.
Regards,
Nish
|
|
|
|
|
Many Thanx (to Nish)
your description works 100 %
It's very cool ... ..
|
|
|
|
|
|
Hi Chris,
the fault was by settings of vc6.0.
I had set Just-In-Time debugging and someone was happy... ....
despite thanx
|
|
|
|
|
I'm making a data logger using a CListCtrl. my problem is when the List are populated with new data (take note that the vertical scroll will now appear because the display screen is maximized and new data is coming).the user needs to scroll down to see the newly inserted item at the bottom of the list
what I want to happen is to make the vertical scroll, to scroll-downwards automatically so that the LATEST data received can be easily seen during actual logging of data.
Therefore, the user will no longer have to scroll down to see the latest data logged or the newly inserted item.
-- modified at 8:32 Friday 13th January, 2006
|
|
|
|
|
What's wrong with the answers you already have got?
|
|
|
|
|
You had posted this yesterday I believe. I had given the solution too, Did that not work or is that you did not know how to do it? If so please let us know. We can explain you in steps how to do that.
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.
|
|
|
|
|
EnsureWindow() worked!.Thanks!It was a great help!
|
|
|
|
|
It is EnsureVisible()
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!
I have a strange problem: I want to pop-up a (modal) dialog from an ActiveX control which is a MDI child. I created the dialog and it pops up as regularly using DoModal . I can click around and use the dialog until I don't click the title bar e.g. in order to drag the dialog around. If I do so the dialog freezes the mouse input and I can only navigate through the dialog via keyboard.
Using Spy++ I checked the message queue. When I click on the title bar a WM_SYSCOMMAND (WPARAM: SC_MOVE) is sent and that's it. Message queue hangs. All I can do is navigating by keyboard or Alt+Tab away from and back to the dialog. Then I can use the mouse again. Surely without clicking on the title bar.
I googled for the problem and saw that some people have the same problem but there is no real solution for it. Somebody proposed to surround DoModal with PreModalDialog/PostModalDialog which didn't change anything.
Is it possible that some ActiveX events are missing that need to be routed to the control? I'm out of ideas anyway...
Thanks for your help.
Regards, mykel
If they give you lined paper, write the other way!
|
|
|
|
|
alright, found a solution:
problem was that MSDN Q187988[^] was applied sometime before which swallowed all my precious messages using a Windows WH_GETMESSAGE hook.
my quick and dirty solution is to disable the windows hook directly before opening the popup dialog and enable the hook again directly after the popup dialog is closed. everything works fine then and I can finally drag the dialog around... yipeeh! what a pain in the ...!
perhaps there is a smarter solution. if you know one I would be glad for a short post.
regards, mykel
If they give you lined paper, write the other way!
|
|
|
|
|
i am trying to insert an item in zero'th index.But it dosen't get inserted in the specified position but get appended in the last. My program workes fine in Report view.But i want to do it in ICON view.Can anyone help me?
Thank You
nav
|
|
|
|