I'm trying to get a notification to pop up something like these bubbles in an MFC application:
I'm currently making an interface mockup in C# to show some stakeholders, so it would be nice to have it there too.
It doesn't necessarily have to be speech-bubble-esque: it could be something like a tooltip - but it does have to appear w...
Is there a way to create a modeless dialog box in C++ MFC which always stays on top of the other windows in the application? I'm thinking sort of like the Find dialog in Visual Studio 2005 - where it stays on top, but you can still edit the underlying text.
(If it makes any difference, it's not MDI; it's a dialog-based app)
...
Hes my code and I can't figure out where I'm getting the divide by zero problem.
mreviewApp.cpp
const int SIZE = 80;
const char DELIMIT = '|';
void parseLine(const char line[], string& title, int& rating);
void stringTrim(char st[]);
void printMrList(std::vector <Mreview> mrList);
Mreview searchTitle(std::vector <Mreview> &mrList, str...
std::vector< std::vector<coords> >::iterator iter;
for(iter = characters.begin(); iter != characters.end(); iter++)
{
std::vector<coords>* cha = iter; // doesn't work.
}
// does work.
std::vector<coords>* character = &characters.at(0);
coords* first = &character->at(0);
And I don't get why. Isn't iter supposed to be a pointer to an ...
I have a source code of about 500 files in about 10 directories. I need to refactor the directory structure - this includes changing the directory hierarchy or renaming some directories.
I am using svn version control. There are two ways to refactor: one preserving svn history (using svn move command) and the other without preserving. ...
Hi all,
I have to create a server(java) - client(c++) system, both server and client will have to work with objects (data types) wich are the same for the client and for the server, for example a car object will be created on the client side and then send to the server where aditional calculations will be done on the car object. What i ...
I'm about to take a C++ test. But I only get one crack at it to get over 85%. If I don't push over that, then I don't get the job.
The problem with these tests are that they typically target generic C++, and depending on what libraries you use your definition of generic may differ. STL and Boost may seem logical to some (and should...
how allocate memory dynamically for the array of stucture....
eg:
class students
{
struct stud
{
int r_no;
char name[20];
}*s;
}
how to allocate memory dynamically for *s...
...
Consider this code:
#include <vector>
void Example()
{
std::vector<TCHAR*> list;
TCHAR* pLine = new TCHAR[20];
list.push_back(pLine);
list.clear(); // is delete called here?
// is delete pLine; necessary?
}
Does list.clear() call delete on each element? I.e. do I have to free the memory before / after list.clea...
Can anyone tell me what this cast has for effect (besides setting happyNumber to 1337), if any at all, and if it has no other effect, how come I can write code like this??? Is this a compiler bug, or some "hidden away feature" of C++?
int happyNumber = static_cast<int>(123.456, TRUE, "WTF" , false , "IS" , NULL , "GOING" , 0xff , "ON???...
I am trying to find the easiest way to intercept TCP SYN packets sent by my computer in a c++ program. There are couple of options that I know. One would be monitor all traffic and just selectively work with the SYN packets doing nothing with the rest. Another option I came across was to use a packet filtering utility which will forward ...
Hi,
I am a developer working on vc, but in my project there are some delphi components. I need to debug the delphi components to fix some issues.
What are the things that are must to generate a dll in debug and then start debugging in delphi?
Thanks.
...
Does anyone know if it is possible to generate ActiveX properties at run-time?
I only need to be able to get and set these properties from Visual Basic.
My ActiveX control is coded in C++ and I already know how to create properties by implementing hard-coded C++ get and put functions. However I have potentially a large set of prope...
Hi,
i have the following template method,
template <class T>
void Class::setData( vector<T> data )
{
vector<T>::iterator it;
}
and i'm getting the following compilation error ( XCode/gcc )
error: expected `;' before 'it'
i found someone else with a similar problem here (read down to see it's the same even though it star...
I'm a beginner C++ programmer and so I've learnt using arrays rather than vectors (this seems to be the general way to do things, then move on to vectors later on).
I've noticed that a lot of answers on SO suggest using vectors over arrays, and strings over char arrays. It seems that this is the "proper" way to code in C++.
That all be...
This is totally an opinion question. More for chatter.
I'm taking some c++ tests and they are littered with cin and cout's.
Do people acutally still use these. I mean I've not seen one in an actual public application ever.
The last question I answered in a test was
int c1;
cout << "Enter numbers: " << flush;
for(int n = 0; cin >> ...
I need in a DLL to use a class, defined in an executable (DLL and executable are compiled by the same compiler). But I don't want the source code of this class definition to be available to DLL, only declaration.
One possible way to do it is to make all the necessary class methods to be virtual (so that DLL linker will not need these me...
I have a class, lets call it A, and within that class definition I have the following:
static QPainterPath *path;
Which is to say, I'm declaring a static (class-wide) pointer to a path object; all instances of this class will now have the same shared data member. I would like to be able to build upon this class, subclassing it into mo...
Hi,
I am trying to port a fairly large C++ project to using g++ 4.0 on MacOS X. My project compiles without errors, but I can't get gdb to work properly. When I look at the stack by typing "bt" on the gdb command line, all file names and line numbers displayed are wrong.
For example, according to the gdb stack trace, my main() functio...
Hello,
This is my code:
// c++ (main.cpp)
#include <vector>
#include <iostream>
#include <boost/python.hpp>
#include <boost/python/enum.hpp>
#include <boost/python/def.hpp>
#include <boost/python/module.hpp>
using namespace std;
using namespace boost;
using namespace boost::python;
class Base
{
public:
Base(void) {}
virtual void ...