Quest: Posting a message to update the NC area of tree ctrl...

I have a dlg app with one static(dark gray) ctrl the full size of the dlg as
a backdrop then I have several modeless dlgs as children(window children and
as class members obj) of the main dlg. Now everthing has been going great
and I wanted to add a new/open file button to open the common dlg thur
GetSaveFileName() and GetOpenFileName() inside the respected button's
handler and I got that working fine cause I have done it before but then the
button were on the main dlg and no modeless dlg were used. Now the problem
is when I get the code to continue on after the user sucessfully hit
Save(Open button is on hold of now) the code goes on to insert items into a
tree ctrl on another dlg then the buttons the open the common dlg and some
ctrl are are painted right. I have fix some of this by

//Code that Inserts and sets the first item of tree...
//The list is added to by the tree's selection change handler...

pMainDlg->OtherModelessDlg.treectrl.Invalidate(TRUE);
pMainDlg->OtherModelessDlg.listctrl.InvalidateRect(NULL, TRUE);

This fixes the list ctrl competely but only fixes the client area of the
tree ctrl so then I tried both...

//Above code here...
pMainDlg->OtherModelessDlg.treectrl.SendMessage(WM_NCPAINT, (WPARAM)1,
(LPARAM)0);
[and another test]
pMainDlg->OtherModelessDlg.treectrl.PostMessage(WM_NCPAINT, (WPARAM)1,
(LPARAM)0);

but nothing happen to the NC area...

Also I have done tests with...

ofn.hwndOwner = this->GetSafeHwnd(); //Was already setup from other
project...
[and another test]
ofn.hwndOwner = pMainDlg->GetSafeHwnd();

with no change in problem above...

Another test show that if I do...

if (GetSaveFileName(&ofn) == FALSE) return;
return;

and all ctrl are draw correctly...

So how can i update the NC area of the tree ctrl myself correctly inside the
button handler above to correctly paint the whole tree control...

Any help...


0
bj7lewis (91)
9/4/2003 5:53:39 PM
vc.mfc 33608 articles. 0 followers. Follow

1 Replies
814 Views

Similar Articles

[PageSpeed] 47

try to call
SetWindowPos(NULL,
0, 0, 0, 0,
SWP_FRAMECHANGED|SWP_DRAWFRAME|SWP_NOMOVE|SWP_NOSIZE|SWP_NOOWNERZORDER|SWP_NOZORDER);

-- Vladimir Khovstov


lewi wrote:
> I have a dlg app with one static(dark gray) ctrl the full size of the dlg as
> a backdrop then I have several modeless dlgs as children(window children and
> as class members obj) of the main dlg. Now everthing has been going great
> and I wanted to add a new/open file button to open the common dlg thur
> GetSaveFileName() and GetOpenFileName() inside the respected button's
> handler and I got that working fine cause I have done it before but then the
> button were on the main dlg and no modeless dlg were used. Now the problem
> is when I get the code to continue on after the user sucessfully hit
> Save(Open button is on hold of now) the code goes on to insert items into a
> tree ctrl on another dlg then the buttons the open the common dlg and some
> ctrl are are painted right. I have fix some of this by
> 
> //Code that Inserts and sets the first item of tree...
> //The list is added to by the tree's selection change handler...
> 
> pMainDlg->OtherModelessDlg.treectrl.Invalidate(TRUE);
> pMainDlg->OtherModelessDlg.listctrl.InvalidateRect(NULL, TRUE);
> 
> This fixes the list ctrl competely but only fixes the client area of the
> tree ctrl so then I tried both...
> 
> //Above code here...
> pMainDlg->OtherModelessDlg.treectrl.SendMessage(WM_NCPAINT, (WPARAM)1,
> (LPARAM)0);
> [and another test]
> pMainDlg->OtherModelessDlg.treectrl.PostMessage(WM_NCPAINT, (WPARAM)1,
> (LPARAM)0);
> 
> but nothing happen to the NC area...
> 
> Also I have done tests with...
> 
> ofn.hwndOwner = this->GetSafeHwnd(); //Was already setup from other
> project...
> [and another test]
> ofn.hwndOwner = pMainDlg->GetSafeHwnd();
> 
> with no change in problem above...
> 
> Another test show that if I do...
> 
> if (GetSaveFileName(&ofn) == FALSE) return;
> return;
> 
> and all ctrl are draw correctly...
> 
> So how can i update the NC area of the tree ctrl myself correctly inside the
> button handler above to correctly paint the whole tree control...
> 
> Any help...
> 
> 

0
vladimir (10)
9/4/2003 7:33:15 PM
Reply:

Similar Artilces:

Error Message: CS0117
When I use the Credential method in the CRM SDK, I will receive an error message: Error Message: CS0117: 'Object' does not contain a definition for 'Credential'. I also tried this way: object.Credential = new NetworkCredential(uid, pwd, domain) but still receive the same error message. May I know where goes wrong?Is it due to the setting in IIS?If yes, how to resolve it? For information, I developed my web form application at a remote computer. (.NET Framework v1.1) And then I copied this web form application to the CRM server v1.0. Did you add a reference to ...

Error message importing OFX file bank statement
I appreciate any suggestions on this. I have Money 2007 and downloaded a bank statement OFX file, but the following message keeps appearing: "The file you attempted to import appears to be invalid or contains corrupt data. Please download the file again. If the problem continues, contact your financial institution". I've already reinstalled Money, deleted the file and downloaded it again, and it stills persists. My bank told me the problem is not theirs...but Money's... Any ideas ? Marcus Moraes Im willing to bet it is the banks not formating the data correctly ...

looping message that fills up exchange priv1
Right, here we go.. I have currently been asked to look after a third party exchange 2003 server,(which is fine,) but by the time I left on the second day of looking at their network their exchange server has dismounted due to lack of space. This is a company that has 10 employees and an exchange 2003 server. When I look through the general settings for mailboxes's the total of users is about 500 MB. The physical size of the priv database AFTER a defrag is 14GB. I have installed GFI Mailsecurity to quick fix a looping message they have and several external companies have. But due to the f...

posting events to multiple calendars
Version: 2008 Operating System: Mac OS X 10.6 (Snow Leopard) Processor: Intel Email Client: Exchange I am the "owner" of several shared calendars in Entourage. How do I create a event on my main calendar and have it show up on the others as well? I really don't want to have to create the same event 4 different times. If there's not a way to do this, are there work-arounds that would serve the same purpose? Thanks! On 2010-06-03 12:46:20 -0400, cherylwt@officeformac.com said: > Exchange I am the "owner" of several shared calendars in Entoura...

Post/ void AR docs in prior year after close AR?
Can you post or void an AR transaction in 2008 after you have closed the year? -- Janey Janey, Yes, double check that the fiscal period(s) for the month/module are unchecked in Fiscal Periods Setup first (Tools > Setup > Company > Fiscal Periods). Also, just as an FYI - if you have already closed 20o9 for Receivables, this will not update the YTD numbers for 2008 (it will go into 2009 instead). -- Victoria Yudin Dynamics GP MVP Flexible Solutions - home of GP Reports http://www.flex-solutions.com/gpreports.html blog: www.victoriayudin.com "Janey" <Janey@dis...

Ignore N/A values with an area chart
I know that excel will ignore a value of #N/A on a line chart, but with an area chart, the result plots a value of zero, making the area look like a bunch of spikes. Is there a way to ignore that value and essentially connect the two available points to give the chart a continuous area? What you can do is interpolate between the adjacent values. There is no value that will make an area chart not dive to zero. - Jon ------- Jon Peltier, Microsoft Excel MVP Peltier Technical Services Tutorials and Custom Solutions http://PeltierTech.com/ _______ SPeterson wrote: > I know that excel ...

3D area charts?
I'm interested in plotting X, Y, and Z axes to compare three properties of various products. As far as I can tell, Excel can't produce an area graph of this sort of data. I've found one website that shows how to do a mock- up 3D scatter plot based on three axes, but nothing that truly uses all three ... Anyone have suggestions? Excel cannot render a 3D scatter chart, in which X, Y, and Z are all continuous numerical variables. - Jon ------- Jon Peltier, Microsoft Excel MVP Peltier Technical Services Tutorials and Custom Solutions http://PeltierTech.com/ _______ Epimetreus...

Please Help-i posted this on the worksheet forum earlier and haven't had any response
Hi, I have four columns of data and would like to identify: 1-what is the first date a symbol was bought or sold 2-On what dates did the number of shares for that symbol = 0 (like i we bought 1000 and sold a total of 1000 a few days later) Does anybody have any thoughts on this? I am at a loss and would lov your input! Date Symbol Action Shares 12/1/2005 BBB Sell -1200 12/1/2005 FFF Sell -1000 11/30/2005 BBB Buy 400 11/30/2005 AAA Sell -200 11/29/2005 GGG Sell -500 11/29/2005 CCC Sell -1000 11/28/2005 DDD Buy 700 11/28/2005 BBB Sell -200 11/25/2005 GGG Sell -500 11/23/2005 GGG Buy 1000 11/...

number of messages in inbox
how to find the number of messages currently in my inbox? If you have the status bar enabled from the View menu and then highlight the folder the number of items is displayed in the status bar <anonymous@discussions.microsoft.com> wrote in message news:08ad01c3d513$e0e22dc0$a501280a@phx.gbl... > how to find the number of messages currently in my inbox? ...

Updating two fields on Command ADD
Hi All, I currently have a form that on Click of a command button, updates a field for me, using the following OnClick code: Private Sub Add_New_Case_Click() DoCmd.GoToRecord , , acNewRec Me.MISLE_Number.SetFocus Exit_Add_New_Case_Click: Exit Sub End Sub It works great, however I now need to update TWO numbers with the same click, is this possible? My table of record is tblSENESarLog2008, and my primary field to update (the one I always had) is in that table. The new field I want to update is a concurrent number and lives in tblSENEIncidentLog2008. Thanks in advance, Steph Hi All,...

Clear "Bank Balance" and "Last Updated" columns?
Money 2007 ... in the Account list, is there a way to clear (eliminate) the values shown under the "Bank Balance" and "Last Updated" columns for an account? These two numbers never change because I'm no longer using online updates on one of my credit card accounts. Thanks, Rick Anyone? I've seen this asked before with no replies. Does this mean that there's no way to clear these values? Hard to believe, if true. If an account isn't setup for online updates, there should be no entry under "Bank Balance" or "Last Updated", or...

outlook 2000 unblock email messages
Could someone please help me with the steps needed to unblock and permit outlook to access my email account to send and receive messages. The pop-up screen asked to permit, block or customize. I checked block messages and checked the box to continue to use block. I've been thru the help menu and cannot find how to now unblock & permit outlook to access my messages on a case by case basis. You'd think they'd have designed a quick reference icon to engage or disengage this feature. I need to retrieve and send some messages urgently....any help is appreciated. Sincer...

Publisher 2009 Cannot open files after Security update applied
I know this question has been asked before, but I am looking for different answers than what the other questions have asked for. There has been an assumption that Office 2007 SP2 has been causing a problem with .pub files. The problem actually appears to be KB 969693 The fix is given here: http://support.microsoft.com/default.aspx/kb/972566/ They say here, however, that the problem is related to the installation of SP2. I don't actually think this is entirely accurate, as KB 969693 is what caused the issue for us. SP2 probably includes this update within it. My question is 2 part: ...

"A document with the name is already open." error message
This happens to a user I have every time he opens an Excel spreadsheet on the network. The file is not opened by anyone else. How do I stop these error messges? Thanks for any help on this! Make sure he is closing files correctly "Jim Lyons" <jplyons@ptd.net> wrote in message news:13ed01c3461f$1e229820$a101280a@phx.gbl... > This happens to a user I have every time he opens an Excel > spreadsheet on the network. The file is not opened by > anyone else. > > How do I stop these error messges? > > Thanks for any help on this! ...

Email disappears when I send a message with an attachment
Just recently, I discovered that the text in my email disappears if I try to email something with an attachment. What happened? I use to be able to send an email explaining the attachment. Kathleen "Kat Dat" <Kat Dat@discussions.microsoft.com> wrote in message news:839A8571-76CB-4992-8FFC-FAFE44A15481@microsoft.com... > Just recently, I discovered that the text in my email disappears if I try > to > email something with an attachment. What happened? I use to be able to > send > an email explaining the attachment. > > Kathleen Are you sending th...

Feature "For Follow UP" does not show the messages from the "additional Mailboxes"
At work I am using Outlook 2003 on an MS Exchange Server. My profile does show my account and the included two additional mailboxes. These are Group MBX for different purposes. The feature Flagged Messages does work within my Mailbox. It shows me fast all flagged mails and the folder where the are located. The same feature does not work within the other mailbox. It shows the number of flagged messages but not the messages itself. When I flag a new message the counter increases, when I remove the flag it decreases, but still it does not show the messages. Any idea how to fix it? Kind ...

Payroll Posting to General Ledger
I would like to have Great Plains use the Employee Postions screen to post to the GL rather than the Employee Maintenance screen. This way I could divide a person's salary between two different postions based on the percentage used in the Employee Postions screen. If there is a way to get someone's salary split between two different positions without having two different paycodes then somebody please let me know. -- John W. Lowther, Jr. DBA / Senior Developer Sta-home Health Agency ---------------- This post is a suggestion for Microsoft, and Microsoft responds to the sugges...

Strange symbol & format in sent e mail messages
Recently my e mail messages ( all new ones, and any replies) now contain a symbol that resembles the one used to note a paragraph, or mark each verse in the Bible. The message format also changes, with a dot between each word. How can i revert to "normal" e mail? You are using Word as your editor and have the show paragraph marks option turned on. Look for a toolbar button (possibly hidden off the end of the toolbar) to turn it off. -- Diane Poremsky [MVP - Outlook] Author, Teach Yourself Outlook 2003 in 24 Hours Coauthor, OneNote 2003 for Windows (Visual QuickStart Guide) Au...

Downloading messages
I have Windows 7 Starter In OE when I downloaded messages they were automatically deleted in the server. But In Live mail they are not. How can I do that? Thank you Kat For pop accounts, Alt + T, Accounts, Properties, Advanced, uncheck Leave a copy of messages on the server. -- Ron Sommer MS MVP-Mail "Kat" <kat@kat.ok> wrote in message news:eeL2Mm3ZKHA.6028@TK2MSFTNGP04.phx.gbl... > I have Windows 7 Starter > > In OE when I downloaded messages they were automatically deleted in the > server. But In Live mail they are not. > &g...

Online updates money 2006
When I started using online updates to my bank I started having problems with MSN.EXE it starts taking CPU and Memory at a medium rate after about an hour or so it will get as high as 91% of the CPU. Has anyone else run into this problem? When I close MSN a display will show pending updates for the online update to the bank and Email updates with options wait till updates complete (Which never happen) or close now without completing I now choose this one. It is updating the banks but never seems to recongize when updates are complete. -- Ted Cooper Ted, I have run into exactly thi...

Outlook respond is slow when navigating messages within mailbox
Hi, My oulook xp was running smoothly until recently. The message become intermitent slow in navigating them ans a small little window "request data from microsoft Excahnge .." appear and says that "Outlook is retrieving data from the Microsoft Excahnge Server "Exchange1" You can cancel the request or minimise this message to the windws taskbar until Outlook closes the message automatically" It has a cancel request button. Why is it happen and how to solve this puzzle? Thanks MWGP ...

Moving deleted messages to Trash
Hi there! I am new to this newsgroup. So, pardon me if this question has already been asked a billion times. I did a search and couldn't find any, but I may have missed them. I am using Outlook 2000 (not Express). I am using IMAP for my e-mail, not POP3. When I delete messages from my Inbox, all Outlook does is mark it for deletion. How do I move them automatically to Trash rather than have to Delete and them do a Move? If I do a Purge, it deletes the messages permanently, which I don't want. I use Outlook Express at home and that one does delete and move the message to Tras...

duplicating messages after messages importing pst file
I am changing from one PC to another. I copied the pst file from the old machine to the new one. When I created a new profile in outlook 2003 and did "send/receive", it is downloading all the messages again from the server. All these messages already exist in my old pst file and hence in my inbox on the new machine. This is taking forever and creating unnecessary copies in inbox. Thanks, - Rahul Hello Rahul! Go to the new Computer, connect to exchange an download all messages. After that import the pst file. On the dialog you are choosing the pst file to import you have thr...

Online Updates?
I have a 401k through my employer with Merill Lynch. The web site that I must go to to log in is not the website that money goes to. Is there any way to update my account information online if this is the case?????? You might try ensuring you have the correct financial institution selected for that account. Contact your FI's online banking dept for info on what FI you should select when setting up for online services. "briancrosier" wrote: > I have a 401k through my employer with Merill Lynch. The web site that I > must go to to log in is not the website that m...

Update individual worksheets from Master Worksheet
Each month I open and update about 40 commission worksheets with data from my master workbook, and then email each statement. Very time consuming. Is there a way that I can send the users their own (confidential) worksheet and have that automatically update via some web service? The master workbook is very large and contains confidential info. Have you looked into getting you own LAN? Basically, you set up your own server(s) and put up a firewall to prevent (in reality, minimize) outside access to your internal communications. You would still be able to access the I-net t...