Click here to Skip to main content
15,911,711 members
Home / Discussions / Article Writing
   

Article Writing

 
GeneralRe: news: protocol Pin
Bjornar Henden7-Dec-00 1:32
Bjornar Henden7-Dec-00 1:32 
GeneralRe: news: protocol Pin
SAWilde7-Dec-00 22:46
SAWilde7-Dec-00 22:46 
GeneralRe: news: protocol Pin
Sasa Kajic8-Dec-00 2:59
Sasa Kajic8-Dec-00 2:59 
Generalnews: protocol Pin
Sasa Kajic7-Dec-00 0:47
Sasa Kajic7-Dec-00 0:47 
GeneralSending msg to Pager thru ASP Pin
6-Dec-00 4:26
suss6-Dec-00 4:26 
GeneralRe: Sending msg to Pager thru ASP Pin
SAWilde7-Dec-00 22:53
SAWilde7-Dec-00 22:53 
GeneralClipping Region of Child Window Controls Pin
Brian Rosenthal29-Nov-00 9:48
Brian Rosenthal29-Nov-00 9:48 
GeneralRe: Clipping Region of Child Window Controls Pin
Brian Rosenthal2-Dec-00 18:09
Brian Rosenthal2-Dec-00 18:09 
Being completely confused, I wrote this test application I built to illustrate exactly what is happening to my code. It's a simple application that compiles by itself in VC6.0. A quick glance, and then running it, is meant to illustrate perhaps more in detail my confusion with setting the window region of a child control. I have marked three points in the code that can be either commented or not to produce results that to me were surprising and erratic. So, I guess my real question is to explain the results and tell me what I can do to get the richedit control in this example to have its region set properly.

Here is a quick description of the code, and then the actual source follows (you can just cut and paste into VC6.0, and it works). Sorry, I know the tabs didn't copy into the message, but I cannot figure out what to do to get them in there.

Simple WinProc:
I. WM_CREATE:
// Create a RichEdit Control
// Create a button
// Call ShowWindow() on each.
II. WM_COMMAND:
// If the button is clicked:
// 1. call SetWindowRgn(richedit) to set the region
// to only the top left.
// 2. (C. Call InvalidateRgn(...) on the window)
// 3. (D. Call InvalidateRgn(...) on the richedit control)

III. WM_PAINT:
// B. SendMessage(...WM_PAINT...) to both children, then return 0
// A. break;

As you can see, I note four places in the code which each produce a different behavior that confuses me. It's very easy to uncomment the proper lines and see the result.

Anyway, thank you very much in advance. If you would like me to clarify something, please send me e-mail at brosenthal@mybesthealth.com. Sorry if this is a stupid question. I feel like a dunce. Have been beating my head against the wall about this for a while. Anyway, here is the sourcecode that works in VC6.0:

I will post the sourcecode immediately following this on this thread (too long for one message)
GeneralRe: Clipping Region of Child Window Controls Pin
Brian Rosenthal2-Dec-00 18:09
Brian Rosenthal2-Dec-00 18:09 
GeneralI think I understand wierd case 'A' Pin
Jim Howard5-Dec-00 6:48
Jim Howard5-Dec-00 6:48 
GeneralRe: I think I understand wierd case 'A' Pin
SAWilde7-Dec-00 22:41
SAWilde7-Dec-00 22:41 
GeneralDisplay selection in Button Controls Pin
Amit Dey27-Nov-00 10:31
Amit Dey27-Nov-00 10:31 
GeneralRe: Display selection in Button Controls Pin
Michael Dunn27-Nov-00 15:19
sitebuilderMichael Dunn27-Nov-00 15:19 
GeneralCode lines in VisualC(or VB) that add a new menu in Excell's menu bar Pin
26-Nov-00 22:58
suss26-Nov-00 22:58 
GeneralCustomizing MS Internet Explorer Pin
J.Sridhar24-Nov-00 19:55
J.Sridhar24-Nov-00 19:55 
GeneralRe: Customizing MS Internet Explorer Pin
ColinDavies24-Nov-00 20:55
ColinDavies24-Nov-00 20:55 
GeneralRe: Customizing MS Internet Explorer Pin
29-Nov-00 8:59
suss29-Nov-00 8:59 
GeneralLaunch a file when download is complete Pin
22-Nov-00 4:32
suss22-Nov-00 4:32 
GeneralC/C++ and JavaScript interaction Pin
21-Nov-00 20:05
suss21-Nov-00 20:05 
GeneralMicrosoft Project File Format MPX Pin
Andrew Postlewhite21-Nov-00 0:06
Andrew Postlewhite21-Nov-00 0:06 
GeneralSoftware Protection Pin
Dominic I. Holmes20-Nov-00 8:09
Dominic I. Holmes20-Nov-00 8:09 
GeneralRe: Software Protection Pin
J.Sridhar24-Nov-00 20:01
J.Sridhar24-Nov-00 20:01 
GeneralRe: Software Protection Pin
Masoud Samimi2-Dec-00 0:05
Masoud Samimi2-Dec-00 0:05 
GeneralFully owner draw interface Pin
14-Nov-00 4:28
suss14-Nov-00 4:28 
GeneralRe: Fully owner draw interface Pin
23-Nov-00 12:32
suss23-Nov-00 12:32 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.