 |
 |
Index ‹ Visual Studio ‹ MFC
|
- Previous
- 1
- 2
- Visual Basic >> GetDriveType problemNot really a problem but more of a question.
I see how to use the GetDriveType API to get
the type of drive for a letter such as c:\
Is there a way to get the media type inside a drive.
In particular is there a way to tell if a disc is a CDR
or a DVD-R.
Thanx
- 3
- Mcse >> InquiryI'm really interested in becoming a .com millionaire. Does anyone have any
information on this? I've only got $5.99 to my name. Do you think this is
possible?
Or a way to make $3,000 a day. That would also be swell.
Send me the sweet info ASAP: DeathFromAbove@suckasontheweb.com
Death from Above
- 4
- Visual Studio C++ >> VS 2005 Compatibility ProblemPlease point me to a more appropriate group if there is one.
Thanks.
We have a native Win32 API console program built with VC++ and VS
2005. It will run on any XP box with VS 2005 installed. Then,
we packed it and the needed DLLs up and put it on a server. It
turns out it will run fine on Windows 2000 server but won't start
at all on a Windows 2003 server. The error is "The system cannot
execute the specified program." We get the same thing when
testing on an XP box that DOESN'T have VS 2005 installed.
Any ideas?
- Arnie
- 5
- 6
- Visual Basic >> Service Pack 6I wanted to know if anyone out there had installed Visual Studio Service Pack 6 and what the consensus was on it. Any one run into problems?
- 7
- Visual Basic >> mdiforms and child formsI am creating a MDI application and when the user hits the cross to close the
app and selects no or cancel I want them to return to the current form they
were on with any data they had entered.
It appears to unload any child forms before running my sub routine that asks
if they are sure they want to exit.
I have tried the following code in the child forms unload event, in the
unload event of the MDI
Public CurForm as form 'this is in my module
set curForm = frmDeal
I can then go curForm.show in my sub routine when they select no or cancel
but all the entered info is missing
Is there a different form event I could use to catch this
The problem is that they complete around 10 forms with there information
before I save it to SQL through my stored procedures.
TIA for any help
- 8
- MFC >> Parent window cannot receive mouse click from child control.Hi there, that is strange. I have a form view inside a splitter window
that holds a slider bar. For whatever reason I cannot receive mouse
click messages when I click on the the control. I can receive the
messages when I click besides the control.
I was trying to look through newsgroups but I could find anything.
I know it must be something simple. Anyone that can help me out?
Christian
- 9
- MFC >> OnIdle and UI threadHi,
I have an app that the Mainframe and the View are not in the same thread.
Then I find a problem, when the mouse is inside the View, the MainFrame's
OnUpdateUI handler is not call. Then I find it's because the main thread's
OnIdle is not called.
Why this happens and how to solved it?
Any comments are appreciated
Best
Jeff
- 10
- Visual Basic [VB] >> Disconnected socket still connected! - What then?Hi, I have synchronous communications between a server and client. To save bandwith the connection must persist. So the socket must stay open and only be re-opened in case of communications failure. To simulate failure, the server disconnects the socket. However, the client socket parameter shows an open socket: socket.connected is true, socket. Active is true, socket.poll(1,selectRead) is true. When checking the MS class documentation, it is stated that socket.connected reflects the LAST status of the socket. So far, I have come accross many other programmers having the same problem. Some suggested of using the exceptions errors. But when connecting to a socket which is still open (according to VB.Net) while having the plug pulled out, the excpetion error one gets is, guess.......................Trying to connect on an open socket!! Have anyone found a way out yet? (That is appart from using other objects not designed in .NET)
- 11
- 12
- 13
- MFC >> COleControl::GetDCHi,
I am attempting to create a windowless control which will be transparent,
apart from animation that it draws to the screen in separate threads. I have
successfully worked out all the thread handling and synchronization thanks
to you lot but I am a bit stuck on the bit about the windowless control
getting a device context, especially as I want to paint to a buffer device
context and then copy that to the screen to avoid problems of bits of the
animation 'getting stuck' as they do when a control draws animates directly
to the screen. I've read the information in the link at the bottom of the
page, but does anybody know the answer to the following?
1) If I use the OLEDC_OFFSCREEN flag, I'm just a bit unsure as to what takes
care of the buffer device context and the copying of it to the screen. Does
the container take care of this (as is my guess), or does MFC take care of
it, or do I have to code that myself?
2) I understand how if OLEDC_PAINTBKGND is the parameter, the container
repaints the area of the window covered by the control with its own contents
in that area before passing the device context to the control in order to
allow it to paint to it, but does this happen if I just use OLEDC_OFFSCREEN?
Can I use OLEDC_OFFSCREEN | OLEDC_PAINTBKGND, i.e. do an OR operation to
specify them both?
Thanks for the help
Regards
Ben
- 14
- Visual Studio C++ >> Self deleting classHi,
Imagine:
CSomeClass* c = NULL;
c = new CSomeClass();
delete c;
c = new CSomeClass();
delete c;
So I must call delete c; to clean up memory.
However, instead of doing it like so.. isn't it equally valid to make class
self deleting?
So, if I do this:
class CSomeClass
{
CSomeClass();
virtual ~CSomeClass() { delete this; }
}
can I then simply do this?
CSomeClass* c = NULL;
c = new CSomeClass();
c = new CSomeClass();
What happens when I reassign the valiable to new instance? Will CSomeClass
self-delete itself at that point, or when application terminates?
Lisa
- 15
- VB Scripts >> Problem with XCACLS.VBSHi
Is anyone using this? I down loaded it from Microsoft and I am having
trouble with the function to remove inherited rights and replacing them with
a copy of the rights
From reading the documentation, I am using /I COPY , but what happens is the
inherited permissons get removed, but nothing gets copied in - so subsequent
actions that rely on the parent permissions being copied are failing
(because the permissions aren't there)
Does anyone have any suggestions
Cheers
Bob
|
| Author |
Message |
lfisk01

|
Posted: Tue Jan 27 00:28:27 CST 2004 |
Top |
MFC >> Resource limit?
I am having a really weird issue that I can't figure out...
I am getting a unhandled exception in my application. Also a "a resource is
unavailable..." error. It appears to be related to opening a large number
of resources. I'm not sure.
I have a CDialog derived class that is embedded in a tabbed dialog type
control which is all part of a CFormView. This dialog view has a custom
control/grid that uses CStatic controls for the cells. Each instance of
the class creates around 250 CStatic controls. This has always worked
well, but recently I modified my code so that more than one of these
CFormViews can be open at a time.
On opening the 6th instance (they all use the same MDI template), the app
blows up. I can't track it down to a single line and I think that's
because it's an application-wide issue.
I don't think it's necessarily a problem with this particular CDialog over
the other ones in the tab dialog view. I think it causes the problem
because it creates so many controls. In fact it's not even this type of
view that is the problem. After opening 5 views, if I open a normal
CDialog that embeds the same grid control it blows. I'm pretty sure the
grid isn't specifically the problem just the source of the problem.
If I debug deep into MFC code it appears the CreateCompatibleDC is failing
in different places.
Is there a limit to the number of controls that can be opened at one time
(that would be odd). Is there a conflict between using the same resource
IDs over and over between views?
I have debugged for hours on this and am baffled. Any clues or direction
would be greatly appreciated!
Thanks much.
Eric
Visual Studio380
|
| |
|
| |
 |
Johan

|
Posted: Tue Jan 27 00:28:27 CST 2004 |
Top |
MFC >> Resource limit?
Eric,
That CreateCompatibleDC fails implies a GDI-problem. This might or might not
be related to your code - you might want to start checking that
GDI-resources are deleted correctly.
I assume that the grid is a class over which source code you have control.
Personally, I would have rewritten this class not to use CStatics, but keep
a list of strings used for this purpose instead. If you create a small
class, derived from CObject, you could add relevant members (such as
SetWindowText), making it possible to replace the CStatics with this
"SyntheticStatic" class without changing the implementation of the grid.
Then, you'll only have to modify the drawing code of the grid, or add
drawing code to the grid perhaps, to loop the SyntheticStatics and paint
them using the normal GDI-calls.
Johan Rosengren
Abstrakt Mekanik AB
"Eric Margheim" <EMail@HideDomain.com> a écrit dans le message de
news:EMail@HideDomain.com...
> I am having a really weird issue that I can't figure out...
>
> I am getting a unhandled exception in my application. Also a "a resource
is
> unavailable..." error. It appears to be related to opening a large
number
> of resources. I'm not sure.
>
> I have a CDialog derived class that is embedded in a tabbed dialog type
> control which is all part of a CFormView. This dialog view has a custom
> control/grid that uses CStatic controls for the cells. Each instance of
> the class creates around 250 CStatic controls. This has always worked
> well, but recently I modified my code so that more than one of these
> CFormViews can be open at a time.
>
> On opening the 6th instance (they all use the same MDI template), the app
> blows up. I can't track it down to a single line and I think that's
> because it's an application-wide issue.
>
> I don't think it's necessarily a problem with this particular CDialog over
> the other ones in the tab dialog view. I think it causes the problem
> because it creates so many controls. In fact it's not even this type of
> view that is the problem. After opening 5 views, if I open a normal
> CDialog that embeds the same grid control it blows. I'm pretty sure the
> grid isn't specifically the problem just the source of the problem.
>
> If I debug deep into MFC code it appears the CreateCompatibleDC is failing
> in different places.
>
> Is there a limit to the number of controls that can be opened at one time
> (that would be odd). Is there a conflict between using the same resource
> IDs over and over between views?
>
> I have debugged for hours on this and am baffled. Any clues or direction
> would be greatly appreciated!
>
> Thanks much.
>
> Eric
>
>
|
| |
|
| |
 |
Eric

|
Posted: Tue Jan 27 10:24:43 CST 2004 |
Top |
MFC >> Resource limit?
"Johan Rosengren" <EMail@HideDomain.com> wrote in message
news:u8eTB%EMail@HideDomain.com...
> Eric,
>
> That CreateCompatibleDC fails implies a GDI-problem. This might or might
not
> be related to your code - you might want to start checking that
> GDI-resources are deleted correctly.
What type of thing should I be checking?
> I assume that the grid is a class over which source code you have control.
> Personally, I would have rewritten this class not to use CStatics, but
keep
> a list of strings used for this purpose instead. If you create a small
> class, derived from CObject, you could add relevant members (such as
> SetWindowText), making it possible to replace the CStatics with this
> "SyntheticStatic" class without changing the implementation of the grid.
> Then, you'll only have to modify the drawing code of the grid, or add
> drawing code to the grid perhaps, to loop the SyntheticStatics and paint
> them using the normal GDI-calls.
The code for the grid is definitely not optimal. I wrote it a few years ago
and did what I knew. It would be too much of an effort to rewrite it at
this time. Hopefully I can figure out the issue without recoding this.
Thanks
|
| |
|
| |
 |
Eric

|
Posted: Tue Jan 27 10:49:58 CST 2004 |
Top |
MFC >> Resource limit?
"Johan Rosengren" <EMail@HideDomain.com> wrote in message
news:u8eTB%EMail@HideDomain.com...
> Eric,
>
> That CreateCompatibleDC fails implies a GDI-problem. This might or might
not
> be related to your code - you might want to start checking that
> GDI-resources are deleted correctly.
Johan,
The CStatic control I use is actually a CLabel control (code I found on the
Internet). Below is the constructor and desctructor code. If I comment
out the CreateSolidBrush and CreateFontIndirect lines, I'm able to open
another 3 views before it blows. Of course the font looks bad. I use
this CLabel class all over the place as a replacement for CStatic. Does
this give you any clues? This one stupid fix is holding up our next
release. Thanks much.
CLabel::CLabel()
{
m_crText = GetSysColor(COLOR_WINDOWTEXT);
m_hBrush = ::CreateSolidBrush(GetSysColor(COLOR_3DFACE));
::GetObject((HFONT)GetStockObject(DEFAULT_GUI_FONT),sizeof(m_lf),&m_lf);
m_font.CreateFontIndirect(&m_lf);
m_bTimer = FALSE;
m_bState = FALSE;
m_bLink = TRUE;
m_hCursor = NULL;
m_Type = None;
m_hwndBrush = ::CreateSolidBrush(GetSysColor(COLOR_3DFACE));
}
CLabel::~CLabel()
{
m_font.DeleteObject();
::DeleteObject(m_hBrush);
::DeleteObject(m_hwndBrush);
}
|
| |
|
| |
 |
Johan

|
Posted: Tue Jan 27 11:37:00 CST 2004 |
Top |
MFC >> Resource limit?
Eric,
Comments below
"Eric Margheim" <EMail@HideDomain.com> a écrit dans le message de
news:EMail@HideDomain.com...
>
> "Johan Rosengren" <EMail@HideDomain.com> wrote in message
> news:u8eTB%EMail@HideDomain.com...
> > Eric,
> >
> > That CreateCompatibleDC fails implies a GDI-problem. This might or might
> not
> > be related to your code - you might want to start checking that
> > GDI-resources are deleted correctly.
>
> Johan,
>
> The CStatic control I use is actually a CLabel control (code I found on
the
> Internet). Below is the constructor and desctructor code. If I comment
> out the CreateSolidBrush and CreateFontIndirect lines, I'm able to open
> another 3 views before it blows. Of course the font looks bad. I use
> this CLabel class all over the place as a replacement for CStatic. Does
> this give you any clues? This one stupid fix is holding up our next
> release. Thanks much.
>
>
> CLabel::CLabel()
> {
> m_crText = GetSysColor(COLOR_WINDOWTEXT);
> m_hBrush = ::CreateSolidBrush(GetSysColor(COLOR_3DFACE));
>
> ::GetObject((HFONT)GetStockObject(DEFAULT_GUI_FONT),sizeof(m_lf),&m_lf);
>
> m_font.CreateFontIndirect(&m_lf);
> m_bTimer = FALSE;
> m_bState = FALSE;
> m_bLink = TRUE;
> m_hCursor = NULL;
> m_Type = None;
>
> m_hwndBrush = ::CreateSolidBrush(GetSysColor(COLOR_3DFACE));
> }
>
>
> CLabel::~CLabel()
> {
> m_font.DeleteObject();
> ::DeleteObject(m_hBrush);
> ::DeleteObject(m_hwndBrush);
> }
What might be the problem is that m_font, m_hBrush and m_hwndBrush are not
selected out of a CDC when they are deleted. DeleteObject will then not
remove the GDI-object. Make sure that m_font, m_hBrush and m_hwndBrush are
selected out of the CDC after being selected with SelectObject. You might
also want to check that those objects are not recreated elsewhere in the
code, without being deleted first, that is for example, if there are any
other CreateSolidBrush, the brush must be deleted first. Feeling that my
explanatory powers lack somewhat, let me exemplify:
xxx::ChangeBrushColor( COLORREF clr )
{
m_hBrush = ::CreateSolidBrush(....); // BAD, BAD, BAD
}
Do this instead:
xxx::ChangeBrushColor( COLORREF clr )
{
if( m_hBrush )
::DeleteObject(m_hBrush);
m_hBrush = ::CreateSolidBrush(....);
}
Feel free to mail the CLabel source code to me, and I'll have a look at it.
As this does not completely remove the problem, it's a strong indication
that there might be more GDI-leaks in the app. I can't stress the enormous
benefit of using a tool such as BoundsChecker enough. The cost for this tool
should be compared to the time it takes to hunt down GDI- and other leaks -
it quickly earns its money :-)))
Johan Rosengren
Abstrakt Mekanik AB
|
| |
|
| |
 |
Johan

|
Posted: Tue Jan 27 11:38:36 CST 2004 |
Top |
MFC >> Resource limit?
Eric,
See my other reply to this.
Johan Rosengren
Abstrakt Mekanik AB
"Eric Margheim" <EMail@HideDomain.com> a écrit dans le message de
news:EMail@HideDomain.com...
>
> "Johan Rosengren" <EMail@HideDomain.com> wrote in message
> news:u8eTB%EMail@HideDomain.com...
<snip>
>
> The code for the grid is definitely not optimal. I wrote it a few years
ago
> and did what I knew. It would be too much of an effort to rewrite it at
> this time. Hopefully I can figure out the issue without recoding this.
>
> Thanks
>
>
|
| |
|
| |
 |
Eric

|
Posted: Tue Jan 27 13:08:49 CST 2004 |
Top |
MFC >> Resource limit?
> if( m_hBrush )
> ::DeleteObject(m_hBrush);
> m_hBrush = ::CreateSolidBrush(....);
> }
>
> Feel free to mail the CLabel source code to me, and I'll have a look at
it.
>
> As this does not completely remove the problem, it's a strong indication
> that there might be more GDI-leaks in the app. I can't stress the enormous
> benefit of using a tool such as BoundsChecker enough. The cost for this
tool
> should be compared to the time it takes to hunt down GDI- and other
leaks -
> it quickly earns its money :-)))
>
Johan, I've actually just installed Boundschecker but need to upgrade to get
it to work. Hopefully, that'll help me out.
I changed the grid to use CStatic instead of CLabel. This allowed me to
open several more views but it is eventually crashing still so there must be
something else going on elsewhere. I'll email you the code for my grid.
|
| |
|
| |
 |
| |
 |
Index ‹ Visual Studio ‹ MFC |
- Next
- 1
- Visual Studio C++ >> Class InitializationDumb question,
Does C++ auto-initialize (zero out) data members in a class? Only Class
based members? arrays? or should I always initialize them in the
constructor? I mean I always do and have, but at times it becomes
tedious and I always wonder if it is truly necessary, so I am just asking to
finally get it out of my head! <g>
Many times I'll just create a struct with all my class data members
(non-class based struct fields) and then just have a ZeroMemory() in my
constructor. This way I don't have to worry about initialization when I add
new fields to the struct. But if I need a CString in the struct, I have to
remember that I can't use ZeroMemory on the struct. So that's part of the
reason why I am asking.
Thanks
- 2
- Visual Basic >> MSDN Help File problemHi guys, My MSDN VB help was working before but know, when
I'm trying to run it, it comes up with this error
message "Attempting to use an invalid compiled help(.chm)
file" with an OK button.
Thanks.
- 3
- Visual Studio C++ >> C++: mutable keywordHi All,
Mutable keyword can be used only with class and structure data members, that
are 'non-static' and 'non-const'.
Can someone tell me what is the reason behind this constraint?
Why 'static' and 'const' data members cannot be made mutable?
Thanks in advance
- 4
- Visual Basic >> Use XSD to get data types for XML elementsI am using VB6.
I am receiving an XML file and an XSD file.
I understand I can use the XSD file to validate the XML file, but is
it also possible for me to use the XSD file to give me the data types
of the elements in the XML file?
When processing the XML file, I know the name and the value (e.g.
<FirstName>Richard</FirstName>, <Amount>1.23</Amount>).
The XSD has the datatypes defined for each element.
What I want to do is, while processing the XML file in my VB program,
also be able to get the data type for that element.
Thanks for any help.
RichardF
- 5
- MFC >> Catching a message in the App classHi all,
Is it possible to catch a message (such as WM_TIMER) in the app class?
When I try to do it, the compiler (VC.NET) encounters an error in the
message map entry which is....
error C2440: 'static_cast' : cannot convert from 'void (__thiscall
CivHostApp::* )(UINT)' to 'void (__thiscall CWnd::* )(UINT_PTR)'
Can anyone decipher this...??
Thanks.....
- 6
- Visual Basic >> Wrox Books sample code download siteThis is just an FYI, and to serve as a hit in anybody searching for
hours for Wrox sample code (like I have been).
Wrox Books went bankrupt recently. Their website and about 32 of their
titles were purchased by Wiley Press. Support for those books is still
available at www.wrox.com.
The REST of the books appear to have been purchased by Apress. Sample
code for THOSE Wrox books is available at support.apress.com. Apress
also bought some or all Glasshaus books.
Anyway, in the hope that this will help somebody ...
Here's a list of the books Apress has sample code for (Sorry for the
length - I'm doing it for the Googlers!):
.NET Compact Framework
.NET Enterprise Development in C#: From Design to Deployment
.NET Enterprise Development in VB .NET: From Design to Deployment
A C# Application from Inspiration to Implementation
A Preview of Active Server Pages +
ADO 2.0 Programmer's Reference
ADO 2.1 Programmer's Reference
ADO 2.6 Programmer's Reference
ADO.NET Programmer's Reference
ADSI ASP Programmer's Reference
Advanced .NET Programming
Alex Homer's Professional ASP Web Techniques
Apache 2 Module Writer's Handbook
Apache Tomcat Performance Handbook
Apache Tomcat Security Handbook
Apache Tomcat Security Handbook
ASP 3.0 Programmer's Reference
ASP Programmer's Reference
ASP Programmer's Resource Kit
ASP to ASP.NET Migration Handbook: Concepts and Strategies for
Successful Migration
ASP.NET 1.0 Namespace Reference with C#
ASP.NET 1.0 Namespace Reference with VB.NET
ASP.NET Components Toolkit
ASP.NET Distributed Data Applications
ASP.NET E-Commerce Programming; Problem - Design - Solution
ASP.NET Mobile Controls Tutorial Guide
ASP.NET Programmer's Reference
ASP.NET Security
Assembly Language MasterClass
ATL COM Programmer's Reference
ATL Programmer's Resource Kit
AutoCAD 2000 VBA Programmer's Reference
AXIS Handbook
Axis: The Next Generation of Java SOAP
BEA WebLogic 7.0 Application Server Deployment and Administration
Handbook
Beginner's Guide to Access 2.0
Beginner's Guide to Access 95
Beginner's Guide to C++
Beginner's Guide to OOP Using C++
Beginner's Guide to QBasic
Beginner's Guide to Turbo Pascal
Beginner's Guide to Visual Basic 3.0
Beginner's Guide to Visual Basic 4.0
Beginner's Guide to Windows Programming with Turbo C++
Beginning .NET Web Services with C#
Beginning .NET Web Services with VB.NET
Beginning Access 95 VBA Programming
Beginning Access 97 VBA Programming
Beginning Access X VBA
Beginning Active Server Pages 2.0
Beginning ASP .NET 3rd Edition
Beginning ASP .NET E-Commerce
Beginning ASP Databases
Beginning ASP.NET Databases using C#
Beginning ASP.NET using C#
Beginning ASP.NET using VB.NET
Beginning ATL 3 COM Programming
Beginning ATL COM Programming
Beginning C
Beginning C#
Beginning C# Databases
Beginning C# Web Applications with Visual Studio .NET
Beginning C# XML: Essential XML Skills for C# Programmers
Beginning Components for ASP
Beginning Databases with MySQL
Beginning Databases with PostgreSQL
Beginning Delphi 2
Beginning E-Commerce with Visual Basic, ASP, SQL Server 7.0 and MTS
Beginning Excel VBA 2003
Beginning GTK+/GNOME Programming
Beginning J2EE 1.4
Beginning Java
Beginning Java 2
Beginning Java 2 - JDK 1.3 Version
Beginning Java Databases
Beginning Java Networking
Beginning Java Objects
Beginning Java Web Services
Beginning JSP 2.0
Beginning JSP Web Development
Beginning Linux Programming
Beginning Linux Programming 3rd Edition
Beginning MFC COM Programming
Beginning MFC Programming
Beginning Networking
Beginning Object-Oriented Analysis and Design with C++
Beginning Objects with Visual Basic 5
Beginning Oracle Programming
Beginning Perl
Beginning PHP 4 Databases
Beginning PHP 5
Beginning PHP, MySQL and Apache
Beginning Red Hat Linux 8.1
Beginning Site Server
Beginning SQL Programming
Beginning SQL Server 2000 for Visual Basic Developers
Beginning SQL Server 2000 Programming
Beginning VB.NET 2003 3rd Edition
Beginning VB.NET XML:Essential XML Skills for VB.NET Programmers
Beginning Visual Basic .NET
- 7
- 8
- Visual Studio C++ >> LNK 2020 error ...Hi,
I got the following link error in my release build:
-----------------------------------------
Linking...
LINK : error LNK2020: unresolved token (0A000020) _CrtDbgReport
LINK : fatal error LNK1120: 1 unresolved externals
-----------------------------------------
KB 323307 is not helpful to me, because I couldn't find "_CrtDbgReport" in my code using search. It must be from somewhere else, such as dlls, lib files, etc. But how can I track it down? How to fix it?
The debug build is ok.
Thanks,
Peter
- 9
- Mcse >> OT: Beer thirtyI'm ducking out a few minutes early, so Lumbergh can't ask me to work
tomorrow. So 5:20 ET is beer-thirty for me. Enjoy your weekends...see you
Monday.
--
KB - MCNGP "silent thug" #26
first initial last name AT hotmail DOT com
- 10
- Visual Basic [VB] >> Weird bugHi All
I have this weird bug in the code below:
Dim temp As String = oAction.ActionType.ToString
For Each ctl As Control In Me.Controls
If ctl.Tag IsNot Nothing Then
ctl.Visible = ctl.Tag.ToString.Contains(temp) '<------error here
ctl.Enabled = ctl.Visible
End If
Next
The error is: IndexOutOfRangeException (Index -1 does not have a value)
I have a number of controls on the form that are visible depending on the
value I put in the tag property
- 11
- Visual Basic [VB] >> System.Diagnostics.ProcessHello All,
I have posted previously regarding the above assembly. I have created a 2
classes and an interface to mask the complexities of using the above
assembly. The purpose of the interface is to allow one to create any UI
that they wish to search for files using the program find.exe. All the user
has to do is implement the interface and instantiate the FileFinderControl.
Class: ProcessController (has two threads that montor StandardOutput and
StandardError, and two delegates and events to pass this information on to
the FileFinderControl which manipulates the IFileFinder Interface)
Class: FileFinderControl (manages the interactions between the
System.Diagnostic.Process and the IFileFinder Interface)
Interface IFileFinder (abstracts the UI implementation so multiple UIs can
be created)
My problem is that I cannot get this architecture to run without the
ProcessController stepping on memory and causing a fault. I can implement
System.Diagnostics.Process seperately but only within my GUI. In the GUI
implementation I use the Invoke method to communicate across the thread but
it does not work when implemented through an interface.
Any Suggestions?
Thanks,
Dan
- 12
- Visual Basic [VB] >> Reflection and Menu Merging in MDIsWe have an MDI application that looks for forms in which a common interface
has been implemented. We can instantiate the forms and display them as
children of the mdi and use the functionality on them.
The problem is that the menus from the child forms don't show up. They
don't even show up on the
form itself, much less merge with the mdiparent menus
We have changed the modifiers on the menu and on each item in the menu to
public so they can be seen outside the assembly. We have tried not making
the form an mdichild and using it as a stand-alone application (still
instantiated by the mdi, although not as a child). The child form does
appear in the 'windows' list as a child of the mdi.
Is there any way to make available to the mdi, the menu on a child form
instantiated through reflection?
- 13
- Mcse >> Puntuaciones minimas.Hola a todos.
Tengo intencion de comenzar mi andadura en el duro camino MCSE 2003, pero
antes de nada me gustaria tomarle el pulso y para ello necesito saber que
puntuaciones minimas se exigen para pasar cada uno de los examenes.
¿hay algun tanto por ciento estipulado? ¿depende de cada examen?.
Gracias.
- 14
- Visual Basic >> Do Not Show Box AgainHi All,
I have a small form that appears at the start of my program that allows the
user to fix certain parameters that are lised in Combo boxes in the main
program before starting. This works OK but appears everytime the program is
first run.
What I would like is for there to be a Check Box that askes the question "Do
not show this box again" and fixes the selected parameters for all time in
the main programs Combo boxes, and does not appear again.
Can this be done?
Best Rgds,
Dave Robinson
- 15
- Visual Studio C++ >> self debug informationHello,
I've implemented the following things on another platform, and I'd
like to know whether they could be done with VC++:
- when an uncaught c++ exception occurs, the program prints its
type, and if it's derived from my own exception, it prints an exception
stacktrace (the stacktrace stored in the exception object) - like in java.
Is there anything like abi::__cxa_current_exception_type()?
- when a program causes general protection fault, division by
zero, etc., the program prints the stacktrace
- these things can be added to an already working program without
serious modifications: only a call to initializeSelfDebug() is needed at
the beginning of main()
The stacktrace contains IP address, source:line information.
These things should be available without Visual Studio installed (VS
isn't installed on the machines of testers/users).
When the program crashes, these things give us a lot of valuable
information instead of the usual "your program crashed-click to OK"
messageboxes.
Thanks,
Geza
ps: I'd like to avoid the
int main() {
try {
original_main();
} catch (MyExc &e) {
e.printStackTrace();
} catch (...) {
print("unknown exception occured");
}
}
because in some scenarios it doesn't work (for example: a dll plugin)
|
|
|