How to subclass an MFC window?

Is there any easy way of overriding the responses to some messages to a 
CWnd-derived object buried deep within MFC?

One reason for the question is:

In the old days CMainFrame was derived from CMDIFrameWnd and this had a 
member

HWND m_hWndMDIClient;

To draw the background of this window I used to do a

SubclassWindow( )

on it, and with my own CWnd-derived object, respond to WM_ERASEBKGND 
messages.

Nowadays CMainFrame is derived from CMDIFrameWndEx and this has a member

CMDIClientAreaWnd m_wndClientArea;

and (I think) because a CWnd object already exists for the MDI client area, 
then SubclassWindow() doesn't work on it.

A second reason is that CMFCToolBar etc come with a customisation property 
sheet, and I am considering what I might do to override one of its property 
pages.

[I used to think that I knew MFC quite well - but all these new classes have 
thrown me somewhat!]

Dave
-- 
David Webber
Mozart Music Software
http://www.mozart.co.uk
For discussion and support see
http://www.mozart.co.uk/mozartists/mailinglist.htm



 

0
David
6/25/2010 3:14:02 PM
vc.mfc 33608 articles. 0 followers. Follow

9 Replies
8080 Views

Similar Articles

[PageSpeed] 26

>Nowadays CMainFrame is derived from CMDIFrameWndEx and this has a member
>
>CMDIClientAreaWnd m_wndClientArea;
>
>and (I think) because a CWnd object already exists for the MDI client area, 
>then SubclassWindow() doesn't work on it.

I wonder if you can handle the message some other way - perhaps in the
application's PreTranslateMessage handler?

Dave
0
David
6/25/2010 3:54:23 PM

"David Lowndes" <DavidL@example.invalid> wrote in message 
news:44k926hsb0voea68aeerl1r2vdq21i9btc@4ax.com...

>>Nowadays CMainFrame is derived from CMDIFrameWndEx and this has a member
>>
>>CMDIClientAreaWnd m_wndClientArea;
>>
>>and (I think) because a CWnd object already exists for the MDI client 
>>area,
>>then SubclassWindow() doesn't work on it.
>
> I wonder if you can handle the message some other way - perhaps in the
> application's PreTranslateMessage handler?

Sounds like a plausible idea for one message for that particular window - 
thanks.

But it sounds pretty horrible for a whole property page and all its 
controls.    BUT.....

Please forgive me if I think aloud here, as something might be dawning on me 
in real time as I type.

The App Wizard has given me:

void CMainFrame::OnViewCustomize()
{
  CMFCToolBarsCustomizeDialog* pDlgCust
        = new CMFCToolBarsCustomizeDialog(this, TRUE);
  pDlgCust->EnableUserDefinedToolbars();
  pDlgCust->Create();
}

so I can derive a class from CMFCToolBarsCustomizeDialog, and use that 
instead.

This is a property sheet with a number of property pages, including

  CMFCToolBarsKeyboardPropertyPage*  m_pKeyboardPage;

which allows the user to set a new keyboard shortcut.   No whilst I can't 
easily get at the property *page*,  the property *sheet* (which I *can* 
subclass) has lots of virtual members, including

    virtual BOOL OnAssignKey( ACCEL *pAccel ) { return TRUE; }

It *looks* like this gets called with the newly selected accelerator, and I 
can do what I want with it and return FALSE to tell MFC to ignore it!

This is looking very promising!!!!!!!!

Background:
Shortcut keys like ^ > + - are very useful mnemonics for music applications. 
Equally Ctrl+> etc are very useful shortcuts.
But I want it to appear as Ctrl+> on the menu, and not Ctrl+Shift+.
And I want to define these shortcuts for all national keyboards (even if > 
isn't Shift+.)
Accelerators are not up to the job, so I rolled my own method, built into 
WM_KEYDOWN and WM_CHAR processing.  Maybe I *will* be able to integrate it 
with the new customisable toolbars!!!!
A nice thought on which to end the week (especially as I'm out all weekend 
playing on bandstands.)

Dave
-- 
David Webber
Mozart Music Software
http://www.mozart.co.uk
For discussion and support see
http://www.mozart.co.uk/mozartists/mailinglist.htm

 

0
David
6/25/2010 5:30:15 PM
This is remarkably ugly, but something like this should work...

First, have a window subclass that you want.  I'll call it CMySubclass

void CMyApp::RedrawClientArea()
   {
    CMySublcass w;
    w.Attach(m_wndClientArea.Detach());
    w->Invalidate();
    w->UpdateWindow();
    m_wndClientArea.Attach(w.Detach());
   }

Overall, this is pretty gross.  Also, I have not figured out quite where you would need to
call this, but I'd suspect this is one of the interesting uses of PreTranslateMessage,
looking for a WM_PAINT directed to the client area (in that case, the Invalidate() would
not be required)
				joe

On Fri, 25 Jun 2010 16:14:02 +0100, "David Webber" <dave@musical-dot-demon-dot-co.uk>
wrote:

>Is there any easy way of overriding the responses to some messages to a 
>CWnd-derived object buried deep within MFC?
>
>One reason for the question is:
>
>In the old days CMainFrame was derived from CMDIFrameWnd and this had a 
>member
>
>HWND m_hWndMDIClient;
>
>To draw the background of this window I used to do a
>
>SubclassWindow( )
>
>on it, and with my own CWnd-derived object, respond to WM_ERASEBKGND 
>messages.
>
>Nowadays CMainFrame is derived from CMDIFrameWndEx and this has a member
>
>CMDIClientAreaWnd m_wndClientArea;
>
>and (I think) because a CWnd object already exists for the MDI client area, 
>then SubclassWindow() doesn't work on it.
>
>A second reason is that CMFCToolBar etc come with a customisation property 
>sheet, and I am considering what I might do to override one of its property 
>pages.
>
>[I used to think that I knew MFC quite well - but all these new classes have 
>thrown me somewhat!]
>
>Dave
Joseph M. Newcomer [MVP]
email: newcomer@flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
0
Joseph
6/26/2010 9:53:55 PM
"Joseph M. Newcomery" <newcomer@flounder.com> wrote in message 
news:j2qc26pnsge8f50k0c8jatcst7ae6n93ii@4ax.com...

> This is remarkably ugly, but something like this should work...
>
> First, have a window subclass that you want.  I'll call it CMySubclass
>
> void CMyApp::RedrawClientArea()
>   {
>    CMySublcass w;
>    w.Attach(m_wndClientArea.Detach());
>    w->Invalidate();
>    w->UpdateWindow();
>    m_wndClientArea.Attach(w.Detach());
>   }
>
> Overall, this is pretty gross.  Also, I have not figured out quite where 
> you would need to
> call this, but I'd suspect this is one of the interesting uses of 
> PreTranslateMessage,
> looking for a WM_PAINT directed to the client area (in that case, the 
> Invalidate() would
> not be required)

I vaguely wondered about something like that.  When it says that 
SubclassWindow only works for an HWND with no CWnd attached, the immediate 
question is why?   The next question is - well if we remove the attached 
CWnd, what then?

If we take your suggestion one step further:  suppose I derive CMySubclass 
from the CWnd-derived class which was attached in the first place.  Then I 
could detach the original and attach mine, and leave it attached, with no 
apparent penalties.   But if it is as easy as that, why doesn't 
SublassWindow just do it?   I guess the originally attached class may itself 
have some data necessary to the correct functioning of the window?

I feel I am walking on eggshells here.

Dave
-- 
David Webber
Mozart Music Software
http://www.mozart.co.uk
For discussion and support see
http://www.mozart.co.uk/mozartists/mailinglist.htm 

0
David
6/26/2010 10:39:23 PM
See below...
On Sat, 26 Jun 2010 23:39:23 +0100, "David Webber" <dave@musical-dot-demon-dot-co.uk>
wrote:

>
>"Joseph M. Newcomery" <newcomer@flounder.com> wrote in message 
>news:j2qc26pnsge8f50k0c8jatcst7ae6n93ii@4ax.com...
>
>> This is remarkably ugly, but something like this should work...
>>
>> First, have a window subclass that you want.  I'll call it CMySubclass
>>
>> void CMyApp::RedrawClientArea()
>>   {
>>    CMySublcass w;
>>    w.Attach(m_wndClientArea.Detach());
>>    w->Invalidate();
>>    w->UpdateWindow();
>>    m_wndClientArea.Attach(w.Detach());
>>   }
>>
>> Overall, this is pretty gross.  Also, I have not figured out quite where 
>> you would need to
>> call this, but I'd suspect this is one of the interesting uses of 
>> PreTranslateMessage,
>> looking for a WM_PAINT directed to the client area (in that case, the 
>> Invalidate() would
>> not be required)
>
>I vaguely wondered about something like that.  When it says that 
>SubclassWindow only works for an HWND with no CWnd attached, the immediate 
>question is why?   The next question is - well if we remove the attached 
>CWnd, what then?
****
When an HWND is placed in a CWnd-derived class (as the m_hWnd), an entryis made in the
handle map for that thread.  If, in the future, someone delivers an HWND (say, a message
is received), the way the methods are found is to use the handle map to obtain the CWnd*
pointer; in the case of message dispatching, from the CWnd* reference, the message map is
found.  Note that in general if the lookup fails, a *temporary* CWnd* reference is
generated, which is deleted in the CWinApp::OnIdle handler.  This is why there all all the
warnings about the CWnd* reference being temporary, and that it must not be stored.

So you cannot have an HWND mapped to two different CWnd-derived objects.  Hence the ugly
detach/attach code I gave;  the Attach code creates a new mapping of an newly-unattached
HWND.

Note that when an Attach (or SubclassWindow, which ultimately does an Attach) occurs, the
handle is looked up in the handle map.  It had better return an error coden (handle not
found), otherwise, there is an ASSSERT failure that there is an attempt to create a handle
map entry for an HWND which is already mapped.
*****
>
>If we take your suggestion one step further:  suppose I derive CMySubclass 
>from the CWnd-derived class which was attached in the first place.  Then I 
>could detach the original and attach mine, and leave it attached, with no 
>apparent penalties.   But if it is as easy as that, why doesn't 
>SublassWindow just do it?   I guess the originally attached class may itself 
>have some data necessary to the correct functioning of the window?
****
Actually, there are penalties; messages directed to that window will not be handled by the
class of the m_wndClientArea.  Presumably, this will not be healthy for your app.

And, as I indicated, SubclassWindow *cannot* work correctly if the HWND is already mapped!
It is considered erroneous to let SubclassWIndow map an HWND to some other CWnd* when it
is already mapped to a CWnd*.  So the code I showed (remember, I said it was gross and
ugly) creates a *temporary* remapping only in the cases where you need it.  Otherwise, the
mapping is left at the correct class for the new framework, so it continues to work
correctly.

				joe
****
>
>I feel I am walking on eggshells here.
>
>Dave
Joseph M. Newcomer [MVP]
email: newcomer@flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
0
Joseph
6/27/2010 12:31:32 AM
A friend who wrote an analogously ugly piece of code used "ASCII Art" to draw a
skull-and-crossbones in the function header comments, and quoted the Unix kernel's
context-swap code: "You are not meant to understand this"
					joe
On Sat, 26 Jun 2010 23:39:23 +0100, "David Webber" <dave@musical-dot-demon-dot-co.uk>
wrote:

>
>"Joseph M. Newcomery" <newcomer@flounder.com> wrote in message 
>news:j2qc26pnsge8f50k0c8jatcst7ae6n93ii@4ax.com...
>
>> This is remarkably ugly, but something like this should work...
>>
>> First, have a window subclass that you want.  I'll call it CMySubclass
>>
>> void CMyApp::RedrawClientArea()
>>   {
>>    CMySublcass w;
>>    w.Attach(m_wndClientArea.Detach());
>>    w->Invalidate();
>>    w->UpdateWindow();
>>    m_wndClientArea.Attach(w.Detach());
>>   }
>>
>> Overall, this is pretty gross.  Also, I have not figured out quite where 
>> you would need to
>> call this, but I'd suspect this is one of the interesting uses of 
>> PreTranslateMessage,
>> looking for a WM_PAINT directed to the client area (in that case, the 
>> Invalidate() would
>> not be required)
>
>I vaguely wondered about something like that.  When it says that 
>SubclassWindow only works for an HWND with no CWnd attached, the immediate 
>question is why?   The next question is - well if we remove the attached 
>CWnd, what then?
>
>If we take your suggestion one step further:  suppose I derive CMySubclass 
>from the CWnd-derived class which was attached in the first place.  Then I 
>could detach the original and attach mine, and leave it attached, with no 
>apparent penalties.   But if it is as easy as that, why doesn't 
>SublassWindow just do it?   I guess the originally attached class may itself 
>have some data necessary to the correct functioning of the window?
>
>I feel I am walking on eggshells here.
>
>Dave
Joseph M. Newcomer [MVP]
email: newcomer@flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
0
Joseph
6/27/2010 12:33:40 AM
"Joseph M. Newcomer" <newcomer@flounder.com> wrote in message 
news:dc6d26psjoevppsmkueotlvhiq7o78h3i5@4ax.com...

>>I vaguely wondered about something like that.  When it says that
>>SubclassWindow only works for an HWND with no CWnd attached, the immediate
>>question is why?   The next question is - well if we remove the attached
>>CWnd, what then?
> ****
>
> [Can't attach an HWND to two CWnds]....

Yes I can see this - replacing the CWnd would be the only option.

> Actually, there are penalties; messages directed to that window will not 
> be handled by the
> class of the m_wndClientArea.  Presumably, this will not be healthy for 
> your app.

But if I derived my window class from CMDIClientAreaWnd then presumably the 
only danger would be that any data members it had would be different from 
the original  CMDIClientAreaWnd m_wndClientArea.

Still maybe that's danger enough.

> And, as I indicated, SubclassWindow *cannot* work correctly if the HWND is 
> already mapped!
> It is considered erroneous to let SubclassWIndow map an HWND to some other 
> CWnd* when it
> is already mapped to a CWnd*.  So the code I showed (remember, I said it 
> was gross and
> ugly) creates a *temporary* remapping only in the cases where you need it. 
> Otherwise, the
> mapping is left at the correct class for the new framework, so it 
> continues to work
> correctly.

Yes I realise that.  I think your 'gross and ugly' is my 'walking on 
eggshells'.  :-)

Dave
-- 
David Webber
Mozart Music Software
http://www.mozart.co.uk
For discussion and support see
http://www.mozart.co.uk/mozartists/mailinglist.htm
 

0
David
6/27/2010 9:31:59 AM
On Jun 25, 5:14=A0pm, "David Webber" <d...@musical-dot-demon-dot-co.uk>
wrote:
> Is there any easy way of overriding the responses to some messages to a
> CWnd-derived object buried deep within MFC?
>
> One reason for the question is:
>
> In the old days CMainFrame was derived from CMDIFrameWnd and this had a
> member
>
> HWND m_hWndMDIClient;
>
> To draw the background of this window I used to do a
>
> SubclassWindow( )
>
> on it, and with my own CWnd-derived object, respond to WM_ERASEBKGND
> messages.

How about just putting a window of your own into m_wndClientArea and
doing your drawing in that, then?

Goran.
0
Goran
7/1/2010 11:25:12 AM

"Goran" <goran.pusic@gmail.com> wrote in message 
news:a18e04e3-fa94-40a3-a651-ba96b83817b6@k39g2000yqb.googlegroups.com...
> On Jun 25, 5:14 pm, "David Webber" <d...@musical-dot-demon-dot-co.uk>
> wrote:

>> Is there any easy way of overriding the responses to some messages to a
>> CWnd-derived object buried deep within MFC?
>>
>...
>
> How about just putting a window of your own into m_wndClientArea and
> doing your drawing in that, then?

Unfortunately the m_wndClientArea being difficult to get at, I suspect it 
would be diificult to give it children.    Surely getting at its 
WM_ERASEBKGD should be easier?   But thanks for the idea - a bit of lateral 
thought is always welcome :-)

Dave

-- 
David Webber
Mozart Music Software
http://www.mozart.co.uk
For discussion and support see
http://www.mozart.co.uk/mozartists/mailinglist.htm 

0
David
7/1/2010 5:55:23 PM
Reply:

Similar Artilces:

Launching Excel by opening an .xls file via Windows Explr
I have Excel 2002 SP-2 installed. When I open an .xls file via Windows Explorer it takes at least 20 seconds to open Excel and about another 5-10 to open the .xls file. The ..xls file can be as small as 26K and still it takes 30 seconds or so to open. However, if I open Excel first (it takes less than five seconds to launch Excel) and then open the .xls file using Excel, then the file opens almost instantly. Any ideas on why this is the case? Thanks Hi Kevin Read this pages to solve your problem Opening/Saving Bottlenecks (Charles Williams) http://www.decisionmodels.com/optspeedd.htm#...

how do I freeze colums & rows without the windows button?
Excel 2003 does not have the icon "window", to freeze and unfreeze rows and colums. Is there an alternate way to do this process? Hi AFAIK this icon was never a standard part of any of the toolbars in any version - however you can get to the feature under window / freeze pane menu option or you can add the icon to your toolbars and use this. To add the icon - choose view / toolbars / customize from the menu - choose the commands tab - choose the windows and help category - scroll down the right hand side until you see the icon for freeze panes - click on it and drag it to one...

MFC in Managed C++ Application
Hi, I M new in VC++ 7.0 I want to know whether we can use standard MFC classes in "Managed C++ applications" type projects for VC++ 7.0 Currently, the framework created by "Managed C++ Application" for VC++ projects does not supports usage of common MFC classes like CString. Do, I have to include some header to use MFC classes ? Thanks in advance for the response. Shadab. Managed C++ has its own string classes. To create applications with managed c++ use the "windows forms", or dig around the net because there is a way to integrate MC++ with normal code, ...

Window Service
Hi all, I have created a NT service ( in vc++ 6.0) which can run my prog. as service. My problem is that my prog. should run when a user logs in and take user-id for its working and stop as soon as the user log off. Can anybody help me in solving this problem. Any APIs ? Thanks Suriya Hi, If you just want to run your program only when your user logsin in and want to stop working when it logs off, why do you want to make a service ?? it should just be put in start up or in registry with run folder.. No need to develop a service.. ============== Regards, Jigar Mehta "Suriya" &l...

Word does not remember position of window
Version: 2008 Operating System: Mac OS X 10.6 (Snow Leopard) Processor: Intel I have just installed office:mac 2008 on my new iMac. Exept, that Word does not remember the position of the window for allready saved documents, everything works OK. According to some comment I found in the forum, I edited a script to size and also position the active window. No problem with this script. At reopening the saved documentm the size of the window is correct but it is always positioned at the upper left corner. <br> All other office applications do remember the last position of the window. &l...

User defined fields not showing on window
I am in the field sevice module looking at the contract screen. I have given the user defined field a name but it does not show on the screen. Is there something I am not doing to get the user defined fields to show on the contract screen. Kevin R Pittman Trek Equipment Corp TrekIT, I am not quite sure, where you setup the Names for the User-Defined Labels. But make sure you entered the Names in the form "Contract Setup - Contracts" which has to be accessed from the following path: Microsoft Dynamics GP -> Tools -> Setup -> Project -> Contract Setup -> Contra...

Using the lookup window in a custom form?
Hi, I am writing a custom web form that I am opening within the ms crm web application. I need to lookup a contact and populate a field on my webform with the selected contact from the lookup form. I would rather not reinvent the wheel, is it possible to use the standard MS CRM lookup records web form and return data from it to my custom form? TIA ...

Opening excel in a separate windows
I need help .... is there a setting that you can change so that if you open excel 2 times it opens in 2 separate windows... any help would be appreciated .... sure there is... in your menu, go to Tools -> Options Choose the "View"-tab and check "Windows in Taskbar" (upper right corner of the window). Every new workbook you open, will be opened in a separate "window" (no need to open the application twice). Regards, Alex >-----Original Message----- >I need help .... is there a setting that you can change so >that if you open excel 2 times...

Getting Back To Original Dialog WIndow
I have a dialog app that has a welcome screen with 2 buttons (I relabelled the Ok and the Cancel buttons, where when either is clicked, the initial modal window is closed and a new dialog window comes up). But, I want an option on the second wondows that allows the user to go back to that original welcome screen. I'm not sure how to do it. I essentially want to start over, as if the executable file was just started. I can't really subclass the main window in the secondary windows and re-create the initial dialog window, can I? The secondary windows are already a sub-calss of the f...

How do i get rid of the updating now window in 2005?
Whenever I tell money to update my online info the updating now windows pops up I always have to hit hide to get rid of it. The dont show this during updates check box does not seem to have and effect. Is this a bug from when I upgraded 2004 to 2005? bug "Jim" <razerviper-news@yahoo.com> wrote in message news:6_udnUBp7eqEUCzcRVn-qA@comcast.com... > Whenever I tell money to update my online info the updating now windows > pops up I always have to hit hide to get rid of it. The dont show this > during updates check box does not seem to have and effect. Is thi...

MFC and databases
Can anyone recommend any good examples, websites, books or other resources on how to get MFC to talk to databases? You should look at codeguru and codeproject for this. For ODBC, see this: http://www.codeproject.com/database/TemplateDB.asp MFC ships some samples related to database as well. You can also use ADO.Net in MFC if you want to go the managed way(managed cpp). ----------- Ajay Kalra ajaykalra@yahoo.com ...

using a modeless WinForms "application" from MFC
I'm in the process of adding a bunch of new .NET functionality to a (poorly behaved) legacy MFC application. One of the things I'm adding is a "source code editor" (ala VBA): the window should minimize/restore separately from the main application, have its own menu/toolbar, etc. The first approach was straight-forward enough: create the "application" as a Form and use it as a modeless dialog. However, things didn't work right with menu keyboard accelerators and the like (Ctrl-C, Alt-X, F1), apparently a result of the main MFC application grabbing them. ...

windows 2000 outlook (not express) help function
At some point - probably in a service pack - I lost outlook help. The only thing that displays now is a page saying "What's new in Outlook 2000" and then a list of topics with the heading "What do you want to read about". I would llike to recover a normal help file with an index so that I can actually use the help function. I spent some time this morning trying to get outlook help for a "Vcard" - to no avail. Did MS really do away with the normal help function for outlook 2000 - or have I screwed something up? Any Help will be appreciated (no pun intended...

Office 2008 is not compatible with Windows Mobile 5
Hi<br> <br> I have just installed office 2008 and play around with excel. I save one document to format 'office 97 - 2004'. However, I am unable to open the file from my Palm Treo 750 using Windows Mobile 2005. Why is that?<br> <br> Eddy Hi Eddy: Thanks for adding your name: makes this place much more friendly for all of us :-) It depends on what you had in the spreadsheet. Even though Windows Mobile 5 can allegedly read .xls, the truth is "Only if they are small,, and contain only numbers". Anything to do with pictures is going to die. Hope this...

Windows Mail
We've just moved and are getting cable internet service from same provider (Cogeco), but with new password. I can't get on Windows Mail, but can go to my Internet provider for email service. This message keeps popping up: Account: 'pop.cogeco.ca', Server: 'pop.cogeco.ca', Protocol: POP3, Server Response: '-ERR unknown command', Port: 110, Secure(SSL): No, Server Error: 0x800CCC90, Error Number: 0x800CCC18 Any help most appreciated. Windows Mail is more convenient,(if I could get it!!) Thanks, BillF "BillF" <BillF@discussions.m...

Extender-Create a new data entry window
Is it possible to create a new extender form or window (not sure of the terminology) to enter data into Dynamics? Specifically the Sales Forecast Window in Manufacturing is terrible for entering data, everytime you move to the right, it the scrolling window jumps back to the top and you have to find the item again. Anyway, I would like a new window to enter a sales forecast, is this possible? thanks -- Doug Unfortunately Extender data is stored in Extender tables and cannot be stored in the Sales Forecast tables. I agree with you that the data entry screen is horrible. I am tal...

subclassing CComboBox
compiler: VC++ 6.0 SP 6, running XP Pro SP 2. I subclassed CComboBox into CMyComboBox, then setup up event handlers for several of the reflected events -- one being CBN_CLOSEUP reflected event. I have an object of type CMyComboBox in an MFC program, which also needs to catch the CBN_CLOSEUP event. I used ClassWizard to create all event handlers. Problem: The event handler in CMyComboBox works ok, but the handler in the application program never gets called. Is there a way around this problem? I tried posting a message to the parent window but that didn't seem to work either (pare...

Developer toolkit & login window
Hi, I am learning how to use developer toolkit with GP. I had vb.net project and only thing i added is to open customer master window when great plains launches. When i launch great plains, i see a login window, afer entering username and password, Great Plains login window appears. I tried to put any username or password but constantly get the message that user is already logged into SQL?? any specific reason for this?? do i have to specify conneciton in vb project ?? thanks dhariwal You don't want to open any windows before the user logs into the system. That would cause the datab...

panel method (from Java) in MFC
Hi, another small question: is there an option / method in c++ together with MFC to create a panel (like in java) where all items of this area (panel = rectangle) are included? So that you are able to hide all these items if you hide this panel? Here`s a small description of the "panel" in java http://java.sun.com/docs/books/tutorial/uiswing/components/panel.html (The JPanel class provides general-purpose containers for lightweight components - like buttons and any other items from the tool menu in VS) best regards Hans It is clumsy to do, but not all that bad. ...

query run in subform and not in separate window
hi, i've created my form and have a query that runs within a subform. This is working fine except that the same query runs in a separate window also. How do I prevent the separate window from opening but only run within the subform. thanks heaps What do you mean by having "a query that runs within a subform"? What are you doing to run it? What kind of query is it? If it's a SELECT query, typically you'd set it as the RecordSource for the form being used as the subform, and not run it. If it's an Action query (INSERT INTO, DELETE, UPDATE, SELECT ... INTO), you ...

Updated to Windows XP SP2 and Hotmail does not work
I updated to Windows XP Service Pack 2 and now when I try to access my Hotmail account in Outlook I get the following error message: Unable to poll for new messages on your HTTP server. Account: 'Hotmail', Server: 'http://services.msn.com/svcs/hotmail/httpmail.asp ', Protocol: HTTPMail, Server Response: 'Redirected', Port: 0, Secure(SSL): No, Error Number: 0x80004005 Any help would be appreciated ...

Will my External Hard Drive work on Windows 7?
Hi all, Just picked up a Western Digital EHD for my current XP system. However, we may be upgrading soon to a 64-bit WIndows 7 system. The box (it was made before W7 was released) does not mention compatibility with Windows 7. Will is work anyway? davey1108 wrote: > Hi all, > > Just picked up a Western Digital EHD for my current XP system. > > However, we may be upgrading soon to a 64-bit WIndows 7 system. > > The box (it was made before W7 was released) does not mention compatibility > with Windows 7. Will is work anyway? As long as the ...

IE7 Instant Search Window
I recently migrated back to IE7 from IE8 and lost the instant search window.IE7 runs 100 percent but for the life of me I can't seem to find how to re-install the window.I can search from the address bar OK. I re-installed IE7 from the CD and same result. Any help is certainly appreciated. IE: Enable Google Search From Address Bar http://www.technipages.com/ie-enable-google-search-from-address-bar.html "Bob Jones" <rjones08@centurytel.net> wrote in message news:uNH7GH2cKHA.1064@TK2MSFTNGP04.phx.gbl... >I recently migrated back to IE7 from IE8 ...

Install Exchnge 2003 on windows server 2003 x64
Any idea if i install MS Exchange 2003 server with windows server 2003 x64? On Thu, 11 May 2006 08:22:50 +0800, "Muhamad Taufik Khasim" <Taufik@uniten.edu.my> wrote: >Any idea if i install MS Exchange 2003 server with windows server 2003 x64? > Nope. Not Supported. ...

Issue installing FRx 6.7 on Windows 2003
I am encountering an unhandled exception error when attempting the installation. The installation prompts for the language, I select English, then Next. The progress bar makes it all the way to the right of the next screen, then I get the above error. This is a brand new quad CPU Dell OS is base WIndows Server 2003 Enterprise, not SP1 Only installed software is: IIS 6.0 (FTP, WWW, MSMQ) CA ArcServe (backup software) SQL 2000 Enterprise, Analysis Services, both at SP3a WinZip Acrobat 6.0 Reader Hello, Can you give us the exact error message you're receiving (all words and numbers fro...