Microsoft's own versions of these functions, CString, and std::string, are less likely to cause security problems. (I haven't had problems with strlen, but strcat and the other functions require...
Type: Posts; User: okinrus
Microsoft's own versions of these functions, CString, and std::string, are less likely to cause security problems. (I haven't had problems with strlen, but strcat and the other functions require...
The worker thread might be reading a register that is caching the value stored statically. Say, for instance, I wrote
static int staticVar = 1;
void f()
{
while(staticVar <= 100)
...
if the variable is cached in a register, then one thread could write to the register(but not the same variable in static memory), context switch, and then the other thread could read from the...
Try this. I made a few corrections, mainly writing ghInstance correctly and getting the bit masks to CreateWindow right.
#include <windows.h>
/* Declare Windows procedure */
LRESULT...
If most of the game execution is spent inside the OpenGL system, a Java game might be comparable to a C++ one. But otherwise, you'll either end up writing a porition of game code using C++ or your...
The call to Invalidate doesn't quite call OnDraw. The invalidate messages are put onto a queue for latter processing and your OnDraw will return before they are processed.
To update the...
The wait is there to prevent the application thread exiting while the worker thread still exists. If the wait times out, maybe your worker thread never exits from its callback function. You need...
When a win32 console program is run, a console window is created. You don't write the code to display the console window. But For win32 non-console programs, you must create your own windows. You...
In C++, objects are sometimes constructed in the middle function. Their initialization occurs in the constructor. For example, you could have
void f()
{
int c = 4 + 4;
for...
I don't think sleep is needed.
You need to set m_bAutoDelete to false and make sure the thread isn't running. I do
CWinThread* thread = AfxBeginThread(run, 0,...
The view and the dialog must still be processing some types of messages during DoModal. Overlapped areas won't get drawn othewise. I'll have to try and see what happens sometime.
Create some type of index file(and maybe postings file) and do analysis on the index. You'll want to tailor the index according to the type of statistics your doing. For example, creating a list...
From what I understand, the modal dialog operates on its own message loop. But by using a PostMessage to the modal dialog and the progress info may be propagated. Maybe you could clarify?...
Check recent memory accesses(both around the crash and by execution order) for fence post errors, delete[] when delete was needed, etc. Your constructor, if you have one, could also be causing the...
Threads will make things more complicated. I thought maybe your interthread messages might be getting lost because of your modal message box.
For MFC specific stuff, this page is pretty good. ...
How are you communicating the progress information to the progress dialog? Are you reading the file read through another thread?
Windows XP will white out the window if you stay in the loop...
Either display the image by overriding the OnDraw(CDC* pDC) of a CView subclass or, if the image doesn't change, you could place the image onto a form view or dialog. Lookup CView, CBitmap, CDC,...
It looks like inside your Tile Destructor the TileDC and TileBitbmap passed into the constructor aren't being deleted.
(You're also leaking the GDI objects by either not selecting the old ones...
Design pattern books will go into some detail. The smalltalk description of MVC is out on the Web, too. But briefly, though, you set up the structure of the classes so that the controller listens...
If you use a GUI library with C++ you can do these types of applications.
The programs cashiers use(POS systems) are usually console based.
Changing the return type and making sure that afx_msg is used should at least change the error message Are you declaring everything exactly as it is in this site...
Use Microsoft Visual c++ to create an installation program. In how to do it, each version is different, I think, but it ought to include the right dlls for your project. (Try to find a tutorial on...
"I hate programming" is kind of general. You shoould tell us why you hate programming; it might just be related to one single class or teacher.
Political science majors don't have to go into...
I think this link covers what you need to know. Looks like you don't need to setup anything with dev C++ but Stroustrup's book covers this too I think....
Database initializatiion could take relevatively a long time; it's interprocess. And when you run the process intensive loop part first, you might somehow increase or decrease the OS priority given...