mfc Questions

6

How do I disable MFC dialog OK button? This code: CWnd* fieldOK = pDlg->GetDlgItem(IDOK); fieldOK->EnableWindow(FALSE); causes exception "Access violation reading location..." in line ASSER...
Suboxide asked 21/6, 2013 at 11:1

4

Solved

I can convert a Double to a CString using _ecvt result_str=_ecvt(int,15,&decimal,&sign); So, is there a method like the one above that converts an int to CString?
Mycah asked 26/9, 2012 at 13:10

1

Solved

I have seen similar questions (e.g. Encode/Decode URLs in C++). But, for me: CString strURL; DWORD dwSize = _MAX_PATH; if (InternetCanonicalizeUrl(strFile, strURL.GetBuffer(_MAX_PATH), &dwSize,...
Evidence asked 19/3, 2023 at 9:20

4

Solved

I want to declare : std::unordered_map<CString, CString> m_mapMyMap; But when I build I got an error telling me that the standard C++ doesn't provide a hash function for CString, while CSt...
Shred asked 15/2, 2016 at 11:37

3

Solved

Using the standard Win32 file I/O API's (CreateFile/ReadFile/etc), I'm trying to wait for a file to become readable, or for an exception to occur on the file. If Windows had any decent POSIX suppor...
Transonic asked 28/5, 2010 at 3:2

3

I want to build a regular expression in c++{MFC} which validates the URL. The regular expression must satisfy following conditions. Valid URL:- http://cu-241.dell-tech.co.in/MyWebSite/ISAPIWEBSIT...
Lubin asked 11/4, 2011 at 10:50

10

Solved

I'm implementing a task-bar replacement, dock-like application-switcher style program. It's doing some unique stuff with OpenGL, and with keyboard shortcuts, so the way it's set up, the window does...
Foucault asked 10/6, 2011 at 22:18

12

How to convert a CString object to integer in MFC.
Diarmuid asked 14/6, 2009 at 12:42

2

Solved

I'm working on very old legacy code and I'm porting it from 32 to 64 bit. One of the things where I'm struggling was about the MFC serialization. One of the difference between 32 and 64 bit was the...
Imprison asked 10/1, 2023 at 8:36

3

Solved

Code analysis: ON_NOTIFY(TCN_SELCHANGE, IDC_TAB_HISTORY_TYPE, &CAssignHistoryDlg::OnTcnSelchangeTabHistoryType) Warning C26454: Arithmetic overflow: '-' operation produces a negative uns...
Fives asked 2/7, 2018 at 15:28

4

Solved

I have a MFC application which runs some embedded Python scripts. I am trying to make one of the dialogs this embedded script creates modal, but I am not having much success. Can anyone point me ...
Koralie asked 29/5, 2013 at 0:38

6

I am using std::string in my MFC application and I want to store it in doc's Serialize() function. I don't want to store them as CString because it writes its own stuff in there and my goal is to c...
Conciliar asked 16/9, 2011 at 14:49

5

I have a new SDI project in VS2010 but I can't step into MFC source. I followed the steps here and it seems like the resource symbols are not loaded for some reasons but it wouldn't load on right c...
Zamia asked 22/4, 2014 at 14:52

2

Solved

The picture below (enlarged, so you better see the differences) shows Font differences between dynamically created Edit controls (the upper two examples) and Edit Controls created from the Dialog E...
Dibbrun asked 19/5, 2011 at 10:30

2

Solved

I have all MFC stuff installed foe my VS-2019 Porfessional. I miss the Add New Item "MFC Class From Tyspelib" used in former version to create a simple IDispatch wrapper. I checked everything and...
Delilahdelimit asked 1/7, 2019 at 13:1

6

Solved

How do you change the text color of a CStatic text control? Is there a simple way other that using the CDC::SetTextColor?
Nerty asked 28/10, 2009 at 11:9

4

Solved

I'm just curious what Afx stands for. And what about Fx in FxCop?
Longish asked 24/12, 2008 at 16:46

2

Solved

Whenever I create an new dialog in Visual Studio, it sets the Language property to English (Canada), same as my system default. However, I have a third party MFC library that's rather picky, and de...
Mcmurry asked 12/3, 2012 at 15:18

2

Solved

As a relative newcomer to MFC, I see Device Contexts (DCs) a lot. I vaguely understand that it's something to do with drawing, but the specifics are not very well explained anywhere that I can find...
Schmit asked 6/5, 2010 at 1:8

6

Solved

Can someone explain the difference between a C++ exception and a structured exception in MFC?
Basidiospore asked 24/9, 2010 at 11:35

1

I've installed MFC extension for VS 2019 version 16.7 on Windows x64 operating system using the following extensions: desktop application development with c++ C++ v14.26 MFC for v142 build tools (...
Weekday asked 20/8, 2020 at 6:50

7

Solved

How can I get the value (string) of the current selection in a combobox? (Not the integer index)
Contractile asked 26/1, 2009 at 20:41

3

Solved

I have two processes, A and B. At some point A creates B. After B is created, if A's process tree is killed, I want B to still be around. I am using CreateProcess() to create B, and I can't seem t...
Epiphyte asked 28/6, 2010 at 21:11

4

Solved

I am writing a converter from XML&MathML to MS Word document. I'm using MFC and Word automation, so there's no problem in writing text like this: _Application app; COleVariant vtOpt(DISP_E_P...
Ator asked 9/6, 2009 at 11:8

9

I am working on Win32 project in Visual Studio 2011. It is generating MFC error when I includes afx.h or afxwin.h. To resolve this, I have made the following changes in the Project Properties tab :...
Violent asked 30/7, 2014 at 7:25

© 2022 - 2024 — McMap. All rights reserved.