On a windows mobile device I have a mutliline text edit control that is set to read-only and has some static text displayed during it's display lifetime. I would like to only display a vertical scrollbar when it's actually useful (i.e. the text is larger than the display).
I can't easily figure out if the text is to large to display be...
Duplicate: C: Network Programming
What are some good books for learning network programming in C/C++?
...
Is there any way to manually decorate function names in MS C++? I'm going to guess any solution would be Microsoft-specific, and I'm cool with that.
Alternatively, is there a way to declare the function "??_M@YGXPAXIHP6EX0@Z@Z" so the compiler can understand it? FYI, undname lists it as:
void _ _ stdcall `eh vector destructor itera...
-edit- i am trying to close the question. i solved the problem with boost::is_base_and_derived
In my class i want to do two things.
1) Copy int, floats and other normal values
2) Copy structs that supply a special copy function (template T copyAs(); }
the struct MUST NOT return int's unless i explicitly say ints. I do not want the progr...
If there was a base class DeriveMe that had a function virtual void DoSomething(int) and a class that inherits DeriveMe called DerivedThat that had a function void DoSomething(SomeEnum)...would the DerivedThat override the base class DoSomething because enums evaluate to ints during compile time in C++?
I could try this by making DoSome...
I learned windows programming using Visual C++, and the Win32 API. Nowadays, it seems most apps are being developed in .NET using C#. I understand that most of the time there isn't much performance difference between native code and managed code. So I'm wondering, if I were to start writing a new desktop app today, is there any reason (o...
How would I compare 2 strings to determine if they refer to the same path in Win32 using C/C++?
While this will handle a lot of cases it misses some things:
_tcsicmp(szPath1, szPath2) == 0
For example:
forward slashes / backslashes
relative / absolute paths.
[Edit] Title changed to match an existing C# question.
...
Before you jump to TCP/IP Illustrated or UNIX Network Programming, let point out that I am looking for a great book or two that are going to help me on Windows XP and Vista.
I'm a C++ developer creating end-user applications (not a device driver writer or hardware guy) and I want to make use of the networking API's to get applications ...
I just ran into an issue where a stack overflow in a threaded c++ program on HPUX caused a SEGV_MAPERR when a local object tried to call a very simple procedure. I was puzzled for a while, but luckily I talked to someone who recognized this as a stack size issue and we were able to fix the problem by increasing the stack size available ...
In order to be able to properly debug release builds a PDB file is needed. Can the PDB file become less usable when the compiler uses different kinds of optimizations (FPO, PGO, intrinsic functions, inlining etc.)? If so, is the effect of optimization severe or merely cause adjacent lines of code to get mixed up?
(I'm using VC2005, and ...
Are there any tools available in Linux which graphically or textually display memory usage for a program? For example, if I write a C++ program and would like to verify that objects are being allocated and deallocated properly in memory, are there applications available that would visually show the objects being instantiated and deleted...
In the book I'm reading at the moment (C++ Without Fear) it says that if you don't declare a default constructor for a class, the compiler supplies one for you, which "zeroes out each data member". I've experimented with this, and I'm not seeing any zeroing -out behaviour. I also can't find anything that mentions this on Google. Is this ...
I find it very hard to figure out what is wrong with my code when using C++ template meta-programming. It might be that I am just not very good at understanding the error messages, but as far as I'm aware I can't resort to putting in print statements or breakpoints to figure out what's going on.
What tips or advice can you offer when tr...
I have just installed Ctags (to help with C++ development) with my Vim (or rather gVim), and would like to find out your favorite commands, macros, shortcuts, tips that go along with it...
Share your best arsenal. What other Vim add-ons you would recommend for C++ on Vim development?
EDIT What other add-on you would use in conjunction ...
take for instance the following code snippet, the creation of the socket, listening and acceptance of a new socket works fine. The non-blocking mode is also working, however the pselect (or even replacing with select) is not recognizing any IO requests ready on the FDset. so the return value is always 0 (timed out).
I was wondering if...
Does Gecko expose an API for working directly with its DOM? I'm looking for a class like HtmlElement that can be used to build/traverse trees of HTML content.
I'm trying to host Gecko as a web browser control in a desktop application, and would prefer a direct API rather than going through COM. Thanks!
...
Does WebKit expose an API for working directly with its DOM? I'm looking for a class like HtmlElement that can be used to build/traverse trees of HTML content.
I'm trying to host WebKit as a web browser control in a desktop application, and would prefer a direct API rather than going through COM. Thanks!
Thanks!
...
Hi, how do I check the value of the top of the stack in Lua?
I have the following C++ code:
if (luaL_loadfile(L, filename) == NULL) {
return 0;// error..
}
lua_pcall(L,0,0,0); // execute the current script..
lua_getglobal(L,"variable");
if (!lua_isstring(L,-1)){ // fails this check..
lua_pop(L,1);
retu...
Hello everyone,
I'm implementing a crash reporting tool for a game I'm writing, and I'd like to provide a (fairly) detailed native stack trace for the report. I've already implemented this on GNU/Linux, but I'm having trouble on Windows. Here's some sample code I tried to get working:
http://pastebin.com/m30b50f76
Each time I call S...
I have an XML parser that crashes on incomplete XML data. So XML data fed to it could be one of the following:
<one><two>twocontent</two</one>
<a/><b/> ( the parser treats it as two root elements )
Element attributes are also handled ( though not shown above ).
Now, the problem is when I read data from socket I get data in fragments...