473,387 Members | 1,779 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

OnDraw again

This is wierd. I have a single doc app. I create some buttons in the view
OnDraw method.

When I size my app window - the buttons disappear. But as soon as I click on
any spot inside the window or the window frame they appear.

What is going on here. I have tried everything. I have used WM_SIZE,
WM_SYSCOMMAND, WM_MOVE, pretty much anything - and the same thing happens.
Help!

Bill
Nov 16 '05 #1
3 1699
You need to issue OnPaint() command after you resize the
window -- to repaint the window. By the way, what
commands are you using to resize your main app. window?
-----Original Message-----
This is wierd. I have a single doc app. I create some buttons in the viewOnDraw method.

When I size my app window - the buttons disappear. But as soon as I click onany spot inside the window or the window frame they appear.
What is going on here. I have tried everything. I have used WM_SIZE,WM_SYSCOMMAND, WM_MOVE, pretty much anything - and the same thing happens.

Help!

Bill
.

Nov 16 '05 #2
Tried OnPaint - no diff - I resize by using mouse - Which calls OnSize
It's wierd - everything appears as soon as I click on anything in the
window!



"insomniac" <in**@u-s-tech.com> wrote in message
news:06****************************@phx.gbl...
You need to issue OnPaint() command after you resize the
window -- to repaint the window. By the way, what
commands are you using to resize your main app. window?
-----Original Message-----
This is wierd. I have a single doc app. I create some

buttons in the view
OnDraw method.

When I size my app window - the buttons disappear. But

as soon as I click on
any spot inside the window or the window frame they

appear.

What is going on here. I have tried everything. I have

used WM_SIZE,
WM_SYSCOMMAND, WM_MOVE, pretty much anything - and the

same thing happens.


Help!

Bill
.

Nov 16 '05 #3
You're better off creating a dialog as a resource, and
inserting buttons there, then manipulating them with
visible, not visible, or moving them with MoveWindow().
(Use the Class Wizard to create variables that reference
your buttons and controls).

Drawing directly to the screen, and including controls
also, will give you erratic behavior on repaint.

-----Original Message-----
Tried OnPaint - no diff - I resize by using mouse - Which calls OnSize

It's wierd - everything appears as soon as I click on anything in thewindow!



"insomniac" <in**@u-s-tech.com> wrote in message
news:06****************************@phx.gbl...
You need to issue OnPaint() command after you resize the window -- to repaint the window. By the way, what
commands are you using to resize your main app. window?
>-----Original Message-----
>This is wierd. I have a single doc app. I create some

buttons in the view
>OnDraw method.
>
>When I size my app window - the buttons disappear. But

as soon as I click on
>any spot inside the window or the window frame they

appear.
>
>What is going on here. I have tried everything. I have

used WM_SIZE,
>WM_SYSCOMMAND, WM_MOVE, pretty much anything - and the

same thing happens.
>
>
>Help!
>
>Bill
>
>
>.
>

.

Nov 16 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: jon morgan | last post by:
OK, I'm going to be brave. There is a bug in VS.Net 1.1 that causes random compiler errors. I have raised this issue in posts at least three time in the past couple of months without attracting...
11
by: Steven T. Hatton | last post by:
In the past there have been lengthy discussiions regarding the role of header files in C++. People have been very adamat about header files serving as in interface to the implementation. I do...
2
by: Peter | last post by:
Hi, I try to display a simple text on the screen (MFC). I used CMyAppView::OnDraw function but the application doesn't call it while running. I tried to overload CMyAppView::OnUpdate(...) function...
6
by: teedilo | last post by:
We have an application with a SQL Server 2000 back end that is fairly database intensive -- lots of fairly frequent queries, inserts, updates -- the gamut. The application does not make use of...
0
by: bill | last post by:
I am building a single doc app. My document (View) has a number of controls and graphics on it. When I full window my frame all the controls and graphics disappear. Then when I resize my app they...
1
by: ellieong | last post by:
Hi How do I pass a value let's say an integer value into the ondraw function, in order to vary the position of any drawing for instance a line? Ellie.
5
by: Mike TI | last post by:
March 24, 2006 Hi all I am new to VB.NET and am using VB.NET 2005. I have an MDI form with a Split Container Control. On demand I am adding and removing User Controls on Panel 2. I am using...
0
by: Tom Van Hauwaert | last post by:
I designed a font "WAG Symbols" that contains symbols in the private use area of unicode. Now I want to develop an insertable object that can handle these characters so they become visible in, let's...
0
by: Neelima35 | last post by:
Hi, I should append the polygons in the ondraw() screen reading the XML in vc6.0. The code is running without any errors but the ondraw() screen is left blank?
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.