Ken Fitlike, thanks for the reply.
1. I created a very small test program to test this out, and now I find that setting the extended style within WM_INITDIALOG is completely fine, even if the...
Type: Posts; User: JasonD
Ken Fitlike, thanks for the reply.
1. I created a very small test program to test this out, and now I find that setting the extended style within WM_INITDIALOG is completely fine, even if the...
I agree. It is highly recommended, and worth every penny.
Hello,
I have two problems with this style:
1. If a dialog box is given this style during the WM_INITDIALOG message (i.e. as the dialog is being created, before it is displayed), AND if the...
Micko, regarding your private message, I believe it is best to reply on the forum (and I will apologize right now for not having read any of the posts so far):
There is an MSDN page that explains...
Oh, ok. No problem.
It's hard to answer questions like the above because it really gets into deeper issues that shouldn't concern a beginner. I really believe that rectangle program should have...
Yes, games are quite different from other Windows programs. This is sort of the point I was touching upon earlier. The program Petzold wrote is similar to an old graphics DOS program, and games are...
Ok, I jumped the gun by saying that no one uses return codes. I should say that most people do not use them, as most normal applications do not require their use. I still pass back different values...
Micko,
1. Yes, just cast it to an int. Microsoft says to pass the message's wParam, so it should be ok. Since DOS, no one really cares about the return value anymore, anyway.
2. This program...
I started learning Windows through tutorials on the 'net, and realized that they just did not explain anything in much detail. At this point, I was basically hacking. It's not a good feeling. I...
Thanks for the info, Codeplug. I am not using MFC, though. It is just a pure Win32 application, so this could not be the problem. Unless it is possible that these MFC headers are being accessed in...
Dante, thanks for the reply.
No, I am not using any 3rd party libs. I have searched every function (that my programming team created) of the entire project, and InitCommonControls(Ex) is nowhere...
Hello,
In a test application, I have a progress bar defined in one of my dialog boxes. In order for CreateDialog to succeed, I need to add comctl32.lib to my project, and also call...
I see that I am not the only one perplexed by this. Note that the MSDN page states: "...message is sent to all top-level windows when the system detects more than 12.5 percent of system time over a...
Is the WM_COMPACTING notification obsolete? Its MSDN page states that the message is provided "only for compatibility with 16-bit Microsoft® Windows®-based applications".
Should it be processed,...
The easiest way is this:
1. create the list storing 1..25, in order, in the indices 0..24
2. loop through the indicies, i = 0..24, pick a random index, j = 0..24, and swap the two.
This way,...
The book's contents may be truly random numbers, like those obtained by throwing dice, rather than pseudo random numbers generated by a computer. Basically, one set can be reproduced exactly, the...
That would be a very simple one that doesn't work well, but, yes, that is the general idea (it should also store the new result back into seed, however). It is a formula that uses the last number...
Take a look at this site:
http://www.lavarnd.org/
Give me the same random number generator and the same starting seed as you use, and I can tell you what numbers will appear when. Imagine if a VLT used such a method, and you found out how it...
Another problem with using % is that some numbers, such as 6 in the case of a dice game, are not divisible into RAND_MAX+1 (the number of possible return values from rand() ). This means the...
The code may have been taken from Petzold. Here is his code:
int CDECL MessageBoxPrintf (TCHAR * szCaption, TCHAR * szFormat, ...)
{
TCHAR szBuffer [1024] ;
va_list pArgList ;...
Btw, since you are NOT using the latest SDK, then you should be able to compile the program using the OLD style DialogProc, like so:
BOOL CALLBACK DialogProc( HWND hwndDlg,
UINT...
You need the latest SDK to access the latest Windows Data Types:
http://msdn.microsoft.com/library/en-us/win64/win64/the_new_data_types.asp
INT_PTR is 32-bits in size for 32-bit Windows, and...
Yes, there should already be two default configurations - Debug and Release. You should be able to select the Release configuration, and then modify it to your liking (i.e. change the run time...
I have never tried the program with a shared printer. Let me know if you resolve the problem. If it is a bug in the code, or even some worthwhile noting for other readers, I will add it to my...