921 Posted Topics
Re: Yep, nezachem is correct, the prototypes in that header mean nothing if they aren't linked with the right library. Try linking to comctl32.lib. | |
Re: I'm afraid the code is correct :) The problem is a compiler setting, make sure the project is a "Windows Application". And if you seriously can't figure out the compiler option (and you're using VC++), add this line of code to the very start of your program.[CODE]#pragma comment(linker, "/SUBSYSTEM:WINDOWS")[/CODE] | |
Re: I don't see how this is urgent in any way whatsoever. Putting that in your thread title wont make anyone more inclined to help you. As for your actual question, I guess you could make a new array, and insert them in ordered one number at a time. | |
Re: I wrote this snippet some time ago, it's the bare minimum and should be fairly easy to understand. [URL="http://www.daniweb.com/code/snippet217340.html"][link][/URL] | |
Re: Think about how you would find the running average on a piece of paper, then apply it to code. Seeing as you're required to do this with while loops, I don't see much harm in showing you how to do it with for loops.[CODE]#include <stdio.h> int main() { const int … | |
Re: No idea why you get that error, I compiled your code and the resource, worked flawlessly. | |
Re: Show some code, and I'll try to help. | |
Re: Not sure, but does this work?[CODE]Datetime^ curDate = gcnew Datetime(); curDate = DateTime::Now;[/CODE] | |
Re: Really not the best way to detect keystrokes, I'd suggest a Windows hook, because you can actually change what the output of that key will be. For example, here's how you could turn the Space bar into the Return Key.[CODE]#define _WIN32_WINNT 0x0500 #include <windows.h> #include <iostream> using namespace std; LRESULT … | |
Re: [QUOTE]tell him beyond that I can't help him any further.[/QUOTE]If you're not a Windows user, don't try to solve a Windows problem, simple as that. It's about the equivalent of me going to a Linux forum and telling every person to switch to Windows because of a problem they have … | |
Re: Wouldn't usually give away code, but it's just so small.[CODE=CPLUSPLUS]#define _WIN32_WINNT 0x0500 #include <windows.h> #include <iostream> #include <fstream> void saveCaption(HWND hwnd, char *filename) { int length = GetWindowTextLength( hwnd ) + 1; char *caption = new char[length]; GetWindowText( hwnd, caption, length ); std::ofstream out( filename ); out << caption; delete[] … | |
Re: Everybody's reply to this thread should ultimately be "Replying to this thread". | |
Re: Oops, sorry AD :icon_eek: that was supposed to be +rep! | |
Re: Check variables that you allocated memory on, and make sure you deleted it somewhere else in the code. If you forget to free any memory, that's a memory leak. | |
Re: What sort of things do you plan on doing? Are you looking to be able to manage an animation? or just draw shapes/text on a window. | |
Re: [QUOTE=marco93]Avoid Qt (not used anymore in Europe (expensive and slow)) Either use Win32 api (Win32 gurus use it) or .NET [/QUOTE]Of course Win32 Gurus would use the Win32 API, it's what they're good at, that doesn't mean it's the best thing to use. Qt is multi-platform, whereas the Windows API … | |
Re: [QUOTE]Not really my "favorite", but Wanted is a very very good action movie. If you liked Die Hard you will also like Wanted.[/QUOTE]I liked Wanted, even though it went a little extreme in some parts. Uhm.. The hangover, The Shawshank Redemption, The Matrix, The Lake House, there's just too many … | |
Re: Well, I just clicked the link in your sig, and the same happened for me.[QUOTE]+++ mib_40s77j set to mode +iwx You are banned from the channel #Daniweb[/QUOTE] | |
Re: Hello from Vista :) I will probably be getting it soon, not quite sure I look the new task bar so much though, looks big and blocky in my opinion, definitely worth a try though. | |
Words aren't wrapping correctly, if one word exceeds the line length, you should wrap it anyway. Problem happens in my Control Panel under 'My Recently Viewed Threads' from [URL="http://www.daniweb.com/forums/thread240476.html"]this[/URL] link. | |
Re: Any useless junk that's there would have been a result of your programming, the generated assembly is pretty efficient. | |
Re: I think the number of active users has always been fairly low, for example at the moment the only people I see regularly in the list are: [ATTACH]12639[/ATTACH] Most of the rest will ask their question, and never come back. Some may return a few more times, but very few … | |
Re: [QUOTE=dchunt;1054313]Is there any language or way to write a program that is about 10000 lines in such a way that it can't be re-engineered by decompiling it ? What options are available to pursue ? Thank you for your time..[/QUOTE]C++ isn't really decompilable, it's possible to turn the machine code … | |
Re: [QUOTE]I don't know anyone and haven't seen any posts where people make their own namespace. [/QUOTE]Now you know another, my entire personal library is wrapped in a number of namespaces, without them it would be chaos. | |
Re: I made a little snippet that allows you to directly access the pixels and save it as a .bmp. [URL="http://www.daniweb.com/code/snippet217147.html"][link][/URL] I've simplified it a little for you.[CODE]#include <windows.h> #include <iostream> #include <cmath> typedef unsigned long ulong; typedef unsigned short ushort; typedef unsigned char ubyte; struct Pixel { union { ulong … | |
Re: Im getting a strong feeling that you aren't going to be part of this community for much longer. :icon_neutral: Why don't you just do yourself and everybody else a favour and follow the rules... for once. | |
Re: Perhaps the [URL="http://msdn.microsoft.com/en-us/library/aa909766.aspx"]PlaySound[/URL] function? [CODE]PlaySound("H:\\sissys.mp3", NULL, SND_FILENAME);[/CODE] | |
Re: Okay, you clearly didn't write that code, so before you go any further, do you actually understand any of this or have a knowledge of OpenGL at all? if not, read a book or tutorial first then give it a shot. [QUOTE]i want to detect collision of a circle with … | |
Re: Well, C++ can compile almost any C code, except for a few minors differences. Post the code and I'll see. | |
Re: Shorter, but perhaps not any more efficient. [code=c]void stoupper(char *s) { do if (96 == (224 & *s)) *s &= 223; while (*s++); }[/code]Wow, I'm competitive. No doubt there's some mistake in mine though. Here's how it works: the first lowercase letter 'a' has a binary of: 01100001 the last … | |
Re: really nice snippet (: I'm sure this will come in handy for me sometime. | |
Re: [QUOTE=jbennet;1042336]Yeah. If i remember rightly, didnt we used to have one for flash before, and it never got used hardly?[/QUOTE]I still think it should be revived :icon_lol: I would also have plenty of tutorials to write for flash. On that note, I noticed that when creating a new thread, there … | |
Re: Pretty funny site :) Every time you reach the end of the page, it's hard to not click next, who know's what absurd thing could be on the next page? :P | |
Re: [QUOTE]But I really wanna know how to delete the last line![/QUOTE]Then make a new file, copy only the content you need from the first one, delete the first file, and rename the second file. | |
Re: You will have to create a temporary surface to draw on for that one line, and when you release the mouse, it copies that surface to the main one. | |
Re: People who want less disk space will pay less for a smaller hard drive. What are you worried about? that the world will have [I]too much[/I] free fisk space? :icon_eek: | |
Re: Also R, well that sucked :P there needs to me more options and outputs. | |
Re: Pretty much, if you want to use the Win32 API, the code will look very similar to C, but that's why they made MFC. | |
Re: Nope, not as far as I know, you will just have to create a function to return the right values, this could be a start:[CODE]string getValueName(char vk) { string name; if ( vk >= '0' && vk <= '9' ) { name.push_back( vk ); return name; } switch ( vk … | |
Re: We wont give you a free solution to what's probably homework, have you even tried it yet? | |
Re: In version 8, you can just do it from the dialog interface, scroll down to the 'Menu' option, and select the name of the menu you created (view screenshot) If you can't do that, you could edit the resource file directly, for example:[CODE]IDD_MAIN DIALOGEX 0, 0, 186, 94 STYLE DS_SETFONT … | |
Re: No, nobody is going to explain that badly formatted C code to you which should have been wrapped in code-tags. You clearly didn't write it, so what I suggest you do is learn how to program, buy a book, whatever works. | |
Re: [QUOTE]Hope you understand![/QUOTE]Can't say I do, [B]hWnd[/B] will hold the handle to the window being used, so can't you just write:[CODE]ShowWindow(hWnd, SW_HIDE);[/CODE]If not, you will have to clarify :P Posting / Attaching the whole code would help. | |
Re: I actually only started using the computer when I was about 8/9 years old, the earliest game I cam remember playing is [URL="http://www.thealmightyguru.com/Games/LAN/Images/SS-AgeOfEmpires.jpg"]Age of Empires[/URL] :P On my old Sega Master System (which I still have), the first I can remember playing in Portugal when I must have been about … | |
Re: Your condition for that loop is:[CODE](s[i] != '\0') || (s[i] != ' ')[/CODE]Now think, is there [B]any[/B] way that expression will ever be false in order to break out the loop? If [B]s[/B] is a null-terminator, the loop wont break as [B]s[/B] isn't a space, and the same the other … | |
| |
Re: [QUOTE]plz plz urgent im a beginner in unix. can someone reply asap . what are kernel modules?what role do they plan in building and runnig a kernel?what happens if the linux kernel did not support modules?[/QUOTE]Don't beg, you are supposed to ask specific questions here, otherwise use google. | |
Re: The only way I can think of, is to use some inline assembly and get the value of the PC register, look up the use of asm with C. | |
Here's a function that manually converts an integer to any base between 2 and 36, the parameter list is: [CODE]void toBase( int value, // Integer value to convert char *target, // Pointer to a large enough buffer int base, // Base (from 2 to 36) int fixedDigitCount // The minimum … |
The End.