Questions tagged [cwnd]

CWnd Class is part of MFC library and provides the base functionality of all window classes.

CWnd Class is part of MFC library and provides the base functionality of all window classes.

A CWnd object is distinct from a Windows window, but the two are tightly linked. A CWnd object is created or destroyed by the CWnd constructor and destructor. The Windows window, on the other hand, is a data structure internal to Windows that is created by a Create member function and destroyed by the CWnd virtual destructor.

73 questions
1
vote
1 answer

C++ How to use CWnd * object to load images?

I am totally newbie in C++ and I need to edit C++ softare. I need to replace GUI buttons graphics with image icons. I am not sure, but maybe Button is created in this part of code: BOOL…
tomas.teicher
  • 913
  • 3
  • 13
  • 26
1
vote
1 answer

Why is CWnd::CreateEx failing to create my window?

I'm working on a sporadic production issue that's occurring within our 32 bit MFC VC2010 application. The application is running on Windows Server 2008 R2 Standard SP1 64-bit. The issue is caused by a failure to create a CWnd derived class. When…
user1707438
  • 81
  • 1
  • 6
0
votes
1 answer

CWnd as ActiveX control without .dll or .ocx file in C++?

Dear MFC/ActiveX/COM cracks, I have 'inherited' the source of an old MFC application (originally created with Visual Studio 6) which builds and runs so far in VS 2010, but has embedded some ActiveX controls as source code, apparently generated by…
juniper
  • 311
  • 5
  • 13
0
votes
0 answers

may be a big problem if I declare a control that derives from CWnd but never use it ? MFC

Let me give you quick scenario: I have CEdit decleration in MyDlg.h but never used. CEdit m_edit; // member variable of CMyDlg So, my guess is if I'm not mistaken, any CWndcontrols' m_pWnd gets destroyed through CWnd::DestroyWindow(); function…
Zrn-dev
  • 99
  • 5
0
votes
1 answer

Why isn't cwnd restricted by rwnd in a TCP connection?

I'm trying to understand how TCP works and I'm a bit surprised by the (absence of) effect of the receiver window (rwnd) on the congestion window (cwnd). From what I've read (mainly wikipedia and RFC5681) I understand that if the slow start threshold…
snal
  • 1
  • 3
0
votes
0 answers

Debugging OnWndMsg exception Windows C++ WM_TIMER message Crash mentions IsWindowVisible

I have a crash that is caught in Sentry. CWnd::IsWindowVisible Unhandled Fatal Error: EXCEPTION_ACCESS_VIOLATION_READ I downloaded the mini dump file (dmp) and ran through Visual Studio 19. The crash is occurring in the method: BOOL…
Dave
  • 8,095
  • 14
  • 56
  • 99
0
votes
0 answers

InitInstance throwing exception at UpdateWindow

I am trying to porting an old project from VS2008 to VS2015. This project use MFC and I have a compiling version but it's throwing an exception during InitInstance method, more precisly when there is the call to UpdateWindow. The exception is of…
GiaMat45
  • 55
  • 7
0
votes
1 answer

Simplest way to read MFC messages from HWND?

I am trying to use an api library with functions that send messages to a server, then receive back messages. One of the function's arguments is a HWND and the library document says the message will be received by it. To read the received message I…
Hpotato
  • 3
  • 5
0
votes
1 answer

How to Make a Simple GUI with DropDown Menus with C++

I am really struggling how to make a window with three selections of options. I currently have a setup that uses a CFileDialog object and have successfully implemented two dropdown menus and multiple check items. What I want is to implement a pop up…
0
votes
1 answer

How to set initial congestion window size in android?

I'm currently try to control initial congestion window in my android phone. I found some useful method that works in desktop linux, however it does not work in android.. I tried solution that use ip route via adb shell as follows: cmd/results ip…
gsoul
  • 1
0
votes
0 answers

Show same dialog twice in nested tab structure

In a nested tab structure of type CMFCTabCtrl(e.g. CMFCTabCtrl as Tab in parent CMFCTabCtrl), how can I show a parents tab inside the parent tab and a child CMFCTabCtrl tab? ParentTab1 ParentTab2 ParentTab3 <-- PARENT CMFCTabCtrltabs ChildTab1…
ezegoing
  • 526
  • 1
  • 4
  • 18
0
votes
1 answer

Can't call CWnd::Create from COleControl C++

I am developing an ActiveX Control for a MFC app. In this app I have a controle class: class MyControl : public COleControl and a CWnd class: class MyCWnd : public CWnd As well as other classes for the active x and an idl file... Within the…
firehelm
  • 49
  • 5
0
votes
1 answer

Does the CTab_Ctrl class require an additional property to draw in its "window"?

I've got a "default looking" dialog box like the following: And I'm attempting to modify the tabs and insert a RichEditCtrl in the first tab. InitCommonControlsEx; CWnd* pTab = GetDlgItem(IDC_TAB1); if (pTab) { CRect rect; …
Skewjo
  • 379
  • 3
  • 12
0
votes
1 answer

Custom image while dragging an CWnd-derived object

I want to display a custom image while dragging an object in a drag&drop operation. I have created a CWnd-derived control (a chart) and I display 4 of them in the same dialog. I've implemented drag&drop using COleDataSource so that the user can…
Javier De Pedro
  • 2,219
  • 4
  • 32
  • 49
0
votes
1 answer

In my MFC application I create a new child window. When I drag it to a new location the outline is not drawn during the drag, so n visual feedback

This is part of a large MFC application that uses the MDI architecture. It is written using Microsoft Visual Studio 2019. I want to create a window to display the first few lines of a text file so the user can make decisions about parsing it. The…
geoman
  • 1
  • 3