All Questions
185
questions
0
votes
0
answers
142
views
How can I manually trigger WM_CTLCOLORSTATIC call
I have an array of static windows which I want to change the text color to on hover.
How can I trigger the WM_CTLCOLORSTATIC message to be called?
Fig 1.1
Button declaration
std::map<int, Button *&...
0
votes
1
answer
117
views
How do edit controls work internally? class windowProcedure and allocated buffers
CreateWindowEx creates a window, and if you set the lpClassName parameter as "Edit" it creates an edit box.
I know that lpClassName has his own WindowProcedure registered to its structure. ...
0
votes
0
answers
109
views
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 ...
1
vote
1
answer
568
views
The "continue" statement doesnt transfer control to the starting of the loop
I'm a beginner when it comes to programming and recently my professor asked me to make a program for the parking lot. The problem I'm facing is that when my compiler encounters a continue statement ...
1
vote
2
answers
1k
views
C++ MFC - CEdit / EDITTEXT Control - only allow certain chars
Thank you for the answers and comments. I chose the answer I chose because it allowed me to continue to use CEdit with just a couple of minor changes to the code. However, the solution considering ...
0
votes
1
answer
204
views
Control is getting be NULL mf
I have CPrinterDlg class which contains
// CPrinterDlg.h
public:
CEdit m_editRxFreq;
void print_SignalData(unsigned int freq, float wvlen);
// CPrinterDlg.cpp
void CPrinterDlg::...
0
votes
0
answers
162
views
How to add checkbox beside a text using mfc
I'm learning mfc, activex controls and containers. I'm doing a assignment on containers(Dialog).I have created a dialog, when I do right click, there are system menu items like Minimize, Maximize, ...
0
votes
0
answers
679
views
CUSTOMDRAW in Win32 Header not appropriately drawing outside columns area
I am currently subclassing a ListView control to support custom color schemes - especially Dark Mode themes.
So first, I changed the ListView and associated Header with:
SetWindowTheme(hwndListView, ...
0
votes
1
answer
230
views
Check if control is a TextBox
I am using C++ Winforms. So I have a Control in my form.
Now what I want to do is something like this to check if a control is a TextBox:
if (control is TextBox)
{
// ...
}
In C# you can do the ...
3
votes
1
answer
493
views
How to avoid controls flickering in a CDialog (MFC C++ )
Hello i've been looking for a couple of days now how to avoid controls themselves from flickering in a CDialog.
I am using CMemDC and erasing the background to draw some basic shapes with GDI+
void ...
0
votes
2
answers
426
views
WinAPI rebar control not showing up
I'm working on a pure WinAPI application in C++ and I want to add a toolbar that lives inside/on a rebar control. I can create and add the toolbar but I can't get the rebar to show up (there are no ...
1
vote
1
answer
336
views
How to refresh a Groupbox control in MFC (C++)
I created a Groupbox in my MFC view class. But failed in refresh it while Restore Down from Maxmize as well as Maxmize from Restore Down.
I create the Groupbox in View::OnCreate:
int ...
0
votes
0
answers
33
views
How can I control application window behavior in Windows? [duplicate]
I have an idea for a small Windows utility. The issue I am having is figuring out what you use to manipulate application window behavior. e.g., minimize, maximize, etc.
What should I be looking into?
-1
votes
1
answer
382
views
New control button doesn't have the correct Windows ID
I have a Window form application in C++.
I added a new button and linked it to a function called ChangeTitle.
But when I run the application and I press the button, it doesn't call the function.
I ...
-1
votes
1
answer
303
views
Issue switching controller in code with ros
I am trying to switch the controller in code but it keeps returning false and i don't know why, this is the code:
ros::ServiceClient switch_controller = n.serviceClient<controller_manager_msgs::...