I know that ES_NUMBER exists to limit CreateWindowEx to numeric input only, is there a similar mechanism for limiting it to only alphanumeric (a-z,0-9) input? Or another way to do something similar. I know I can check after the fact, but I would like to limit it as the user types.
Thanks.
...
Hi,
I'm trying to determine how I can detect when the user changes the Windows Font Size from Normal to Extra Large Fonts, the font size is selected by executing the following steps on a Windows XP machine:
Right-click on the desktop and select Properties.
Click on the Appearance Tab.
Select the Font Size: Normal/Large Fonts/Extra Larg...
I've read a number of posts touting the merits of migrating from VS 2005 to 2008. However, I'd love to hear what the various pitfalls are in actually doing the migration. We're about to migrate and I'd prefer knowing what speed bumps to anticipate and plan for instead of discovering them by surprise along the way. Any helpful guidance on...
In xp 32bit this line compiles with not problem however in vista 64bit this line:
m_FuncAddr = ::GetProcAddress (somthing);
gives the following error
error C2440: '=' : cannot convert from
'FARPROC' to 'int (__cdecl *)(void)'
GetProcAddress is defined as
WINBASEAPI FARPROC WINAPI GetProcAddress (somthing)
And m_FuncAddr as...
I've been developing a GUI library for Windows (as a personal side project, no aspirations of usefulness). For my main window class, I've set up a hierarchy of option classes (using the Named Parameter Idiom), because some options are shared and others are specific to particular types of windows (like dialogs).
The way the Named Paramet...
C++ guarantees that variables in compilation unit (.cpp file) are initialised in order of declaration. For number of compilation units this rule works for each one separately (I mean static variables outside of classes) , but order between them is undefined.
Where I can see some explanations about this order for gcc and MSVC (I know tha...
Hi,
I've got a big big code base that includes two main namespaces: the engine and the application.
The engine defines a vector3 class as a typedef of another vector3 class, with equality operators that sit in the engine namespace, not in the vector3 class. I added a class to the application that also had equality operators in the a...
We want to include data visualization in our desktop GUI (mostly timelines and graphs; clickable, draggable). We want to restrict to open-source, non-copyleft C++ libraries that allow commercial use and are portable across many platforms. Which library can I use? Our GUI is based on WxWidgets.
...
I need to do a fast case-insensitive substring search in C/C++. My requirements are as follows:
Should behave like strstr() (i.e. return a pointer to the match point).
Must be case-insensitive (doh).
Must support the current locale.
Must be available on Windows (MSVC++ 8.0) or easily portable to Windows (i.e. from an open source librar...
Hi,
I want to impersonate other user in windows, for example:
I create a directory with permission only for user A and for the administrators, when logon with user B and run .exe I want to impersonate user A to have permission to edit/remove/insert in that specific directory. How can I do it?
I found this: http://msdn.microsoft.com/en...
This is not a question about which of the two languages is better than the other. I myself can't really decide. Pros and cons as always I guess.
Also, if you feel you always would prefer C over C++, this poll is not for you :-).
However, when I work in C projects I usually feel I'm missing a few language constructs more than others, wh...
Hey,
I have to do a college project using C++. It also requires a GUI and I want to use Perl/Tk for the Gui, but am not sure how to link the C++ to the Perl. The project requires being able to pass variables back and forth. Could anyone point me in the direction of some good tutorials/books for linking the two? Or any ideas on how I sho...
I'm sure this problem has been solved before and I'm curious how its done. I have code in which, when run, I want to scan the contents of a directory and load in functionality.
Specifically, I am working with a scripting engine that I want to be able to add function calls to. I want the core engine to provide very limited functionality....
I have a c++ header file containing a class.
I want to use this class in several projects, bu I don't want to create a separate library for it, so I'm putting both methods declarations and definitions in the header file:
// example.h
#ifndef EXAMPLE_H_
#define EXAMPLE_H_
namespace test_ns{
class TestClass{
public:
void testMetho...
Hi all, I'm encountering a strange memory read/write error while calling a compiled DLL from C#. I use DllImport to get a handle to the function we need, which writes a return value to a parametric pointer to an int (i.e., int* out). This function is called multiple times within a thread, and runs successfully over the execution life of ...
I've read all the advice on const-correctness in C++ and that it is important (in part) because it helps the compiler to optimize your code. What I've never seen is a good explanation on how the compiler uses this information to optimize the code, not even the good books go on explaining what happens behind the curtains.
For example, ...
I want to do something very simple in C++ but i can't find how.
I want to create a function like a for loop where i will ideally enter a variable for the times the iteration should happen and some functions inside brackets my function will execute. I hope i was clear enough. Thanks...
Example
superFor (1)
{
//commands to be executed ...
I've worked with a couple of Visual C++ compilers (VC97, VC2005, VC2008) and I haven't really found a clearcut way of adding external libraries to my builds. I come from a Java background, and in Java libraries are everything!
I understand from compiling open-source projects on my Linux box that all the source code for the library se...
This Question is almost the same as the previously asked Get the IP Address of local computer-Question. However I need to find the IP address(es) of a Linux Machine.
So: How do I - programmatically in C++ - detect the IP addresses of the linux server my application is running on. The servers will have at least two IP addresses and I nee...
Do you know of a good means of learning C++ win32 (not .Net/MFC/ATL/Wx/Qt..) GUI programming ?
A book, a tutorial, an existing project, preferably a hands-on approach with realistic example..
I'm not a beginner, so I don't mind "advanced" starting points..
With thanks.
...