Hi All,
I have an application that loads few image files from "images\" folder relative to the location where the application is located. Can anybody let me know how do I get the location in Visual C++. A quick google search revealed, there is no straightforward way. Can anybody help me to solve this ?
Thanks
DM
...
Preferably using C++. Or a tool I can use from the command line. So far I've figured out how to extract icons from .exe files, but I can't set icons... Any suggestions?
...
Hi guys,
Here is a very simplified program which reproduces the issue I faced in the real application:
#include "stdlib.h"
typedef unsigned short int shft;
struct xptr {
int layer;
void * addr;
xptr() : layer(0), addr(NULL) {}
xptr(int _layer, void *_addr) : layer(_layer), addr(_addr) {}
xptr(const xptr& x) { la...
Where I can disable in Microsoft-Visual-C++ showing console window?
...
Hi, I want to write a C++ template like this:
template <class Type1, class Type2, class Type3,....>
class MyClass
{
//...
};
But, "the number of types" is variable.
For example, a user can create an object with 3 types:
MyClass<int, int, int> obj;
or he can create an object with 5 types:
MyClass<int, int, int, in...
Is there any way to easily test C++ classes in java way.
In java you can add static function main and run it directly from IDE
class Foo{
...
public static void main(String args[])
{
System.out.println("Test class foo here");
}
}
is it possible to do it in Visual C++ ?
Of course you can create another project, but it ...
Hi All,
I'm using this code block to get the font name, style and size selected by the user from the font dialog of CMFCPropertyFontProperty control. I'm already able to get the name and the style, but the size seems to return a different value.
*CMFCPropertyGridProperty pCurSel = m_wndPropList.GetCurSel();
CMFCPropertyGridFontProper...
I am getting the following error in my VC++ COM project. What is the problem in linking the lib files here?
Error 4 error LNK2019: unresolved external symbol _BVUOpen@8 referenced in function "unsigned int __stdcall AFunc(void *)" (?AFunc@@YGIPAX@Z) CBillAcceptor.obj BillAcceptorCOM
...
Error 1 error C2039: 'memchr' : is not a member of '`global namespace'' c:\program files\microsoft visual studio 9.0\vc\include\cstring 19 new project 17
...
Does anyone know if there is a way to get the new multi-targeting in VS2010 Beta 2 to target v8 toolset?
...
Hi All,
I am trying to implement double buffered drawing in a windows mobile application. But I still see the flickering. I am using InvalidateRect() in my rendering code(not shown here), instead of Updating the entire window. The rectangle mentioned in this API is flickering when I update/paint. Please help
case WM_PAINT:...
Hi,
Are there Visual C++ versions of the following (in GCC)?
__builtin_return_address
__builtin_frame_address
Reference - http://gcc.gnu.org/onlinedocs/gcc/Return-Address.html
If not, is there a way to emulate them?
Thanks.
...
Question title says it all, really. Need to add lalleg to the end of my linking command.
...
Update: I get this warning when compiling: multiple '.text' sections found with different attributes
Hi,
I've compiled some libraries (.a and .dll) in Linux using the MinGW Cross Compiler. I can successfully link against them (.a) in Visual Studio 2008. However, when it runs (using .dll), it terminates with the address pointer pointing...
In Java, updating double and long variable may not be atomic, as double/long are being treated as two separate 32 bits variables.
http://java.sun.com/docs/books/jls/second_edition/html/memory.doc.html#28733
In C++, if I am using 32 bit Intel Processor + Microsoft Visual C++ compiler, is updating double (8 byte) operation atomic?
I ca...
How is winforms programming in visual c++/c# different from windows programming in visual c++(MFC).
Also I want to know whether C# is strong enough to do Windows programming as in other than forms.
...
Why I get the following warning for the following code :)
Code:
_stprintf(m_szFileNamePath,_T("%s"),strFileName);
warning C4996: '_swprintf': swprintf has been changed to conform with the ISO C standard, adding an extra character count parameter. To use traditional Microsoft swprintf, set _CRT_NON_CONFORMING_SWPRINTFS.
I know _s...
Yesterday I learned that inline assembly (with the __asm keyword) is not supported under Microsoft Visual C++ when compiling for AMD64 and Itanium targets.
Is that correct? And if so, does anyone know why they would not support inline assembly for those targets? It seems like a rather big feature to just drop...
...
This typedef:
typedef DWORD WINAPI
(* CM_Open_DevNode_Key)(DWORD, DWORD, DWORD, DWORD, PHKEY, DWORD);
compiles fine in BorlandCpp, however, when I compile it in msvc I have to remove WINAPI (which is just an alias for __stdcall):
typedef DWORD
(* CM_Open_DevNode_Key)(DWORD, DWORD, DWORD, DWORD, PHKEY, DWORD);
Why is this happening?...
I'm moving my C++ codebase from Visual Studio 2k3 to Visual Studio 2k8. Code contains
#pragma optimize( "a", on )
MSDN says that it means "assume no aliasing". Later versions of VS refuse to compile this and MSDN doesn't seem to say what to do with code containing this #pragma.
What does "assume no aliasing" mean and how to I make a ...