Dear colleagues!
Please help me understand what I’m doing wrong!
I have a problem when I programmatically activate my IE toolbar from other program.
Making it following the instruction given at Microsoft support site (http://support.microsoft.com/kb/q255920/):
SHDocVw::IWebBrowser2Ptr pIE;
HRESULT hr = ::CoCreateInstance(CLSI...
Let's consider we have QWidget that contains QTableWidget (only). So we want to resize the table by resizing the widget, and we dont want to have an indet between the QWidget border and cells of the table. What kind of property is making posible for QTableWidget to be aligned with the borders of it parent widget?
Thanks.
...
Hello. I am trying to enable transparency antialiasing in my Ogre-Direct3D application, but it just won't work.
HRESULT hres = d3dSystem->getDevice()->SetRenderState(D3DRS_ADAPTIVETESS_Y, (D3DFORMAT)MAKEFOURCC('S', 'S', 'A', 'A'));
/// returned value : hres == S_OK !
This method is taken from NVidia's technical report.
I can enable t...
Hello everyone,
Why doesn't C++ support unsigned double syntax?
Thanks in advance
...
Hello!
I found a source code on MSDN about how to enable/disable privileges in C++
According to the source code, the linker must include cmcfg32.lib, but it can't be found...
I tried to compile without including that lib, it compiles without any error, but when I launch my program, it crashes with a fatal error.
So please, if you kno...
Starting from Visual Studio 2010, iterating over a set seems to return an iterator that dereferences the data as 'const data' instead of non-const.
The following code is an example of something that does compile on Visual Studio 2005, but not on 2010 (this is an artificial example, but clearly illustrates the problem we found on our own...
Hi. That's my first question :)
I'm storing the configuration of my program in a Group->Key->Value form, like the old INIs. I'm storing the information in a pair of structures.
First one, I'm using a std::map with string+ptr for the groups info (the group name in the string key). The second std::map value is a pointer to the sencond st...
I'm reading Thinking in C++ (vol. 2):
Whenever a function is called,
information about that function is
pushed onto the runtime stack in an
activation record instance (ARI), also
called a stack frame. A typical stack
frame contains (1) the address of the
calling function (so execution can
return to it), (2) a pointer to...
Is there a way to get all running threads in Qt application from QApplication object?
...
hi,
I have the following code inside the .h file and I'm not sure what does the assignment statement do and how is it called properly?
virtual void yield() = 0;
I thought that the function returns a value of 0 by default but since this function returns void I am a little bit confused. Can anyone comment on this and maybe say how can ...
What good IDE would you recommend for C++ (GNU) programming, with support for the wxWidget library and a GUI builder/designer all in one? Can be either for windows or linux.
...
A co-worker asked about some code like this that originally had templates in it.
I have removed the templates, but the core question remains: why does this compile OK?
#include <iostream>
class X
{
public:
void foo() { std::cout << "Here\n"; }
};
typedef void (X::*XFUNC)() ;
class CX
{
public:
explicit CX(X& t, XFUNC xF) : ...
In a multithreaded scenario, I have a method like this:
bool WaitForChange( time_duration WaitTime ) const;
This method waits either until the state of the object has changed and returns true, or until the timeout times out (how do you say that?) and returns false.
My intuition is, that const is to protect against unwanted side-effec...
Hey,
I'm working on a small roguelike game, and for any object/"thing" that is not a part of the map is based off an XEntity class. There are several classes that depend on it, such as XPlayer, XItem, and XMonster.
My problem is, that I want to convert a pointer from XEntity to XItem when I know that an object is in item. The sample ...
Just a stupid question .
I have a
std::vector<SomeClass *> v;
in my code and i need to access its elements very often in the program, looping them forward and backward .
Which is the fastest access type between those two ?
Iterator access
std::vector<SomeClass *> v;
std::vector<SomeClass *>::iterator i;
std::vector<SomeClass *>:...
I've written a 'server' program that writes to shared memory, and a client program that reads from the memory. The server has different 'channels' that it can be writing to, which are just different linked lists that it's appending items too. The client is interested in some of the linked lists, and wants to read every node that's added ...
I have a variable of type size_t, and I want to print it using printf(). What format specifier do I use to print it portably?
In 32-bit machine, %u seems right. I compiled with g++ -g -W -Wall -Werror -ansi -pedantic, and there was no warning. But when I compile that code in 64-bit machine, it produces warning.
size_t x = <something>...
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...
In the stdint.h (C99), boost/cstdint.hpp, and cstdint (C++0x) headers there is, among others, the type int32_t.
Are there similar fixed-size floating point types? Something like float32_t?
...
I need to work on C++ project on my windows machine. My project will consist of various classes(.h and .cpp) as well as the startup file to start the application. The preliminary design is simple but the application has the potential to gain complexity as time goes by. What I need here is ideas to set up the C++ project compiler/IDE/Make...