Click here to Skip to main content
15,917,862 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: Hollywood! Pin
Jeremy Falcon27-Jun-17 14:17
professionalJeremy Falcon27-Jun-17 14:17 
GeneralRe: Hollywood! Pin
R. Giskard Reventlov27-Jun-17 22:36
R. Giskard Reventlov27-Jun-17 22:36 
GeneralRe: Hollywood! Pin
Jeremy Falcon28-Jun-17 4:34
professionalJeremy Falcon28-Jun-17 4:34 
GeneralRe: Hollywood! Pin
Jeremy Falcon27-Jun-17 8:47
professionalJeremy Falcon27-Jun-17 8:47 
GeneralRe: Hollywood! Pin
Tomaž Štih28-Jun-17 0:20
Tomaž Štih28-Jun-17 0:20 
GeneralRe: Hollywood! Pin
  Forogar  28-Jun-17 5:24
professional  Forogar  28-Jun-17 5:24 
GeneralRe: Hollywood! Pin
GenJerDan28-Jun-17 22:08
GenJerDan28-Jun-17 22:08 
GeneralDirect creation of CWnd object Pin
al250027-Jun-17 5:11
al250027-Jun-17 5:11 
Hi,

I have a MDI project but I wanted to display a window with some info that is not based on my document. I was able to do this and to draw in the window. If I move the window the drawing remains but if I resize it the drawing disappears. I thought the CS_VREDRAW | CS_HREDRAW would take care of this. Also, I don't get the minimize, maximize, close buttons. I'm guessing there are some style conflicts.

Here is the code, it is executed based on a menu selection.

Thanks

CMainFrame* pMainFrm = GetMainFrame();
LPCTSTR ClassName = (LPCTSTR)AfxRegisterWndClass(CS_VREDRAW | CS_HREDRAW,::LoadCursor(NULL, IDC_ARROW),(HBRUSH) ::GetStockObject(WHITE_BRUSH),::LoadIcon(NULL, IDI_APPLICATION));
pMainFrm->Wnd.CreateEx(0, ClassName, "Win",WS_CAPTION | WS_VISIBLE | WS_SIZEBOX | WS_MINIMIZEBOX | WS_MAXIMIZEBOX ,
 0, 0, 600,800, pChild->m_hWnd, (HMENU)NULL);
pMainFrm->Wnd.ShowWindow(SW_SHOWNORMAL);
pMainFrm->Wnd.CenterWindow();
 
CPaintDC dc(CWnd::FromHandle(pMainFrm->Wnd));

GeneralRe: Direct creation of CWnd object Pin
MarkTJohnson27-Jun-17 5:13
professionalMarkTJohnson27-Jun-17 5:13 
GeneralRe: Direct creation of CWnd object Pin
al250027-Jun-17 5:14
al250027-Jun-17 5:14 
GeneralRe: Direct creation of CWnd object Pin
TheGreatAndPowerfulOz27-Jun-17 5:26
TheGreatAndPowerfulOz27-Jun-17 5:26 
GeneralRe: Direct creation of CWnd object Pin
#realJSOP27-Jun-17 5:34
professional#realJSOP27-Jun-17 5:34 
GeneralRe: Direct creation of CWnd object Pin
TheGreatAndPowerfulOz27-Jun-17 5:47
TheGreatAndPowerfulOz27-Jun-17 5:47 
JokeRe: Direct creation of CWnd object Pin
Nish Nishant27-Jun-17 6:32
sitebuilderNish Nishant27-Jun-17 6:32 
GeneralRe: Direct creation of CWnd object Pin
Chris Maunder27-Jun-17 8:52
cofounderChris Maunder27-Jun-17 8:52 
GeneralRe: Direct creation of CWnd object Pin
Marc Clifton27-Jun-17 7:10
mvaMarc Clifton27-Jun-17 7:10 
GeneralRe: Direct creation of CWnd object Pin
Chris Maunder27-Jun-17 8:53
cofounderChris Maunder27-Jun-17 8:53 
GeneralThought of the day Pin
OriginalGriff27-Jun-17 4:57
mveOriginalGriff27-Jun-17 4:57 
GeneralRe: Thought of the day Pin
W Balboos, GHB27-Jun-17 5:05
W Balboos, GHB27-Jun-17 5:05 
GeneralRe: Thought of the day Pin
megaadam27-Jun-17 6:04
professionalmegaadam27-Jun-17 6:04 
GeneralRe: Thought of the day Pin
lopatir27-Jun-17 6:05
lopatir27-Jun-17 6:05 
GeneralRe: Thought of the day Pin
Daniel Pfeffer27-Jun-17 20:54
professionalDaniel Pfeffer27-Jun-17 20:54 
GeneralResiliency Pin
Tim Carmichael27-Jun-17 2:44
Tim Carmichael27-Jun-17 2:44 
GeneralRe: Resiliency Pin
Ron Anders27-Jun-17 2:51
Ron Anders27-Jun-17 2:51 
GeneralRe: Resiliency Pin
Pete O'Hanlon27-Jun-17 3:55
mvePete O'Hanlon27-Jun-17 3:55 

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.