Hey !
I'm building an MFC app in Visual Studio 2008 which classifies textures and I need some sort of lightweight database to hold the characteristics (just some doubles and strings) which can be:
-carried around with the app on different computers;
-be able to perform queries on it from the app (searches , updates ,inserts ,etc);
Cu...
I need to fill a CImageList with a number of bitmaps which are stored in separate bmp files (rather than as a single bmp with numerous parts). I assume I need to create a CBitmap so I can call the Add method of CImageList. So how might one create a CBitmap object using only MFC Resource IDs?
...
I' am working on a small example and am a bit of curious using criticalsection in my example.
What I'am doing is,I have a CStringArray(which has 10 elements added to it).I want to copy
these 10 elements(string) to another CStringArray(am doing this to understand threading and Critical section),I have created 2 threads,Thread1 will copy ...
Trying to log the application version details in our weblogs using the headers:
Should be a one liner..but for some reason whenever I specify anything but NULL for the headers it causes an exception (InternetOpenUrl() call returns NULL) - anyone able to explain why?
CInternetSession internet;
CHttpFile * pHttpFile;
CString header...
I have implemented my custom button inheriting from CButton and drawing it by using uxtheme.dll (DrawThemeBackground with BP_PUSHBUTTON).
Everything works fine but I have two statuses (Normal and Pressed) which Hot status is the same. It means when the user places the cursor over the button it is drawn alike regardless the button status...
I've loaded a CBitmap object from a resource ID, and I'm now wanting to scale it to 50% its size in each dimension. How might I go about this?
...
I've meddled with some code but I am unable to read the entire file properly...a lot of junk gets appended to the output. How do I fix this?
// wmfParser.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include "wmfParser.h"
#include <cstring>
#ifdef _DEBUG
#define new DEBUG_NEW
#endif
// The one an...
Hello all,I am learning multi-threading and for the sake of understanding I have wriiten a small function using multithreading...it works fine.But I just want to know if that thread is safe to use,did I followed the correct rule.
void CThreadingEx4Dlg::OnBnClickedOk()
{
//in thread1 100 elements are copied to myShiftArray(which is a...
I have a CRichEditCtrl, and an algorithm works on its contents in-place, iterating through the contents and making changes. This seems to cause it to re-paaint every time, which causes flickering and a noticeable time to complete the operation, especially if the control starts scrolling.
I wondered if there's a neat way for me to stop it...
1.) What is the difference between
CArray <SomeClass> collection;
and
CArray <SomeClass,SomeClass> collection;
or even
CArray <SomeClass* ,SomeClass* > collection;
?
2.) While reading some comments on Stackoverflow I came to a note saying "Don't use CArray". Why should CArray not be used?
...
As you might have already guessed I don't want to sort the pointer addresses but the objects/data.
At the moment I have an array like this:
CArray <ReadObject *> readCollecion;
and I sort it like that:
std::sort(readCollecion.GetData(), readCollecion.GetData()+readCollecion.GetSize(), keySortFunction);
Works perfectly with the ke...
The following code doesn't compile for me in MSVC2005:
std::vector<CMenu> vec(10);
CMenu is an MFC menu object (such as a context menu). Through some testing I learned that CMenu does not have a public copy constructor.
To do what I wanted to do, I needed to use a dynamic array.
CMenu* menus = new CMenu[10];
// ...
delete [] menus;
...
Hi.
This is crazy. It started happening in my main project, so I created a tiny sample brand-new project to reproduce it in and sure enough.. It does NOT happen in a sample project I created that is only a Win32 console app.
I'm running this on Win7x64, if that matters. VS2008 SP1.
Here goes. I create a small dialog app with a button...
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. What does creating a "compatible Device Context" mean, and why is it important? What does SelectObject do, and how must I make a DC compatib...
I've written the following code, which attempts to take a 32x32 bitmap (loaded through MFC's Resource system) and turn it into a 16x16 bitmap, so they can be used as the big and small CImageLists for a CListCtrl. However, when I open the CListCtrl, all the icons are black (in both small and large view). Before I started playing with resi...
Hi all
I have the situation as follows
I have develpoed one test project in visual studio 2008 to test my target project.
I was getting the following exception when i ran test case in my PC
System.IO.FileNotFoundException: The specified module could not be found. (Exception from HRESULT: 0x8007007E)
at System.Reflection.Assembly._n...
I think the title states my problem fairly well. Where are those mfc symbols?
Some background info:
I have a crash dump that I want to analyze in WinDbg.
My symbol path contains msdl.microsoft.com/download/symbols (and it says h t t p first but I'm a new user here so I'm not allowed to write that twice.
The 9.0.30729.4148 version...
I am working on a MFC Document View architecture application which has multiple documents and views and a tabbed window interface.
I have been tasked with making an automatic switch to another tab on the press of the OK button in one of the other tabs. When the other tab is clicked on it uses a C++ wrapper over IWebBrowser2 to navigate...
I wanna Write data into .txt file created by CFileDialog, in C++.
The problem I am facing is that below codes doesn't work, although there is no build error. The .txt file created by CFileDialog can not be found for some reason. What's wrong the code?
what's the efficient way to Write data into .txt file created by CFileDialog, in C++?...
I don't need ribbons but i would like to have the blue/orange style.
Currently i planned to use WxWidgets but it seems to be not able to do anythink like this.
Do i have an alternative other then MFC + Featurepack ?
...