Im working on a dialog box in which several rules must be satisfied before the OK button is enabled.
Currently any action on the page such as entering data or selecting an item from a drop down list (amongst other things) calls a single function called ProcessEvent() - this function handles all logic and either enables or disables the O...
I've got an app that uses several CView-derived classes (actually CScrollView) to display document data. For one particular view, I want to add a fly-out edit box to add notes. That is, you'd see a tab at the bottom of the window labeled "Page Notes", and clicking on that would bring up the edit box. Clicking the tab while the edit box i...
Any suggestions/hints/links/tutorials would be appreciated! :)
...
I set a limit text, but when pasting in text containing new-lines, it's possible to get the reported length longer than the set limit. Some limit is still in place, but for instance I can set a limit of 4000, paste in 6000 chars and the control reports the length as 4010.
Or I can get the reported length as 3098 and then enter 4 new-lin...
Preferably with visual illustrations... MSDN just lists class-names and what I really want to see is which versions of MFC have nice modern functionality like dockable toobars, collapsible windows, and other graphical niceties.
Does such a 'visual catalog' exist? From MSDN it's not always clear even what each class does without a pretty...
As you may know a CComboBox (DropDownList style) only selects properly by typing if you don't let it autosort it's content. Here an example of what i mean:
You type A and then B. If it is not on autosort it will first select the next entry beginning with A and then the next entry beginning with B. If it is sorted it will select the next...
Are there any tools out there, for MFC apps in particular, which can be used to gather data on how users use dialogs... of primary interest is which controls are accessed most often.
I'd guess one could write something that would plug into an existing dialog without too much fuss, but perhaps something (preferably free) already exists t...
I know we can enumerate the windows controls with in the dialog and using the callback we can collect the windows controls.
I am looking for specific way to filtering out the controls based on interface implementation. For example, If the Active-X controls derives from interface IDataControl, I want that to add to my interest collection...
I'm working on a bug where I have an MFC application that does weird things when installed in when Sophos Safeguard hard drive encryption is installed. I'm sorry to be so vague here, but I'm writing this away from the office so this is all from my (poor) memory.
Three things I've noticed:
AfxGetResourceHandle() doesn't return a consi...
I understand that WinCE does not support the above function. However as it has been used in the code I am trying to port to Win CE environment, I am trying to rewrite the function to work in Win CE.
http://www.codeproject.com/KB/mobile/GetPrivateProfileString.aspx
The code at this link does not work as fstream is not supported. Please l...
In MFC Application, how can we differentiate whether a control is a standard control like CComboBox or it is an custom active-x control?
...
// Convert to a wchar_t*
size_t origsize = strlen(toChar) + 1;
const size_t newsize = 100;
size_t convertedChars = 0;
wchar_t wcstring[newsize];
mbstowcs_s(&convertedChars, wcstring, origsize, toChar, _TRUNCATE);
wcscat_s(wcstring, L"\\*.*\0");
wcout << wcstring << endl; // C:\Documents and Settings\softnotions\Desktop\Release\*.*...
Having realised my own reasons were way too dubious, I've now gone about this a different way. But I'm still curious...
For reasons of nostalgia, familiarity and laziness, I'm coding a UI with MFC. For dubious reasons (as if those were not enough), I wanted to add a (double-)click event to a group box. Naturally, the group box contains ...
Hi, This is dharmaraju, I am facing some problem in Activex Controls design. Kindly help me to resolve the issue.
Problem Description:
I have created a property mentioned below for a textbox.
Public Property Let DataControl_Value(ByVal Value As Variant)
Public Property Get DataControl_Value() As Variant
This property is editable at d...
I have an SDI application written in MFC. The frame is divided into 1 row and 2 columns using a splitter window. Below are details of Row and Column (R0C0 means Row#0 and Col#0)
R0C0 view is a CFormView with multiple input controls like text box, combo box etc.
R0C1 view is a CHtmlView that contains HTML content relavant to the contro...
I have an MFC application that is a Doc/View/Frame implementation. One dialog is running as a modeless dialog which pops up on demand (from a menu option). I'm looking to add the modeless dialog to an MDI child view. Basically, I want to load the template from the resource file, and create it as a child of the CView in my new trio (do...
I am trying to find if there is a system color used here, so I can use the same value in my custom control. But I cannot find any reference, and none of these system colors sound right.
Is there a sys-color or constant I can use? Failing that, what's the RGB?
...
In the WindowsXP Control panel, you can see a nice collapsible panel control on the left:
These are not just collapsible, but animated too. I wondered if these are any kind of control accessible to a developer, specifically in MFC? Or are they custom/bespoke functionality?
...
My program has one dialog and two sockets. Both sockets are derived from CAsyncSocket, one is for listening, other is for receiving data from client. My program crashes when client tries to connect to server application and server needs to initialize receiving socket.
This is my MFC dialog class.
class CFileTransferServerDlg : public C...
Hi, i have a popup menu for contextmenu.And i wrote the function for each menu in CMainframe.
I have OnContextMenu() in each view class and in one dialog class.Its works fine in Dialog class.But not in View class.Codings are below:
CMainframe funciton:
void CMainFrame::OnUpdateFptrend(CCmdUI* pCmdUI)
{
((CMainFrame *)AfxGetMainWnd()...