Fair enough...
Right, somehow I thought that in this case the compiler would have to use the version of DoStuff() from the derived class regardless of whether it was declared virtual because the...
Type: Posts; User: Xzyx987X
Fair enough...
Right, somehow I thought that in this case the compiler would have to use the version of DoStuff() from the derived class regardless of whether it was declared virtual because the...
I ran into two peculiar issues in a program I've been writing regarding class usage. Rather than posting pages upon pages of code, here's a few simplified examples to illustrate the issues:
...
Not exactely... If you want the window to be the same size everytime you create it, then just use the same window size values with CreateWindowEx(). If you want to keep the user from resizing it,...
Actually, the real best approach if you're looking for speed is just to write it in ASM. The efficient part in my example was that it was easier to read, and didn't take as long to type.That depends,...
Opps. Lol, I was in a hurry to write a response, nm that.
This would be more efficient:
#include <stdio.h>
#include <stdlib.h>
It's easy. I'll write it in C since I dunno VB.
int randNum = rand() % 101;
if(randNum <= 55)
randNum = 1;
else
I'm starting to get into a lot of low level stuff lately :). Anyway, does anyone know to what level you can get access to the MMU under Windows? It seems like an area of the CPU that would normally...
In my case though, the message box is destroyed before CopyFileProgressEx() is called...
Ok, I finally figured it out. Since the CopyFileEx funtion completely hijacks the same thread that is used for message processing of the parent window I set for the function to use, that causes some...
Try InvalidateRect() and UpdateWindow() on the control after you set the icon.
I finally got around to finishing the set of functions I was writing for displaying a progress window while CopyFileEx() runs. The only problem is that the cancel button on the window won't work....
Ok, I actually took a look at what strtol does and I guess your right, it's not a problem. I was assuming that 10 was the the max amount of chars you were allowing when actually it was the base. This...
Errr, right. NM about the returning. Regarding the overflow check though, if you just limit the number of charectors you can input then you won't be able to get the full range of numbers unless your...
After my second triumphant escape from hell (in which I had destroyed Satan and caused hell and all of it's residents to be sucked into oblivion. Never to return. Ever. Period.) I then relized that...
A few things. First of all, your funtion doesn't return anything... Second, uf you manually handled the string to number conversion you could add an overflow check which would make it even better....
That's true. Actually writing an AI for any strategy game is pretty difficult. If you're up for a real challenge try writing a go AI :).
Ok, I just noticed this bug in some code I had written a while ago, only I can't tell where I went wrong. Basically what seems to be happening is that Windows is reassinging an hFile I already have...
I'm guessing this is because you're using regular main instead of WinMain. By doing this your program becomes a console application instead of a window based application. To fix this just use WinMain...
I typically prototype all my functions at the beggining of a file so I don't have to worry about their order. I'm nut sure if there's any reason to do this 100% of the time, but it usually comes in...
If you want to take my approch... Once you finish learning the basics of C, come up with a program to write of such unimaginable scope it will take years to finish. Also, make sure to write it using...
Err nm, it actually was appearing, I just couldn't tell because I didn't give it a border :P.
Ungh, now I can't get the progress bar to appear. Here's what my ProgressWindowProc looks like at this point.
INT_PTR CALLBACK ProgressWindowProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM...
:eek: how did I miss that? Looks like I've been using dialog boxes too much lately...
Doing that probobly is a good idea, but it still doesn't get my create function to display anything...
Been a while since I had a problem bad enough to need to post it here. I guess that's a good sign :). Anyway, I'm creating a window class and supporting functions for a window that will pop up and...