- Strength to Increase Rep
- +6
- Strength to Decrease Rep
- -1
- Upvotes Received
- 25
- Posts with Upvotes
- 17
- Upvoting Members
- 14
- Downvotes Received
- 1
- Posts with Downvotes
- 1
- Downvoting Members
- 1
- Interests
- Chess, Powerlifting.
Re: You should not execute any code of yours if the nCode parameter passed to your hook procedure is less than zero (actually it should be equal to HC_ACTION, which is defined as zero in WinUser.h). | |
Re: int main(int argc, char** argv) is better than int main(), because with the former one, your program can analyse the command line parameters passed to it. The number of argument passed is available in the argc parameter, and the arguments themselves can be accessed by the accessing the argv parameter. … | |
Re: [QUOTE=Ancient Dragon;1577925] 2. Probably uses [URL="http://msdn.microsoft.com/en-us/library/ms632589(v=vs.85).aspx"]windows hook[/URL]s to capture keyboard events.[/QUOTE] The CTRL+ALT+DEL key combination is SAS (Secure attention sequence), and will not be delivered to hooks. Even if it were not SAS, it's the OS that draws the screen when that key combination is pressed, and the OS does … | |
Re: If you're using MFC, then the window handle is already stored in a data member of the CWnd class known as m_hWnd. So, m_hWnd is all you need: [url]http://msdn.microsoft.com/en-us/library/zwdbkfhc%28VS.80%29.aspx[/url] | |
Re: What array in MFC? MFC has many array types (string array, word array, etc.,). See the MFC collections here: [URL="http://msdn.microsoft.com/en-us/library/942860sh%28v=VS.80%29.aspx"]http://msdn.microsoft.com/en-us/library/942860sh%28v=VS.80%29.aspx[/URL] | |
Re: If your code doesn't work within the IDE, there's no question of shipping it ever. The debugger does you a huge favour by watching what you're doing with the memory and tells you when your code does something insane (like stomping on memory that it doesn't own). Single stepping should … | |
Re: Go with the link that Ancient Dragon provided. | |
Re: [QUOTE=Ancient Dragon;1241210]If you are writing a MS-Windows GUI program then you might be able to call SendThreadMessage().[/QUOTE] There's no such thing as SendThreadMessage(). You were probably referring to PostThreadMessage(), but that would be an option only if the thread that you need to communicate to has a message pump, and … | |
Re: I don't see what can you save by squeezing out anything from that tiny bit of code shown. Take a look at this: [URL="http://www.flounder.com/optimization.htm"]Optimization: your worst enemy[/URL], which might clear up a few things for you. | |
Re: The name of an already running process cannot be changed dynamically. You cannot "hide" your process from the list of processes shown in task manager. Something highly esoteric like kernel patching can be done, but if you didn't know even that much, chances are that you aren't going to do … | |
Re: If you were hosting the website on a Windows server, you could have the core of your application written with c++ as an ISAPI DLL, and it could be loaded by IIS. Please search google for ISAPI filter. | |
Re: [QUOTE=pradeey;1105694]chk this piece of code [CODE]#include<iostream.h> using namespace std; class hi { public: void print() { cout<<"hi"; } }obj; int main() { hi *h; h->print(); } [/CODE] output---> hi [/QUOTE] This method has the "advantage" of crashing the whole program because you're trying to use an uninitialised pointer. | |
Re: Just include the precompiled header (stdafx.h) in all the source files before including any other headers. The precompiled header option can come very handy if you've a boatload of headers that you aren't going to change, so that it won't need to be built with every compilation! | |
Re: Take a look at the [URL="http://gmplib.org/"]MP BigNum Library[/URL]. | |
Re: [QUOTE=Hawkpath;1105489]Hi, I'm just learning win32 and i wanna know: is it really necessary that i memorize all of the syntax. Is that what professionals do? Or can I just copy and paste it every time and just know what it does. Thanks, Hawkpath[/QUOTE] Syntax of what? As you go on … | |
Re: Use the _T macro, which will automatically convert literal strings to the appropriate type (Unicode or MBCS), based on the build type. In short, a good thing to do: Always enclose literal strings in the program within the _T macro. For example: [CODE]SomeAPICall(_T("Some literal string"));[/CODE] See [URL="http://msdn.microsoft.com/en-us/library/dybsewaf(VS.80).aspx"]Unicode Programming Summary[/URL]. | |
Re: Cast the void pointer to the appropriate type and use it. See [URL="http://www.cplusplus.com/doc/tutorial/typecasting/"]Type Casting[/URL]. | |
Re: There's no one such best c++ compiler. "Best" depends on what you're looking for in the compiler. I do a whole lot of c++ programming on Windows, and for me, the Visual C++ compiler is the best. | |
Re: [QUOTE=Nikhar;1102931]Hi... I'm trying to study graphs but I cant find a good tutorial on it. I googled it, but couldn't find what I needed. Can you please suggest me a good tutorial on graphs in c++. I am basically looking for how a graph class is implemented in c++, an … | |
Re: [QUOTE=kenoch;1102743]I have a problem with this topic ..Solution to algorithm using static and dynamic data structure[/QUOTE] Is google down where you're living? Thankfully, it's up and running here, so here's the first link it returned: [URL="http://en.wikipedia.org/wiki/Static_and_dynamic_data_structures"]http://en.wikipedia.org/wiki/Static_and_dynamic_data_structures[/URL] | |
Re: [QUOTE=Ancient Dragon;1091497] When compiling with _UNICODE the _T macro converts char* to wchar_t*. When NOT compiling for _UNICODE the _T macro does nothing.[/QUOTE] This is wrong. The _T macro will actually convert a TCHAR to wchar_t (2 bytes) or to a char (single byte), based on the build (Unicode or … | |
Re: You could use one of those open source compression libraries. Last time I needed compression, I used the [URL="http://www.7-zip.org/sdk.html"]LZMA SDK[/URL]. And with encryption, you haven't specified what sort of encryption are you looking for. The strongest known encryption is [URL="http://en.wikipedia.org/wiki/Advanced_Encryption_Standard"]AES[/URL]. There are a few C++ implementations of the said encryption … | |
Re: [QUOTE=KaZu88;1088440] Detected memory leaks! Dumping objects -> {117} normal block at 0x003960E0, 40 bytes long. Data: < > CD CD CD CD CD CD CD CD CD CD CD CD CD CD CD CD Object dump complete.[/QUOTE] That dump is not very helpful, don't you think? As a first step, … | |
Re: Probably [URL="http://msdn.microsoft.com/en-us/library/ms646299(VS.85).aspx"]GetKeyboardState()[/URL] could be of help to you. | |
Re: [QUOTE=rahul8590;1087949]i DO have searched the google to do multithreaded programming using c++ and found there were few like the ones supported in BOOST libraries and zthreads .. I would be glad if u guys could help me in suggesting much better ways in doing so .[/QUOTE] Hi, Firstly, wait! Do … | |
Re: Sweet, but there's an unused std::string declared in the main. OK, I'm being a nitpick. :) | |
Re: [QUOTE=laelzio.mosca;1088566]I finished my tic tac toe game program, I`d like to know if anyone can tell me what I need to do in order to send the .exe file to someone and make it so the file executes without problems. Thanks guys[/QUOTE] That depends on what and how you used … | |
Re: Could probably be a bug with the compiler. I can't think of anything else. I'm running on VS 2008 and I get consistent result for both builds as 20. | |
Re: [QUOTE=abbel;1088198]I need an encryption code for a text[/QUOTE] I need a Mocha blast, a blueberry pie (preferably with a hint of cinnamon) and a nice massage by a beautiful woman. I think we both aren't going to get what we want. But more seriously, if you [URL="http://www.google.co.in/search?q=AES+encryption"]search the internet[/URL], you … | |
Re: Hi, The return value is zero, because the size of the folder itself is zero. If you need to find the size of all the contents within a directory, that's a different problem to solve. I realise the documentation for GetFileSize() could have been a little more helpful stating how … |