 |
 |
Index ‹ Visual Studio ‹ MFC
|
- Previous
- 1
- Visual Basic [VB] >> InteropI have developed a COM INterop package in vb.net
The dll's for this package reside in a folder named DotNet.
Now, everything s works fine as long as the VB6 program calling this
pachage is above
the DOTNet folder ( the vb6 exe has a config file with probing
privatePath="DotNet" )
so the assemblies in the DOTNET folder successfully load.
Now some questions :
1) How can you get the Com Interop package to work with a vb6 program
when the vb6 program
is not above it in the file path structure ( ie. DotNet folder is not
below the folder
that contains the vb6 program trying to use the Com Interop Package.
2) Now, if you answered "Use the GAC" for the question #1 above, how
come that fails. The vb .net
interop assembly uses the
Microsoft.Practices.EnterpriseLibrary.Common and for some reason the
execution of the program will fail to load the
Microsoft.Practices.EnterpriseLibrary.Common assembly
whenever that assembly is loaded in the GAC ( fuslog dump below).
3) How does one get a vb6 program running in the VB6 IDE to load
assemblies in a Interop package
it uses, since the whiel under tghe IDE is something like /Program
Files/VB6 or something like that,
and the probed filepath or DotNet will not be present under program
files/vb6.
Fuslog dump ( for some reason it want to load
Microsoft.Practices.EnterpriseLibrary.Common.resources ,
I do not have any suc dll on my system).
*** Assembly Binder Log Entry (2/6/2008 @ 11:30:23 AM) ***
The operation failed.
Bind result: hr = 0x80070002. The system cannot find the file
specified.
Assembly manager loaded from: C:\Windows\Microsoft.NET\Framework
\v2.0.50727\mscorwks.dll
Running under executable C:\Phase 13\CODE\UI Binaries
\TestPLWSClient.exe
--- A detailed error log follows.
=== Pre-bind state information ===
LOG: User = CSG\MHunter
LOG: DisplayName =
Microsoft.Practices.EnterpriseLibrary.Common.resources,
Version=3.1.0.0, Culture=en, PublicKeyToken=b03f5f7f11d50a3a
(Fully-specified)
LOG: Appbase = file:///C:/Phase 13/CODE/UI Binaries/
LOG: Initial PrivatePath = NULL
LOG: Dynamic Base = NULL
LOG: Cache Base = NULL
LOG: AppName = TestPLWSClient.exe
Calling assembly : Microsoft.Practices.EnterpriseLibrary.Common,
Version=3.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a.
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: C:\Phase 13\CODE\UI Binaries
\TestPLWSClient.exe.config
LOG: Using machine configuration file from C:\Windows\Microsoft.NET
\Framework\v2.0.50727\config\machine.config.
LOG: Post-policy reference:
Microsoft.Practices.EnterpriseLibrary.Common.resources,
Version=3.1.0.0, Culture=en, PublicKeyToken=b03f5f7f11d50a3a
LOG: GAC Lookup was unsuccessful.
LOG: Attempting download of new URL file:///C:/Phase 13/CODE/UI
Binaries/en/
Microsoft.Practices.EnterpriseLibrary.Common.resources.DLL.
LOG: Attempting download of new URL file:///C:/Phase 13/CODE/UI
Binaries/en/Microsoft.Practices.EnterpriseLibrary.Common.resources/
Microsoft.Practices.EnterpriseLibrary.Common.resources.DLL.
LOG: Attempting download of new URL file:///C:/Phase 13/CODE/UI
Binaries/DotNet/en/
Microsoft.Practices.EnterpriseLibrary.Common.resources.DLL.
LOG: Attempting download of new URL file:///C:/Phase 13/CODE/UI
Binaries/DotNet/en/
Microsoft.Practices.EnterpriseLibrary.Common.resources/
Microsoft.Practices.EnterpriseLibrary.Common.resources.DLL.
LOG: Attempting download of new URL file:///C:/Phase 13/CODE/UI
Binaries/en/
Microsoft.Practices.EnterpriseLibrary.Common.resources.EXE.
LOG: Attempting download of new URL file:///C:/Phase 13/CODE/UI
Binaries/en/Microsoft.Practices.EnterpriseLibrary.Common.resources/
Microsoft.Practices.EnterpriseLibrary.Common.resources.EXE.
LOG: Attempting download of new URL file:///C:/Phase 13/CODE/UI
Binaries/DotNet/en/
Microsoft.Practices.EnterpriseLibrary.Common.resources.EXE.
LOG: Attempting download of new URL file:///C:/Phase 13/CODE/UI
Binaries/DotNet/en/
Microsoft.Practices.EnterpriseLibrary.Common.resources/
Microsoft.Practices.EnterpriseLibrary.Common.resources.EXE.
LOG: All probing URLs attempted and failed.
- 2
- Visual Basic [VB] >> Showing message without halting executionThe only way that I found to display a message to the user from an application that has an interface is by using the MessageBox.Show() method. What I need to do is notify the user of something without having to wait for user interaction.
Is there a way to display messages on screen that I could remove programmatically when I want to and would not stop execution?
Example:
1) User launches application
2) Application requests input file selection
3) User selects input file
4) Application displays message 'doing something with file' while doing something with file
5) Application finishes 'doing something with file'
6) Application removes message
- 3
- 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
- 4
- MFC >> Adding lists to tabsI have a floating/dockable window derived from CControlBar and I have
declared a "CTabCtrl m_tabCtrl;" in the header for my class. In the OnCreate
method of the class I have created the tab control and assigned it an
imagelist. I can create tabs with whatever names and icons I need, but I
need help adding a CListCtrl. I have declared a list control in the class
and can create it with a fixed size, but I need it to use up the entire
client area of the dynamically sized and docked/floating tabbed window, but
I don't know how to attach the list control to the window / tab. Each tab in
this window needs to display a list control (same one?) with different
columns and items.
Thanks
- 5
- Visual Basic [VB] >> DataGrid Get F3 keypressI design my own datagrid which can turn Enter into 'Tab', BUT I cannot
detect the user keypress 'F3' , Why
I try to detect keyCode, it only effect on 'keydown' , 'keyup' , but it
cannot get my keypress 'FX'
Anybody got idea ? thanks a lot
Protected Overrides Function ProcessKeyPreview(ByRef m As
System.Windows.Forms.Message) As Boolean
Dim keyCode As Keys = CType(m.WParam.ToInt32(), Keys) And
Keys.KeyCode
If m.Msg = WM_KEYDOWN And keyCode = Keys.Enter Then
m.WParam = New IntPtr(Keys.Tab)
endif
end function
- 6
- Visual Basic [VB] >> Focus Issue with an MDI applicationI have an MDI application that uses a main form frmMaint that is inheritted
from a Base Form we have created. In this form, we create a User Control
that contains the main entry fields. At the top of the form is our main
toolbar.
When I click on the tool bar to do a save for example, I loose focus from
the last input box that I was in. When I try to return focus to that text
box, I am not able to. I have saved the current control as a member
variable of the Base Form and populate in on a Control enter handler. When
I try to use the saved current control and do a CanFocus or CanSelect, both
come back as true. When I try to actually do the focus, False is returned.
Any suggestions?
Thanks
- 7
- 8
- 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
- 9
- Visual Studio C++ >> Please help me, i got message Assertation falure line 47 _block_type_is_valid(phead->nBlockType) with following code//goal: to make a 2 dimentional dynamic array and use it in matrix
multiplication plz help me, //i am using VC++
#include<iostream.h>
class Matrix
{
private:
int *e;
int m,n,sz;
static char count;
char name;
public:
Matrix(int mx = 0,int nx = 0):m(mx),n(nx)
{
sz = m*n;
e = new int[sz];
for(int i = 0;i<sz;i++) //initiaklize d array elements to 0
e[i] = 0;
count++;
name = count; //to have a naming convention of objects, etc A,B,C
}
void insert (int i,int j,int v) //to insert an element in the 2D array
{
if(i<=m && j<=n) //check is refference is ok then insert the item.
e[i * n + j] = v; //convert 2D indexes to one dimention.
else
cout<<"order violation, the matrix has order:"<<m<<'x'<<n<<endl;
}
//returns value of a particular pos /**********I get error in this
function i think*****/
int & pull (int i,int j) //retuns the number after converting 2D
indexes to one D index
{
if(i<=m && j<=n)
{
return e[i * n + j]; //conversion of 2D indexes to 1D, n is the 2nd
Dimention
}
else
{
cout<<"order violation, the matrix has order:"<<m<<'x'<<n<<endl;
return e[0];
}
}
//will store its order into two varables passes as refference by the
calling func
void order(int &M,int&N)
{
M = m;
N = n;
}
Matrix operator * (Matrix B) // matrix multiplication, works fine but
error comes in this
//block when pull is
called
{
if(n == B.m)
{
Matrix C(m,B.n);
for(int i=0;i<m;i++)
for(int j=0;j<B.n;j++)
for(int k=0;k<n;k++)
C.insert(i,j,C.pull(i,j) + this->pull(i,k) * B.pull(k,j));
return C;
}
else
{
Matrix null(m,B.n);
cout<<"order mismatch"<<endl;
return null;
}
}
void setMatrix()
{
int temp;
for(int i = 0;i<m;i++)
for(int j= 0;j<n;j++)
{
cout<<"Enter values of Matrix "<<name<<' '<<m<<'x'<<n<<" matrix at:
"<<i+1<<','<<j+1<<" :";
cin>>temp;
this->insert(i,j,temp);
}
}
void show()
{
for(int i = 0;i<m;i++)
{
for(int j = 0;j<n;j++)
cout<<this->pull(i,j)<<'\t';
cout<<endl;
}
}
~Matrix()
{
delete []e;
count--;
}
};
char Matrix::count = 64;
/********************************************************************************/
int main (void)
{
Matrix A(2,3),B(3,2),C(2,2);
A.setMatrix();
B.setMatrix();
C = A*B;
C.show();
A.show();
cout<<endl;
B.show();
cout<<endl;
C.show();
return 0;
}
///PLEASE any help will be greatly apriciated, i get error of
//Assertation falure at line 47 of dbgdl.cpp
//Expression:_block_type_is_valid(phead->nBlockType)
- 10
- 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
- 11
- 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
- 12
- 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
- 13
- MFC >> Print a BMPHi
I need to write an application that can print a BMP in its original size
(length and width). The application is not a dialog based application so
OnPrint event is not expected either thus the printer device context is to
be obtained manually too. Please guide me with any helping code available.
Regards
Usman
- 14
- 15
- VB Scripts >> Apply to All Folders - programaticallyHi,
I am wondering does anybody know how to do the following:
1. Open Windows Explorer.
2. Choose Tools - Folder Options...
3. Click View.
4. Then Either Select "Apply to All Folders" or "Reset All Folders"
I have found the registry settings to achive 1-3 above. (Although would be
happier to find a more approved way of doing this). However have not been
able to work out how step 4 works. Is their either a registry setting, a
windows API call or VBScript function that can achieve this?
Thanks,
Ward.
|
| Author |
Message |
jkane

|
Posted: Tue Aug 09 09:33:58 CDT 2005 |
Top |
MFC >> OnIdle and UI thread
Hi,
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
Visual Studio23
|
| |
|
| |
 |
Ajay

|
Posted: Tue Aug 09 09:33:58 CDT 2005 |
Top |
MFC >> OnIdle and UI thread
Why do you have this scenario? On_UPDATE_COMMAND_UI is called
frequently whenever there is user action. Each time you would need to
switch thread context to the view and then back. This is prohibitively
expensive.
Most likely you have solved the problem incorrectly by creating view in
a separate thread.
-----------------
Ajay Kalra
EMail@HideDomain.com
|
| |
|
| |
 |
Joseph

|
Posted: Tue Aug 09 18:01:55 CDT 2005 |
Top |
MFC >> OnIdle and UI thread
If you put the view in a separate thread, you are begging for problems. Why bother? There
is no good reason to put a view in a separate thread.
If there is some long computation the view must do, it can do THAT in a separate thread.
Keep the view in the main GUI thread. After you fix this problem, your other problems
will probably go away.
joe
On Tue, 9 Aug 2005 10:27:47 +0800, "jeff" <EMail@HideDomain.com> wrote:
>Hi,
>
>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
>
Joseph M. Newcomer [MVP]
email: EMail@HideDomain.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
|
| |
|
| |
 |
jeff

|
Posted: Tue Aug 09 20:45:16 CDT 2005 |
Top |
MFC >> OnIdle and UI thread
The reason that I want to put the view in a thread is the view hosts a third
party Activex control which may perform long time operation. Doesn't it make
sense? or there is even better way to do it?
Thanks
Jeff
"Joseph M. Newcomer" <EMail@HideDomain.com> wrote in message
news:EMail@HideDomain.com...
> If you put the view in a separate thread, you are begging for problems.
> Why bother? There
> is no good reason to put a view in a separate thread.
>
> If there is some long computation the view must do, it can do THAT in a
> separate thread.
> Keep the view in the main GUI thread. After you fix this problem, your
> other problems
> will probably go away.
> joe
>
> On Tue, 9 Aug 2005 10:27:47 +0800, "jeff" <EMail@HideDomain.com> wrote:
>
>>Hi,
>>
>>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
>>
>
> Joseph M. Newcomer [MVP]
> email: EMail@HideDomain.com
> Web: http://www.flounder.com
> MVP Tips: http://www.flounder.com/mvp_tips.htm
|
| |
|
| |
 |
Ajay

|
Posted: Tue Aug 09 21:07:24 CDT 2005 |
Top |
MFC >> OnIdle and UI thread
In this case, the control should decide to launch a separate thread.
You shouldnt mess around with it.
----------
Ajay Kalra
EMail@HideDomain.com
|
| |
|
| |
 |
jeff

|
Posted: Wed Aug 10 00:46:02 CDT 2005 |
Top |
MFC >> OnIdle and UI thread
Is it the same? The control's UI part covers my view window. The same
problem, mainframe's OnIdle handler is not called when mouse pointer is
insider the control's UI (if it's in another thread).
Best
Jeff
"Ajay Kalra" <EMail@HideDomain.com> wrote in message
news:EMail@HideDomain.com...
> In this case, the control should decide to launch a separate thread.
> You shouldnt mess around with it.
>
> ----------
> Ajay Kalra
> EMail@HideDomain.com
>
|
| |
|
| |
 |
Joseph

|
Posted: Wed Aug 10 15:58:50 CDT 2005 |
Top |
MFC >> OnIdle and UI thread
If you create any window in thread B whose parent is in thread A (such as a view), you are
doomed. There is very little payback in trying to debug such a scenario, because it means
you are only debugging today's bug. Tomorrow's bug will be different. And there *will* be
a bug tomorrow, just a different one. You can play this game for many years.
If you have an ActiveX control that is so poorly done that it does long computations in
the GUI thread, you are basically hosed. There is no architecture that will solve this if
the ActiveX control has any visible manifestation, which you suggest it has.
joe
On Wed, 10 Aug 2005 13:46:02 +0800, "jeff" <EMail@HideDomain.com> wrote:
>Is it the same? The control's UI part covers my view window. The same
>problem, mainframe's OnIdle handler is not called when mouse pointer is
>insider the control's UI (if it's in another thread).
>
>Best
>
>Jeff
>"Ajay Kalra" <EMail@HideDomain.com> wrote in message
>news:EMail@HideDomain.com...
>> In this case, the control should decide to launch a separate thread.
>> You shouldnt mess around with it.
>>
>> ----------
>> Ajay Kalra
>> EMail@HideDomain.com
>>
>
Joseph M. Newcomer [MVP]
email: EMail@HideDomain.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
|
| |
|
| |
 |
jeff

|
Posted: Wed Aug 10 21:35:04 CDT 2005 |
Top |
MFC >> OnIdle and UI thread
There is an example of this kind of app. The new beta version of IE7. The
mainframe and webpage window are in different thread.
"Joseph M. Newcomer" <EMail@HideDomain.com> wrote in message
news:EMail@HideDomain.com...
> If you create any window in thread B whose parent is in thread A (such as
> a view), you are
> doomed. There is very little payback in trying to debug such a scenario,
> because it means
> you are only debugging today's bug. Tomorrow's bug will be different. And
> there *will* be
> a bug tomorrow, just a different one. You can play this game for many
> years.
>
> If you have an ActiveX control that is so poorly done that it does long
> computations in
> the GUI thread, you are basically hosed. There is no architecture that
> will solve this if
> the ActiveX control has any visible manifestation, which you suggest it
> has.
> joe
> On Wed, 10 Aug 2005 13:46:02 +0800, "jeff" <EMail@HideDomain.com> wrote:
>
>>Is it the same? The control's UI part covers my view window. The same
>>problem, mainframe's OnIdle handler is not called when mouse pointer is
>>insider the control's UI (if it's in another thread).
>>
>>Best
>>
>>Jeff
>>"Ajay Kalra" <EMail@HideDomain.com> wrote in message
>>news:EMail@HideDomain.com...
>>> In this case, the control should decide to launch a separate thread.
>>> You shouldnt mess around with it.
>>>
>>> ----------
>>> Ajay Kalra
>>> EMail@HideDomain.com
>>>
>>
>
> Joseph M. Newcomer [MVP]
> email: EMail@HideDomain.com
> Web: http://www.flounder.com
> MVP Tips: http://www.flounder.com/mvp_tips.htm
|
| |
|
| |
 |
Joseph

|
Posted: Thu Aug 11 09:41:59 CDT 2005 |
Top |
MFC >> OnIdle and UI thread
And have you tried using Spy++ to see the relationship of the windows? I don't have it,
but I'll guess that the sort of relationship of a doc/view architecture isn't there.
Probably implements menu items by cross-thread PostMessage, for example. And besides, it
is not document/view architecture, so anything it does is probably quite ad hoc tuned to
this problem, and would not generalize to doc/view architectures where there is extremely
tight coupling.
joe
On Thu, 11 Aug 2005 10:35:04 +0800, "jeff" <EMail@HideDomain.com> wrote:
>There is an example of this kind of app. The new beta version of IE7. The
>mainframe and webpage window are in different thread.
>
>"Joseph M. Newcomer" <EMail@HideDomain.com> wrote in message
>news:EMail@HideDomain.com...
>> If you create any window in thread B whose parent is in thread A (such as
>> a view), you are
>> doomed. There is very little payback in trying to debug such a scenario,
>> because it means
>> you are only debugging today's bug. Tomorrow's bug will be different. And
>> there *will* be
>> a bug tomorrow, just a different one. You can play this game for many
>> years.
>>
>> If you have an ActiveX control that is so poorly done that it does long
>> computations in
>> the GUI thread, you are basically hosed. There is no architecture that
>> will solve this if
>> the ActiveX control has any visible manifestation, which you suggest it
>> has.
>> joe
>> On Wed, 10 Aug 2005 13:46:02 +0800, "jeff" <EMail@HideDomain.com> wrote:
>>
>>>Is it the same? The control's UI part covers my view window. The same
>>>problem, mainframe's OnIdle handler is not called when mouse pointer is
>>>insider the control's UI (if it's in another thread).
>>>
>>>Best
>>>
>>>Jeff
>>>"Ajay Kalra" <EMail@HideDomain.com> wrote in message
>>>news:EMail@HideDomain.com...
>>>> In this case, the control should decide to launch a separate thread.
>>>> You shouldnt mess around with it.
>>>>
>>>> ----------
>>>> Ajay Kalra
>>>> EMail@HideDomain.com
>>>>
>>>
>>
>> Joseph M. Newcomer [MVP]
>> email: EMail@HideDomain.com
>> Web: http://www.flounder.com
>> MVP Tips: http://www.flounder.com/mvp_tips.htm
>
Joseph M. Newcomer [MVP]
email: EMail@HideDomain.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
|
| |
|
| |
 |
Joseph

|
Posted: Thu Aug 11 12:08:36 CDT 2005 |
Top |
MFC >> OnIdle and UI thread
I should point out that by being *extremely* careful, the cross-thread messaging problem
can be dealt with by creating structures of windows for which this is not possible.
However, MFC makes a single-thread assumption about the frame/doc/view architecture and
makes no pretensions about trying to be as careful as would be needed.
joe
On Thu, 11 Aug 2005 10:41:59 -0400, Joseph M. Newcomer <EMail@HideDomain.com> wrote:
>And have you tried using Spy++ to see the relationship of the windows? I don't have it,
>but I'll guess that the sort of relationship of a doc/view architecture isn't there.
>Probably implements menu items by cross-thread PostMessage, for example. And besides, it
>is not document/view architecture, so anything it does is probably quite ad hoc tuned to
>this problem, and would not generalize to doc/view architectures where there is extremely
>tight coupling.
> joe
>
>On Thu, 11 Aug 2005 10:35:04 +0800, "jeff" <EMail@HideDomain.com> wrote:
>
>>There is an example of this kind of app. The new beta version of IE7. The
>>mainframe and webpage window are in different thread.
>>
>>"Joseph M. Newcomer" <EMail@HideDomain.com> wrote in message
>>news:EMail@HideDomain.com...
>>> If you create any window in thread B whose parent is in thread A (such as
>>> a view), you are
>>> doomed. There is very little payback in trying to debug such a scenario,
>>> because it means
>>> you are only debugging today's bug. Tomorrow's bug will be different. And
>>> there *will* be
>>> a bug tomorrow, just a different one. You can play this game for many
>>> years.
>>>
>>> If you have an ActiveX control that is so poorly done that it does long
>>> computations in
>>> the GUI thread, you are basically hosed. There is no architecture that
>>> will solve this if
>>> the ActiveX control has any visible manifestation, which you suggest it
>>> has.
>>> joe
>>> On Wed, 10 Aug 2005 13:46:02 +0800, "jeff" <EMail@HideDomain.com> wrote:
>>>
>>>>Is it the same? The control's UI part covers my view window. The same
>>>>problem, mainframe's OnIdle handler is not called when mouse pointer is
>>>>insider the control's UI (if it's in another thread).
>>>>
>>>>Best
>>>>
>>>>Jeff
>>>>"Ajay Kalra" <EMail@HideDomain.com> wrote in message
>>>>news:EMail@HideDomain.com...
>>>>> In this case, the control should decide to launch a separate thread.
>>>>> You shouldnt mess around with it.
>>>>>
>>>>> ----------
>>>>> Ajay Kalra
>>>>> EMail@HideDomain.com
>>>>>
>>>>
>>>
>>> Joseph M. Newcomer [MVP]
>>> email: EMail@HideDomain.com
>>> Web: http://www.flounder.com
>>> MVP Tips: http://www.flounder.com/mvp_tips.htm
>>
>
>Joseph M. Newcomer [MVP]
>email: EMail@HideDomain.com
>Web: http://www.flounder.com
>MVP Tips: http://www.flounder.com/mvp_tips.htm
Joseph M. Newcomer [MVP]
email: EMail@HideDomain.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
|
| |
|
| |
 |
| |
 |
Index ‹ Visual Studio ‹ MFC |
- Next
- 1
- 2
- 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
- 3
- 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
- 4
- 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
- 5
- 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
- 6
- 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?
- 7
- 8
- 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?
- 9
- 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
- 10
- 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
- 11
- 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)
- 12
- 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
- 13
- 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
- 14
- 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
- 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)
|
|
|