Problems adding member variables in my derived CWinApp class?

Hi,

I have problems adding member variables in my derived CWinApp class. Every 
time I try to access one variable I get an memory access violation? E.g. I 
have an integer that I initialise in the constructor of the class but every 
time I try to use the integer I get the memory error? I havn't found anything 
in documentation that states that derived classes cant have their own member 
variables....

Any suggestions?

Regards

/S

0
Sebbie (9)
8/23/2004 9:31:01 AM
vc.mfc 33608 articles. 0 followers. Follow

7 Replies
663 Views

Similar Articles

[PageSpeed] 26

Hi Scott,

No, I don't use any pointers. What I've tried is a simple integer and every 
time I try to use the integer (intInt) I get the memory violation error? See 
the declaration of my class below.

class CTimelogApp : public CWinApp
{
public:
   CTimelogApp();
   ~CTimelogApp();	  
protected:
   // Overrides
   // ClassWizard generated virtual function overrides 
   //{{AFX_VIRTUAL(CTimeloggApp)
public:
   virtual BOOL InitInstance();
   //}}AFX_VIRTUAL
   // Implementation
   //{{AFX_MSG(CTimeloggApp)
   // NOTE - the ClassWizard will add and remove member functions here.
   // DO NOT EDIT what you see in these blocks of generated code !
   //}}AFX_MSG
   DECLARE_MESSAGE_MAP()
private:
   int intInt;
};



"Scott McPhillips [MVP]" wrote:

> Sebbie wrote:
> > Hi,
> > 
> > I have problems adding member variables in my derived CWinApp class. Every 
> > time I try to access one variable I get an memory access violation? E.g. I 
> > have an integer that I initialise in the constructor of the class but every 
> > time I try to use the integer I get the memory error? I havn't found anything 
> > in documentation that states that derived classes cant have their own member 
> > variables....
> > 
> > Any suggestions?
> > 
> > Regards
> > 
> > /S
> > 
> 
> Derived classes can have their own member variables.  It sounds like you 
> are using an invalid pointer to the CWinApp object.
> 
> -- 
> Scott McPhillips [VC++ MVP]
> 
> 
0
Sebbie (9)
8/23/2004 12:35:01 PM
Sebbie wrote:
> Hi,
> 
> I have problems adding member variables in my derived CWinApp class. Every 
> time I try to access one variable I get an memory access violation? E.g. I 
> have an integer that I initialise in the constructor of the class but every 
> time I try to use the integer I get the memory error? I havn't found anything 
> in documentation that states that derived classes cant have their own member 
> variables....
> 
> Any suggestions?
> 
> Regards
> 
> /S
> 

Derived classes can have their own member variables.  It sounds like you 
are using an invalid pointer to the CWinApp object.

-- 
Scott McPhillips [VC++ MVP]

0
Scott
8/23/2004 1:18:20 PM
Sebbie wrote:
>>
>>Derived classes can have their own member variables.  It sounds like you 
>>are using an invalid pointer to the CWinApp object.
>>
> Hi Scott,
> 
> No, I don't use any pointers. What I've tried is a simple integer and every 
> time I try to use the integer (intInt) I get the memory violation error? See 
> the declaration of my class below.

I don't think you understood my response.  If you don't use any pointers 
then how do you access your CWinApp object?  Try this:

CTimelogApp* p = (CTimelogApp*)AfxGetApp();
p->intInt++;

p is a pointer to the object.  If you use an invalid pointer then you 
get an error when attempting to use it.

-- 
Scott McPhillips [VC++ MVP]

0
Scott
8/23/2004 2:34:02 PM
What does the debugger tell you? Show the line of code that fails. And note that under
some conditions, you might have a failure to properly rebuild (it doesn't happen all that
often) so does the bug persist after a "Rebuild All"? 

I always get suspicious about people who are adding member variables to CWinApp, since
either it is an attempt to map bad C programming style into C++ by simply moving global
variables into a C++ class, thus somehow making them "good" C++ style, or in the same
misguided approach, feeling that since global variables are "evil", putting variables that
would be legitimate global variables in CWinApp makes good C++ code,, thus merely forcing
you to introduce meaningless dependencies to your project file when a global variable
would actually be the correct solution (I've been known to have as many as six global
variables in a C++ program, which represent the global program state which is what the
program is manipulating).

But all you've said here is "My program has a bug, what's wrong?", which isn't all that
informative. Knowing what you did doesn't help us diagnose your code.

The reason you can't find anything in the documentation that states that derived classes
can't have their own member variables is because such a statement would be completely
nonsensical, since the purpose of derived classes is often to introduce their own
variables, which is desirable C++ programming style. You are doing something else wrong,
but in the absence of any meaningful description of the problem, it is hard to guess what
you messed up.
					joe

On Mon, 23 Aug 2004 02:31:01 -0700, Sebbie <Sebbie@discussions.microsoft.com> wrote:

>Hi,
>
>I have problems adding member variables in my derived CWinApp class. Every 
>time I try to access one variable I get an memory access violation? E.g. I 
>have an integer that I initialise in the constructor of the class but every 
>time I try to use the integer I get the memory error? I havn't found anything 
>in documentation that states that derived classes cant have their own member 
>variables....
>
>Any suggestions?
>
>Regards
>
>/S

Joseph M. Newcomer [MVP]
email: newcomer@flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
0
newcomer (15975)
8/23/2004 4:21:21 PM
Hi guys,

Thanks for your answers, sorry that I can't explain my problem better but 
I'll try once again.

When you create a new (Dialog based) MFC project using the wizard in Visual 
Studio you get a skeleton with classes. One of these classes is named 
C<YourProjcet>App and is a derived class from CWinApp, I'm I right?

Now, what I have done is that in my derived class CTimeLogApp I want a 
pointer to another object of a class called CLogHandler since I want to log 
items of x, BUT the pointer I added in my CTimeLogApp failed every time I 
tried to use it, after a lot of debugging and asking around I still couldn't 
understand why the pointer generated the memory violation error so I removed 
the pointer and just added a simple integer ('intInt' below) in the class 
instead and that didn't work either, I get the same memory access violation 
every time I accessed the integer as well i.e. a member variable!!!??

So, my object of CTimeLogApp has an member variable that causes a memory 
violation every time I try to use it in my code!!! 

I have consulted a number of my collegues and they can't see anything wrong 
with the code I added....

Below is the declaration of my CWinApp derived class and the function that 
causes the failure(LogItem):

class CTimeLogApp : public CWinApp
{
public:
   CTimeLogApp();
   ~CTimeLogApp();	
   void LogItem(CString strOrdNb, float fltTime, COleDateTime oleDate);
protected:
   // Overrides
   // ClassWizard generated virtual function overrides
   //{{AFX_VIRTUAL(CTimeLoggApp)
public:
   virtual BOOL InitInstance();
   //}}AFX_VIRTUAL
   // Implementation
   //{{AFX_MSG(CTimeLoggApp)
   // NOTE - the ClassWizard will add and remove member functions here.
   //DO NOT EDIT what you see in these blocks of generated code !
   //}}AFX_MSG
   DECLARE_MESSAGE_MAP()
private:
   int intInt; //intInt is initialized to '0' in the constructor
};

void CTimeLogApp::LogItem(CString strOrdNb, float fltTime, COleDateTime 
oleDate)
{
   int i = intInt; // this failes!!!!
   TRACE (_T("%d"), i);
}

The error message I get is "Unhandled exception in Timelog.exe: 0xC0000005: 
Access Violation"

Hopefully this is a better explanaition.


Thanks

Sebastian

"Joseph M. Newcomer" wrote:

> What does the debugger tell you? Show the line of code that fails. And note that under
> some conditions, you might have a failure to properly rebuild (it doesn't happen all that
> often) so does the bug persist after a "Rebuild All"? 
> 
> I always get suspicious about people who are adding member variables to CWinApp, since
> either it is an attempt to map bad C programming style into C++ by simply moving global
> variables into a C++ class, thus somehow making them "good" C++ style, or in the same
> misguided approach, feeling that since global variables are "evil", putting variables that
> would be legitimate global variables in CWinApp makes good C++ code,, thus merely forcing
> you to introduce meaningless dependencies to your project file when a global variable
> would actually be the correct solution (I've been known to have as many as six global
> variables in a C++ program, which represent the global program state which is what the
> program is manipulating).
> 
> But all you've said here is "My program has a bug, what's wrong?", which isn't all that
> informative. Knowing what you did doesn't help us diagnose your code.
> 
> The reason you can't find anything in the documentation that states that derived classes
> can't have their own member variables is because such a statement would be completely
> nonsensical, since the purpose of derived classes is often to introduce their own
> variables, which is desirable C++ programming style. You are doing something else wrong,
> but in the absence of any meaningful description of the problem, it is hard to guess what
> you messed up.
> 					joe
> 
> On Mon, 23 Aug 2004 02:31:01 -0700, Sebbie <Sebbie@discussions.microsoft.com> wrote:
> 
> >Hi,
> >
> >I have problems adding member variables in my derived CWinApp class. Every 
> >time I try to access one variable I get an memory access violation? E.g. I 
> >have an integer that I initialise in the constructor of the class but every 
> >time I try to use the integer I get the memory error? I havn't found anything 
> >in documentation that states that derived classes cant have their own member 
> >variables....
> >
> >Any suggestions?
> >
> >Regards
> >
> >/S
> 
> Joseph M. Newcomer [MVP]
> email: newcomer@flounder.com
> Web: http://www.flounder.com
> MVP Tips: http://www.flounder.com/mvp_tips.htm
> 
0
Sebbie (9)
8/24/2004 6:29:01 AM
Hi again!

I have found the problem, the code calling the LogItem function had a 
uninitialized pointer to the theApp object, emabarrassing to admit but the 
symptoms were very strange...hmm

I would just like to thank you all for your concern in my problem!

/Sebastian

"Sebbie" wrote:

> Hi,
> 
> I have problems adding member variables in my derived CWinApp class. Every 
> time I try to access one variable I get an memory access violation? E.g. I 
> have an integer that I initialise in the constructor of the class but every 
> time I try to use the integer I get the memory error? I havn't found anything 
> in documentation that states that derived classes cant have their own member 
> variables....
> 
> Any suggestions?
> 
> Regards
> 
> /S
> 
0
Sebbie (9)
8/24/2004 7:13:02 AM
In all the years I've been writing dialog-based apps, I've never found a reason to add
anything to the app class. I tend to put everything in the dialog class, since there is no
benefit in putting them in the app class. 

But if you have a pointer which is not initialized in the constructor, it probably has
some completely useless value like DFDFDFDFDFDF or some similar value used by the
allocator to indicate uninitialized storage (CDCDCDCDCDCD is the other value; one means
released storage and one means uninitialized allocated storage, and I never remember
except when debugging which is which).

When you get an error like that, it is worth examining the pointer in question, and what
is being accessed. This could well be due to the fact that you have passed a NULL pointer
in to the method, e.g.,
	something->LogItem(...);
if something is NULL at the point of call, the first time you try to access a value, you
will get exactly the error you describe. 

The debugger should tell you the value of 'this'. I'll bet 'this' is 0. In that case, it
would be incredibly useful if you had shown the actual code involved in the call, which
you did not show.

But I deeply question why there is any value in putting this in the app at all. 
					joe

On Mon, 23 Aug 2004 23:29:01 -0700, Sebbie <Sebbie@discussions.microsoft.com> wrote:

>Hi guys,
>
>Thanks for your answers, sorry that I can't explain my problem better but 
>I'll try once again.
>
>When you create a new (Dialog based) MFC project using the wizard in Visual 
>Studio you get a skeleton with classes. One of these classes is named 
>C<YourProjcet>App and is a derived class from CWinApp, I'm I right?
>
>Now, what I have done is that in my derived class CTimeLogApp I want a 
>pointer to another object of a class called CLogHandler since I want to log 
>items of x, BUT the pointer I added in my CTimeLogApp failed every time I 
>tried to use it, after a lot of debugging and asking around I still couldn't 
>understand why the pointer generated the memory violation error so I removed 
>the pointer and just added a simple integer ('intInt' below) in the class 
>instead and that didn't work either, I get the same memory access violation 
>every time I accessed the integer as well i.e. a member variable!!!??
>
>So, my object of CTimeLogApp has an member variable that causes a memory 
>violation every time I try to use it in my code!!! 
>
>I have consulted a number of my collegues and they can't see anything wrong 
>with the code I added....
>
>Below is the declaration of my CWinApp derived class and the function that 
>causes the failure(LogItem):
>
>class CTimeLogApp : public CWinApp
>{
>public:
>   CTimeLogApp();
>   ~CTimeLogApp();	
>   void LogItem(CString strOrdNb, float fltTime, COleDateTime oleDate);
>protected:
>   // Overrides
>   // ClassWizard generated virtual function overrides
>   //{{AFX_VIRTUAL(CTimeLoggApp)
>public:
>   virtual BOOL InitInstance();
>   //}}AFX_VIRTUAL
>   // Implementation
>   //{{AFX_MSG(CTimeLoggApp)
>   // NOTE - the ClassWizard will add and remove member functions here.
>   //DO NOT EDIT what you see in these blocks of generated code !
>   //}}AFX_MSG
>   DECLARE_MESSAGE_MAP()
>private:
>   int intInt; //intInt is initialized to '0' in the constructor
>};
>
>void CTimeLogApp::LogItem(CString strOrdNb, float fltTime, COleDateTime 
>oleDate)
>{
>   int i = intInt; // this failes!!!!
>   TRACE (_T("%d"), i);
>}
>
>The error message I get is "Unhandled exception in Timelog.exe: 0xC0000005: 
>Access Violation"
>
>Hopefully this is a better explanaition.
>
>
>Thanks
>
>Sebastian
>
>"Joseph M. Newcomer" wrote:
>
>> What does the debugger tell you? Show the line of code that fails. And note that under
>> some conditions, you might have a failure to properly rebuild (it doesn't happen all that
>> often) so does the bug persist after a "Rebuild All"? 
>> 
>> I always get suspicious about people who are adding member variables to CWinApp, since
>> either it is an attempt to map bad C programming style into C++ by simply moving global
>> variables into a C++ class, thus somehow making them "good" C++ style, or in the same
>> misguided approach, feeling that since global variables are "evil", putting variables that
>> would be legitimate global variables in CWinApp makes good C++ code,, thus merely forcing
>> you to introduce meaningless dependencies to your project file when a global variable
>> would actually be the correct solution (I've been known to have as many as six global
>> variables in a C++ program, which represent the global program state which is what the
>> program is manipulating).
>> 
>> But all you've said here is "My program has a bug, what's wrong?", which isn't all that
>> informative. Knowing what you did doesn't help us diagnose your code.
>> 
>> The reason you can't find anything in the documentation that states that derived classes
>> can't have their own member variables is because such a statement would be completely
>> nonsensical, since the purpose of derived classes is often to introduce their own
>> variables, which is desirable C++ programming style. You are doing something else wrong,
>> but in the absence of any meaningful description of the problem, it is hard to guess what
>> you messed up.
>> 					joe
>> 
>> On Mon, 23 Aug 2004 02:31:01 -0700, Sebbie <Sebbie@discussions.microsoft.com> wrote:
>> 
>> >Hi,
>> >
>> >I have problems adding member variables in my derived CWinApp class. Every 
>> >time I try to access one variable I get an memory access violation? E.g. I 
>> >have an integer that I initialise in the constructor of the class but every 
>> >time I try to use the integer I get the memory error? I havn't found anything 
>> >in documentation that states that derived classes cant have their own member 
>> >variables....
>> >
>> >Any suggestions?
>> >
>> >Regards
>> >
>> >/S
>> 
>> Joseph M. Newcomer [MVP]
>> email: newcomer@flounder.com
>> Web: http://www.flounder.com
>> MVP Tips: http://www.flounder.com/mvp_tips.htm
>> 

Joseph M. Newcomer [MVP]
email: newcomer@flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
0
newcomer (15975)
8/24/2004 10:05:16 PM
Reply:

Similar Artilces:

Having problem of Outlook not receiving new e-mails
I have been using Outlook for over 1 year with Comcast Broadband. Suddenly last week, I received a message that Outlook 2000 was experiencing a problem when receiving new e-mails and was going to shut down. I re-opened Outlook and it looked different and then it asked for me set up a profile and I canceled it. But after that window coming up a couple of times after it shut down, I decided to put in a new name and then I could not get to my old e-mails and it acted like a new set up. Then I really got frustrated. I was eventaully able to get back to my old e-mails and have been able t...

Set a range from a variable location
I am using a loop function that will eventually select and activate a specific cell known as "TheCurrentCell." Once I reach that location I want to use that coordinate as the upper left area of a new range. Supposing that the end cell of my range is D1000, the Range selection would be something like Range(TheCurrentCell:D1000).select, however, I don't know the correct syntax to make this happen. Please help. Thank you. Use something like Range(Selection.Address & ":D1000").Select. "Troubled User" wrote: > I am using a loop function that will...

How to make a Add key disabled after adding one record unless
Hi, I have a form where I am adding records. There are two boxes where one has to put the lineitemnumber and another box where one has to put the description. Unless the above two boxes are filled in the Add command box need to be disabled. Now, the problem is after adding one record the Add button is enabled and I cannot disable it. I would appreciate any help to solve this. The error message is: The methos is not supported The following is the code: Private Sub cmdadd_Click() On Error GoTo Err_cmdadd_Click If (IsNull(Me.LineItemID) = True) Or (IsNull(Me.Description) = True) Then ...

An Outlook 2003 Problem
I just upgraded from Outlook 97 to Outlook 2003. However, when trying to reply, forward, and compose with Outlook 2003, I got this error message: "The messaging interface has returned an unknown error. If the problem persists, restart Outlook." The problem persisted. I restarted Outlook 2003, but it didn't help. Any suggestions? Thanks. How did you upgrade Outlook 2003 from Outlook 97? Anyway If you use Hotmail or MSN mail, check MSKB info below. You receive a "The messaging interface has returned an unknown error " error message when you try to use Outlook to...

Problems Converting Data from Quicken 2001 Deluxe to MS Money
Hello, I have a relatively new Compaq Desktop (2.5 GHz Celeron with 512 MB RAM). I have a Viewsonic Pocket PC and I wanted to use it to track my financial data so I purchased Money 2003 Standard. I tried several times to convert my Qucken Data (it's a big file--I've been using Quicken since 1995). My Quicken program is Quicken 2001 Deluxe. Anyway, the MS Money program started to convert and after a few minutes said: "Your Quicken file could not be converted. Money could not convert your Quicken file. You might have run out of disk space or system memory. Try closing othe...

Exchange Server 2000 Secuirty Setup problems
Dear I have apply wrong setting to our exchange server 2000 . The wrong setting as from exchange manager . mail store , I have apply everyone send as and receive as access right, the group included remote access via offline sync. This setting once apply , all user access other mailbox without apply access right. I have try disable this setting, after all local office user no problems, but a remote offline sync laptop user does not work . The error as below: Unable to display the folder. Microsoft Outlook could not access the specified folder location. The file C:\exchange\shawnb.ost cannot b...

CRM 4.0 Custom Report Filter Problem
I am using the Report Wizard to create a simple report. Report is using Quotes and Quote Products I have a custom field in Quote Products which is a bit field Yes-No When I use that field as a filter for report output, I get all records. The filter criteria appears to be ignored Is this an inherent problem with Report Wizard or Am I doing something wrong? Thanks. depends on your business logic and what you want to see. If you have three quotes: Quote-1 has three products, all with the custom field set to Yes Q2 has three products, two set to Yes, 1 to No Q3 has three products, all set...

Help! Problem Referencing Excel 2003 in VB.NET
I am using Visual Studio 2008 Express Edition to develop some VB.NET code that manipulates Excel files. I am developing on a Vista/Excel 2007 machine, but I need the code to work on an XP/2003 machine as well. I initially set a reference to the Microsoft Excel 12.0 Object Library and imported the Microsoft.Office.Interop.Excel namespace. This works great on the VIsta/Excel 2007 machine, but it does not work on 2003, which needs the 11.0 library. I get an error that says "Unhandled Exception . . . Could not file or assembly 'Microsoft.Office.Interop.Excel, Version 12.0.0....

Adding a certain text label in a excel chart
I am plotting in regularly basis a certain set of data in excel. Based on some data analysis this set of data has to be fitted to these equations: y = 1/x^a (1) and /or y = b/x^c (2) from data analysis, constants a, b and c are found and are placed lets say in cells A1, B1, C1. On my graph, I am putting then two small text labels where the real equation is displayed: smth. like: y = 1/ x^3.45 and / or y = 0.256 / x^3.12 The whole process is similar with excel curve fitting, when the “show equation on chart” is checked. Thank you in advance My question is: Can ...

Messenger emoticons
I have changed laptops and I did grab the old laptops custom emoticons folder (all in dt2 and id2 file endings.) But when i copy everything in the folder and add it to my new laptops custom emoticons folder... they get added (i.e. show up in the folder) but the images/gifs or names dont show up on the actual msn... *what gives*? Do I have to change the dt2 endings to gif or jpeg and go to "create" in msn for each of them to add them in? (I tried with one and it worked) Only problem is i have alot, like 203 dt2 files so changing the ending to .gif and adding each singu...

Duplicate Containers in AD after Exchange 2003 Migration
The scenario is: We migrated from an NT domain to a 2000 domain. Then about a year later we migrated from exchange 5.5 to exchange 2003. Once the migration was complete, we discovered that there were duplicate containers and OUs in "Active Directory Users and Computers" which were empty. For example, when we did the AD migration we created an OU hierarchy at the root of the domain. After the exchange migration we found a duplicate hierarchy structure under the Users container but it didnt actually contain any objects/information that was in the original OU structure. We don...

Duplicate personal folders problem
Hello all, I have a problem with Outlook 2003 and I hope someone can help me resolve it I imported a PST file from Outlook XP that was on a different machine, and now I have two versions of Personal Folders in my All Mail Folders list. They both have Deleted Items, Drafts, Inbox, Junk E-mail, Outbox, Sent Items and Search Folders in. One of them has an icon of a piece of paper with a clock to the top left and a house to the top right. The other one has an icon like a stack of files (like from a filing cabinet) They are clearly referencing the same thing, as the Deleted Items both have al...

Adding extra data options
Is there a way to customize CRM to allow for adding another heading? I would like to add a second field similar to topic and would like to call it type. Can you add extra data fileds and types in CRM 3.0? You can add extra data fields to an entity. Go to entities customization at setting area. -- Marco Amoedo Plain Concepts http://geeks.ms/blogs/marco/ "xxdcmast" escribió: > Is there a way to customize CRM to allow for adding another heading? I would > like to add a second field similar to topic and would like to call it type. > > Can you add extra data ...

Excel Problem #3
I have win2000 with Office 2000 in the network! When i try to rename one excel file my computer make restart. This hapening not to all files,and all files there are in the same folder in the network! What hapen,and what i can do so as to work out the problem? I have all the required permissions on that network folder. No one else has any of the files open. They are not shared workbooks. ...

Interesting Solver problem (Solver encounters an error)
Here's an interesting problem, I wonder if anyone has any thoughts o this. Recognize that my real problem is very complex (severa intermediate calculation including some iterative steps), but th problem I'm having seems similar (conceptually anyway) to this simpl problem. Given a data set: x,y 10,3.9 8,3.2 7,2.8 6,2.2 5,1.4 4.5,0.8 4,0.01 3.8,-0.4 3.6,-1 3.5,-1.4 3.4,-1.8 3.3,-2.4 3.2,-3.2 3.1,-4.6 3.05,-6 One could look at the data and say, "that looks like the curve y=ln(x) but with a different asymptote other than the y-axis and possibly scaling factor." So we choos...

Problems with MFC list controls
I have a large list control with many inventory control items displayed within. When someone single clicks on an item, it displays information about that item in another part of the dialog. I have a three-fold problem, the master list has multiple columns in it, in order to make the selection work properly, only column 0 can be selected, is there a way to make a valid row selection if you select an item using any of the other columns? Second issue is the highlight of the selection. Only column 0 in the list control will highlight, is there a way to make the entire row highlight when an...

Next button problems
I have a next button in a form that I have criteria for. I have a date field that has to be entered before going to another record. When I click the next button I get the pop up that says click update to continue but the form displays the next record instead of staying on the current record that needs updating. Here is the code that I am using. ____________________________________________________________________________________ Private Sub Command39_Click() If IsNull([Post Called Customer]) Then MsgBox "You must click the UPDATE button to continue!!!" Cancel = True End If On Erro...

Problem with message routing between EXCH2K and EX2K3
We are running a ver simply Exchange topology, with an Exchange 2000 single server (ServerA) acting as "dumb" Information Store. Incoming and outbound SMTP email is relayed through a Linux based SMTP host relay on the same subnet, which handles all domain lookups for mail routing. ServerA is configured to use to the Linux SMTP server as it's smart host. The domain is a native Windows 2003 AD topology. My problem is the following: I have recently added a new Exchange 2003 Server (ServerB) into our Exchange site topology. If I create a user (UserA) on ServerA and then do a...

Problem inserting cut range
I'm trying to cut a range then insert the cut range at a particular location. The code looks like this: Range("F5:G" & ActiveSheet.UsedRange.Rows.Count).Cut Range("D5").Insert(xlShiftToRight) However, when it reaches this point, I get an error saying "Cut method of Range class failed". I've tried changing the destination range so that it reads similar to the origin range, but that didn't help. Can someone help me get the syntax on this line correct? I've got several similar lines further down in the code. If I can fix thi...

Visio Printing Problem
I am trying to print a flowchart. The print view displays the complet flowchart. However, when I print the flowchart, the top half of th flowchart is omitted and the bottom half prints. Any problem solvin recommendations would be appreciated -- jqsandma ----------------------------------------------------------------------- jqsandman's Profile: http://www.officehelp.in/member.php?userid=661 View this thread: http://www.officehelp.in/showthread.php?t=136719 Posted from - http://www.officehelp.i this usually ends up as being "apply available software patches to visio" or &quo...

Attachment problems
Hi, Is there anyway to unlock outlook 2002's block on ".exe" files. I know these are Level1 blocks, but can't find a way to configure it. I have recieved an important program and need to run it. Thanks in advance Scott Try here: Opening .exe Attachments with the Outlook E-mail Security Update and Outlook 2002 http://www.slipstick.com/outlook/esecup/getexe.htm -- Nikki Peterson [MVP - Outlook] "Scott White" <ddltrade@hotmail.com> wrote in message news:OmVN4JVnDHA.1672@TK2MSFTNGP09.phx.gbl... Hi, Is there anyway to unlock outlook 2002's block on...

Anyone with good knowledge of CxImage class on CodeProject/CodeGuru ?
Hi, I am needing to display PNG files in my WinCE application. The ONLY thing I need is: 1- Load PNG files from RESOURCE (not from file, and I don't need to save). 2- Display PNG files (with transparency if possible) to a CDC 3- Get the data into a BITMAP, HBITMAP or CBitmap. With WinCE being limited, I am trying to strip CImage or CxImage to ONLY do the above. I do not need saving. I just need to LOAD and display and get it as a bitmap. I am having a very hard time doing this. The Decode function requires CImageIterator and it needs CImage again and it needs alot of other things. Can ...

A Strange Printing Problem
Our accounting department maintains an Excel file, updated in an onging process, converted to a PDF at month close, and distributed to our senior management. There are nine worksheets, seven behave normally, but two worksheets default to printing 2 copies. No macros, viruses, etc. Any suggestions on a fix will be appreciated. Paul I would try a different PDF converter. There are a # of free ones out there. It would be a simple and quick test to see if that was the problem. "PA" wrote: > Our accounting department maintains an Excel file, updated in an onging > process,...

Ipaq
A user where I work has had problems with his Ipaq serial connection 'going to sleep' over the last couple of weeks. Here are some further details: It's an Ipaq 3890 using ActiveSync 3.7 on a Windows NT4 workstation running Office 97. He synchronises mail of approx 1.5g , which includes Office attachments. The PDA has been working fine for over a year on ActiveSync 3.5, and there has been no software upgrades or changes on the users PC. There are no error reports in any way, and nothing is shown in the event viewer. I have already tried the following: Reinstalled ActiveSync 3.5 R...

MFC #define Problem
We've been using Visual C++ for at least two versions (VC++ 6.0, VC++ 7.0 .NET), but now we've upgraded to .NET 7.1.3088 and found that a macro define in shlobj.h includes the symbol NUM_POINTS. This generic name conflicts with a const declaration within the scope of a source file. Has anybody encountered this error? ...