Click here to Skip to main content
15,879,535 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: UDP Sockets and Windows 10 Pin
Randor 28-Jun-17 7:53
professional Randor 28-Jun-17 7:53 
AnswerRe: UDP Sockets and Windows 10 Pin
jeron128-Jun-17 5:04
jeron128-Jun-17 5:04 
GeneralRe: UDP Sockets and Windows 10 Pin
Rick York28-Jun-17 6:57
mveRick York28-Jun-17 6:57 
GeneralRe: UDP Sockets and Windows 10 Pin
jeron128-Jun-17 7:16
jeron128-Jun-17 7:16 
AnswerRe: UDP Sockets and Windows 10 Pin
Rick York28-Jun-17 7:47
mveRick York28-Jun-17 7:47 
GeneralRe: UDP Sockets and Windows 10 Pin
Randor 28-Jun-17 8:00
professional Randor 28-Jun-17 8:00 
GeneralRe: UDP Sockets and Windows 10 Pin
leon de boer28-Jun-17 8:27
leon de boer28-Jun-17 8:27 
QuestionDirect creation of CWnd Object Pin
al250027-Jun-17 5:16
al250027-Jun-17 5:16 
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



CMDIChildWnd * pChild =
          ((CMDIFrameWnd*)(AfxGetApp()->m_pMainWnd))->MDIGetActive();
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));


modified 27-Jun-17 11:53am.

AnswerRe: Direct creation of CWnd Object Pin
Victor Nijegorodov27-Jun-17 6:17
Victor Nijegorodov27-Jun-17 6:17 
AnswerRe: Direct creation of CWnd Object Pin
Victor Nijegorodov27-Jun-17 6:27
Victor Nijegorodov27-Jun-17 6:27 
GeneralRe: Direct creation of CWnd Object Pin
leon de boer27-Jun-17 6:49
leon de boer27-Jun-17 6:49 
GeneralRe: Direct creation of CWnd Object Pin
Victor Nijegorodov27-Jun-17 10:45
Victor Nijegorodov27-Jun-17 10:45 
GeneralRe: Direct creation of CWnd Object Pin
leon de boer27-Jun-17 19:49
leon de boer27-Jun-17 19:49 
GeneralRe: Direct creation of CWnd Object Pin
al250029-Jun-17 5:23
al250029-Jun-17 5:23 
GeneralRe: Direct creation of CWnd Object Pin
leon de boer29-Jun-17 6:25
leon de boer29-Jun-17 6:25 
QuestionHow to proceed and execute LDPC decoding using Data Structure in C Pin
Member 1326117526-Jun-17 21:15
Member 1326117526-Jun-17 21:15 
AnswerRe: How to proceed and execute LDPC decoding using Data Structure in C Pin
Richard MacCutchan26-Jun-17 22:59
mveRichard MacCutchan26-Jun-17 22:59 
AnswerRe: How to proceed and execute LDPC decoding using Data Structure in C Pin
leon de boer27-Jun-17 5:36
leon de boer27-Jun-17 5:36 
GeneralRe: How to proceed and execute LDPC decoding using Data Structure in C Pin
Member 1326117527-Jun-17 19:19
Member 1326117527-Jun-17 19:19 
QuestionDisecting a PE File, Revisited Pin
Bram van Kampen26-Jun-17 14:56
Bram van Kampen26-Jun-17 14:56 
Questionhow to use memset to fill a char array with space key? Pin
focusdoit25-Jun-17 3:01
focusdoit25-Jun-17 3:01 
AnswerRe: how to use memset to fill a char array with space key? Pin
leon de boer25-Jun-17 3:12
leon de boer25-Jun-17 3:12 
GeneralRe: how to use memset to fill a char array with space key? Pin
focusdoit25-Jun-17 3:53
focusdoit25-Jun-17 3:53 
GeneralRe: how to use memset to fill a char array with space key? Pin
harold aptroot25-Jun-17 4:03
harold aptroot25-Jun-17 4:03 
GeneralRe: how to use memset to fill a char array with space key? Pin
focusdoit25-Jun-17 4:11
focusdoit25-Jun-17 4:11 

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.