I need to display and read a MFC property in such way the input behaves as a percentage.
Right now, it looks as this:
http://imagebin.org/98392
But, instead of the 0.845 I would like to display as 84.5%
What I need to do?
...
Trying to get some basic understanding of console functionalities. I am having issues so consider the following...
#include "stdafx.h"
#include<iostream>
#include<conio.h>
using namespace std;
/*
This is a template Project
*/
void MultiplicationTable(int x);
int main()
{
int value = 0;
printf("Please enter any number \n\n"...
Hello,
I need to know about good C++ Reflection API(Would be better if Microsoft API is available) which enables me to determine the types(classes,structs,enums,ints,float,doubles...)identification at runtime, declaring them and finally to call methods on those types at run time too.
Regards
Usman
...
I am using a function that returns a char*, and right now I am getting the compiler warning "returning address of local variable or temporary", so I guess I will have to use a static var for the return, my question is can I make something like if(var already set) return var else do function and return var?
This is my function:
char * G...
The code of Game.h:
#ifndef GAME_H
#define GAME_H
class Game
{
public:
const static string QUIT_GAME; // line 8
virtual void playGame() = 0;
};
#endif
The error:
game.h(8): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
game.h(8): error C2146: syntax error : missing ';'...
I have some code in a loop
for(int i = 0; i < n; i++)
{
u[i] = c * u[i] + s * b[i];
}
So, u and b are vectors of the same length, and c and s are scalars. Is this code a good candidate for vectorization for use with SSE in order to get a speedup?
UPDATE
I learnt vectorization (turns out it's not so hard if you use intrinsics) and ...
I would like to make a function IsWordPronounceable(SomeWord:String): boolean; "english language"
i am working with SAPI Speech Recognition and i need this function. I use delphi compiler, C/C#/C++ or any language is ok.. please help. i dont know how to start...
from the start, i thought adding grammar rule could solve the problem. the ...
I want to use the OleDB interfaces directly to open a connection to a DB, create a command and executing it (for example using the ICommandText interface).
The main thing I can't find is how to create the connection and the command object and how to connect the object that implements the ICommandText to the connection.
In ADO I would ju...
In the String Table for an edit box for numeric entries I can do:
1E__C X(10): Alphanumeric 10
1N__C 000: Numeirc 3, with leading zeroes (cannot insert 0)
1N__C 999: Numeric 3 ( cannot insert 0)
1N__C NNN: Numeric 3, 0 can be inserted (just ONE 0)
Is there an entry to the String Table so that the following entry can be inserted to ...
After upgrading to windows mobile 6.5, my ListView control does not work properly with custom items (rows with alternate colors) and the new gesture mechanism... On a mobile device, if the user initiates a flick or pan, after scrolling the first few items, the last items are not shown on the screen, but will show up if the user explicitl...
I am thinking about adding configurable settings to an application, and I think the easiest ways are an external file or win registry (its a win only app).
Which way would be better?
I was wondering, an user with not enough permissions may not be able to create/write the config file. And in the case of the registry, would todays antivi...
Hi
I am trying to figure out a way to convert a FILETIME structure from UTC to Local and vice versa.
I've been using the two functions: FileTimetoLocalFileTime() and LocalFileTimeToFileTime(). The problem seems that they do not work as expected.
As an example: First I got a local file time using:
WIN32_FIND_DATA fd;
FindFirstFile(_T...
I'm using Visual Studio 2008 Pro programming in c++. When I press the run button in debugging mode, are any compiler optimizations applied to the program by default?
...
I am new to MS ADO and trying to understand how to set the size on command parameters as created by the
command.CreateParameter (Name, Type, Direction, Size, Value)
The documentation says the following:
Size Optional. A Long value that
specifies the maximum length for the
parameter value in characters or
bytes.
...
If...
I have a class like this:
class OBJ{...};
class A
{
public:
vector<OBJ> v;
A(int SZ){v.clear(); v.reserve(SZ);}
};
A *a = new A(123);
OBJ something;
a->v.push_back(something);
This is a simplified version of my code.
The problem is in debug mode it works perfect.
But in release mode it crashes at "push_back" line. (with all...
I want to get some settings I store in the registry, and if they differ from a #define I want to redefine it, could I do it this way?:
#define DEFINED_X "testSetting"
void LoadConfig()
{
regConfigX = some value previusly stored in the registry;
if(regConfigX!=DEFINED_X)
{
#undef DEFINED_X
#define DEFINED_X r...
Why does VisualC++ (2008) get confused 'C2666: 2 overloads have similar conversions' when I specify an enum as the second parameter, but not when I define a bool type?
Shouldn't type matching already rule out the second constructor because it is of a 'basic_string' type?
#include <string>
using namespace std;
enum EMyEnum { mbOne, mb...
hai all...
Am writing simple application for capturing video from camera and save in .WMV files using vc++ Directshow.i done this task.bt i need to write file as MPEG4 file type.
can anyone help me.
CAMERA---->SAMPLEGRABBER---->getting streams from sample graaper..
i get stream from camera like this.
kndly help me
thanks
...
sprintf_s(cmd, "%c:\index.exe", driver);
I am trying to run a flash file, the application is built in VS 2008 , on win 7. The application works well on WIN7 but fails in XP. Ie the application launches but doesn't complete the task. I see the application running in Task Manager
...
I have created a dll in C++ using a Class Library project in Visual Studio. I need to call a method in the dll from a C# application.
I got to know there are 2 approches. One is to add the dll project reference to C# project or use DllExport to export method. However when I tried in both ways it always gives the following error when t...