Click here to Skip to main content
15,910,234 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hello Coders,
I am writing a program in c++ in code blocks on "Win32 API". I have created a window with menu named "New" and there is a option in it "Display"(i.e. New->Display).

I want that on clicking the "Display" some data should be displayed( & not paint) on the same window(not in another window like messagbox).

Please Can u tell me how can I do this and if u have any link to video on you tube helpful for me.

Thank you Anticipation

What I have tried:

I have tried IDM but it was not supported in code blocks.
Posted
Updated 24-Feb-16 5:40am

1 solution

The only way to display things on that window is by using the WM_PAINT event. This is explained in detail in lots of tutorials, such as EFNet #Winprog[^], Win32 Programming - FunctionX[^] etc.
 
Share this answer
 
Comments
Suryakant Turing 24-Feb-16 20:49pm    
Richard they all use IDM and it want solution without IDM. At least how to respond to the menu items.
Suryakant Turing 25-Feb-16 2:47am    
Richard that was my mistake. I was taking IDM term as predefined.

But I still have a problem, I want my data in detail form and not printed when I click a particular menu item.
Richard MacCutchan 25-Feb-16 3:18am    
Sorry, but what does that mean?
Suryakant Turing 25-Feb-16 11:41am    
I mean that when I print "Hello Window" on the windows then it can be - selected, copied by the mouse.

And this does not happen when I use WM_PAINT to print the text.
Richard MacCutchan 25-Feb-16 11:47am    
Use an Edit control in the client portion of the Window. It does all the painting and text control for you.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900