|
Search on "Automation" (not so easy.)
"If I don't see you in this world, I'll see you in the next one... and don't be late." ~ Jimi Hendrix
|
|
|
|
|
|
What I want to do is create a console application that computes the crc of a file and writes the file to a zip file. I have been struggling on this for weeks now and I need some help.
-Ryan M.
|
|
|
|
|
boost[^] has a CRC library. It looks like it's pretty easy to use. There's a sample program just above http://www.boost.org/libs/crc/crc.html#crc_ex[^]
If you can keep you head when all about you
Are losing theirs and blaming it on you;
If you can dream - and not make dreams your master;
If you can think - and not make thoughts you aim;
Yours is the Earth and everything that's in it.
Rudyard Kipling
|
|
|
|
|
How can I be able to Save a Bitmap File to a JPEG File?! Please provide some Source Codes, i'm a bit Confused... thanks!!!
|
|
|
|
|
There are lots of good examples on www.morgan-multimedia.com
|
|
|
|
|
I download a file in my program with code like this:
stream = InternetOpenUrl(session, url, NULL, 0,
INTERNET_FLAG_NO_CACHE_WRITE | INTERNET_FLAG_PRAGMA_NOCACHE, 0);
...
while (more data to read)
InternetReadFile(stream, buffer, DOWNLOAD_BUF_SIZE, &bytesRead))
But sometimes instead of getting the file I'm after, I get a file with this contents:
--------------------
<HTML><HEAD><META HTTP-EQUIV="Refresh" CONTENT="0.1;
URL=/LatestVersion.txt">
<META HTTP-EQUIV="Pragma" CONTENT="no cache">
<META HTTP-EQUIV="Expires" CONTENT="-1">
</HEAD></HTML>
--------------------
The URL I use is "http://www.software3d.com/LatestVersion.txt".
Now "www.software3d.com" is just a redirecting link which sends people to the real site, but I want to use it in case I ever move my site again (this link would then redirect them to the new site).
I'm guessing this redirection has something to do with it though, like it's received the little redirecting page itself, instead of following the redirection, but most of the time it works and finds the right page.
Any clues as to how I can guarantee it will get the right file?
Thanks,
Rob.
|
|
|
|
|
http://www.intel.com/software/products/compilers/cwin/index.htm
It is an add-in compiler for VS.Net and it will replace the default Microsoft compiler.
I ordered "The Software Optimization Cookbook" from Intel press a while ago, and it arrived today. It talked about the Intel C++ compiler, so I wonder if anyone have used it, or is using it.
|
|
|
|
|
I have a dialog box with three slider controls. Each slider has a label that I want to update when the respective slider is moved. Using the OnHScroll method I am able to detect slider movement, but how do I go about determining which slider was moved so I can only update it's label? Any help would be greatly appreciated. Thanks!
|
|
|
|
|
This article[^] demonstrates one method of doing this.
__________________________________________
a two cent stamp short of going postal.
|
|
|
|
|
Thanks for the reply. I already have a static text label linked to the sliders. I am using VC++ .NET where the OnHScroll has three parameters (UINT nSBCode,UINT nPos,CScrollBar* pScrollBar). I was hoping there was a simple way to figure out which control pScrollBar is a pointer to, maybe somehow a switch statement or something? Any other ideas?
|
|
|
|
|
maybe something like this...
if(pScrollbar == GetDlgItem(ID_SLIDER1)) {
}
else if(pScrollbar == GetDlgItem(ID_SLIDER2)) {
}
.
.
.
|
|
|
|
|
Excellent! That was exactly what I was looking for. Thanks! I am new to this VC++ stuff, so sorry if that answer was obvious to most.
|
|
|
|
|
I saw in skinned apps that is still has the title even with no TitleBar.
So .. how do i see the title(in taskbar for example) in a popup styled window ?
|
|
|
|
|
Is there possible to assign to a static object a bk (like SetBitmap for MFC)
|
|
|
|
|
Move your background blitting codes to OnEraseBkgnd(...)
|
|
|
|
|
I have a Visual C++/MFC app that plots several graphs based on the same data. On each graph I draw a cursor or position point based on time. This is all done during a 'playback' mode.
The cursor/position is being drawn and redrawn correctly but if I switch applications it sometimes leaves a 'stranded' cursor. This is apparenly because only the region that was previously hidden is redrawn.
How can I get OnDraw() to refresh the entire client area of the affected window?
|
|
|
|
|
I believe the default call to Invalidate will Invalidate the entire region
"No matter where you go, there your are." - Buckaroo Banzai
-pete
|
|
|
|
|
That is correct Invalidate() will cause the entire region to be redrawn. The question, i suppose, is where does one call this function? The OnDraw() function gets called when the window needs to be redrawn but calling Invalidate() here results in a cascade of messages.
Carter
|
|
|
|
|
There are several way to do that. One of the simplest would be to set a timer inside OnDraw() when the condition exists. Then in the Timer event handler you can call Invalidate().
"No matter where you go, there your are." - Buckaroo Banzai
-pete
|
|
|
|
|
Thanks for the advice, Pete.
What I ended up doing is just hiding the cursor in the OnPaint() event. Restoring it after the EndPaint(). Quicker than redrawing the entire form too.
Carter
|
|
|
|
|
Hello,
I am very inexperienced in C++, so please bear with my question:
I am created a class "Tables" which is composed of an array of type "Columns" (another class i have created -- with its own attributes).
In "Tables.h" I have this initialization:
Columns t_Columns[45];
and in a method called "createTable" which is defined in "Tables.cpp" I have this code:
for(int i = 0; i < 45; i++)
{
t_Columns[i] = new Columns();
}
As you can guess, i want 45 instances of Columns in my Table.
My Problems is that the array cannot access any of the methods or attributes of the Column Class still.
I have even tried this:
in Table.h:
Columns * t_Columns[45]
in Table.cpp:
for(int i = 0; i < 45; i++)
{
*(t_Columns + i) = new Columns();
}
Can someone please point me in the right direction, i would be so grateful!
thanks in advance
|
|
|
|
|
I just found a solution: don't use the ".cpp" file for class definition, just define the class in ".h"
At least now it appears to be picking up the attributes of "Columns" class.
|
|
|
|
|
So and So wrote:
Columns t_Columns[45];
.
.
t_Columns[i] = new Columns();
Your t_Columns is an array of Columns objects so you can't 'new' it. It is already created.
So and So wrote:
Columns * t_Columns[45];
.
.
*(t_Columns + i) = new Columns();
Now you can 'new' it but you should write it as:
t_Columns[i] = new Columns();
<font=arial>Weiye Chen
When pursuing your dreams, don't forget to enjoy your life...
|
|
|
|
|
Hi everyone, I'm working on this program for work,and Im trying to create a clock at the bottom right hand side of the screen in a status bar so it shows the user how long theyhave been using the program. the clock should work like this. First when the user first starts the program the clock will be at 00:00:00, and then 1 second later itll be at 00:00:01, and then two seconds later itll be at 00:00:02, and so on. Ive been looking everywhere on the net, but I havent been able to find anything. Im coding in C++ and using Win32 programming NOT the MFC's.
if u have an answer for me, email me at osalman@csulb.edu. or just reply here. Thank you all for your time!
|
|
|
|