|
Anyone can tell me when I already insert the PrinterPort.h and PrinterPort.cpp in the project.If I want to use the CONTROL PORT as my output similar with DATA PORT how I write the code as it can function like DATA PORT?
Thank You
|
|
|
|
|
Long back i had used some api to convert the file size in bytes in terms of KB,MB, etc
does any one remember that api.
Thanx in advance.
Regards,
Toughest Steel Comes From Hottest Furnance
|
|
|
|
|
//Replace NULL with a pointer to a variable that holds the high-order size
//if the file is larger than can be represented by a DWORD
DWORD bSize;
DWORD kSize;
DWORD mSize;
bSize = GetFileSize(hMyFile, NULL);
kSize = bSize/1024;
mSize = kSize/1024;
Sorry; couldn't find anything else.
Heard in Bullhead City - "You haven't lost your girl - you've just lost your turn..." [sigh] So true...
|
|
|
|
|
humm, thanx any way for replying actualy this is not what i was looking for,
suppose x = 1025
then there is a function which gives the following ouput
CString t = somefunction(x); //t = "1 KB"
any way i made that function myself that does that.
Toughest Steel Comes From Hottest Furnance
|
|
|
|
|
StrFormatByteSize. Defined in shlwapi.h and requires linking to shlwapi.lib.
Wenn ist das Nunstück git und Slotermeyer? Ja! Beierhund das oder die Flipperwaldt gersput!
|
|
|
|
|
I figured that, but having checked the Win32 functions, MFC reference, and run-time reference and finding nothing, I gave up. I should have just looked in MSDN[^], though actually finding anything there is often a challenge.
Heard in Bullhead City - "You haven't lost your girl - you've just lost your turn..." [sigh] So true...
|
|
|
|
|
I'm trying to retrieve information through software about the system's chipset. Things like the brand, model#, revision# etc...
Would somebody be able to point me in the right direction?
Thanks heaps!
|
|
|
|
|
Hey all
Just wondering if anyone knows of an "easy" way to get the computer's HOST name? (The host name of the computer that is running the application?)
Thanks!
|
|
|
|
|
ummm...how about GetComputerName() ?
Sonork 100.11743 Chicken Little
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
Within you lies the power for good - Use it!
|
|
|
|
|
Go Pete! W00t!!!
Heard in Bullhead City - "You haven't lost your girl - you've just lost your turn..." [sigh] So true...
|
|
|
|
|
*Pete takes a bow toward his admiring fans*
Sonork 100.11743 Chicken Little
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
Within you lies the power for good - Use it!
|
|
|
|
|
I've been reading a handy book I bought a while ago, but never got around to opening, called Microsoft Windows 2000 API SuperBible. It obviously was never a best seller, as I got it for $15 on the discount shelf, but it's full of thousands of API descriptions and examples in C++. Neat stuff I can get into real mischief with, like BlockInput(TRUE) and ExitWindowsEx(EWX_FORCE, NULL). It even identifies which OS versions (Win2K or Win9x) each call applies to, and points out usage differences if they exist.
Now that WinXP is the OS of the week, to what extent does XP add to, or invalidate the Win32 API that was current as of Win2K?
Heard in Bullhead City - "You haven't lost your girl - you've just lost your turn..." [sigh] So true...
|
|
|
|
|
Hi!
I think it maybe a question difficult to answer. But I hope there are some people share the same experience with me will give me some hint.
I find one dll project very weird.
There are some functions in the dll to be export. They are declare with _declspec(dllexport).
But some function(about 5%) can't be find in the generated dll. (I used ultraedit to search for the name in the dll binary)
I finally find out it have some relation to its parameter. for example
int funcNoUse(long lRegionID)
{
return 0;
}
will be ok, it's generated in the dll.
But if i change it to
int funcNoUse(long lRegionID, long nPoints, float* pY, LPCTSTR szFlags, int makeCopy)
{
return 0;
}
it will not exist in the dll.
I really don't know what's up. I have test it on two computer one with VS7 and another with VS7.1 have the same result.
any idea?
|
|
|
|
|
Sounds like you be being a victim of "Name mangling". This is something the C++ compiler does so that overloaded functions with the same name but different parameters can be properly resolved by the linker. You can force the compiler to turn of "Name mangling" for a specific function by using extern "C" in the function declaration.
extern "C" int funcNoUse(long lRegionID, long nPoints, float* pY, LPCTSTR szFlags, int makeCopy)
Roger Allen - Sonork 100.10016
Roger Wright: Remember to buckle up, please, and encourage your friends to do the same. It's not just about saving your life, but saving the quality of life for those you may leave behind...
|
|
|
|
|
hi ,
Iam new to VC++
iam having a class class CCommPort2 : public CObject ,now iwant to create same class like class CCommPort:public CObjectwith the same feautures
is it possible,iam getting errors pls let me know.
|
|
|
|
|
class CCommPort3 : public CCommPort2
{ };
Maxwell Chen
|
|
|
|
|
could you detail a little bit more about what you have and what you want please ?
thx
TOXCCT alias Nicolas C.
|
|
|
|
|
Message digest is something similar to digital signature. I would like to insert it in my mp3 id3 tag. There is an extended header that has variable length in id3 tag. How can I add message digest in the extended header using visual c++?
|
|
|
|
|
what ? say that again ?
AFAIK, you can pretty much insert anything in an mp3 ID3v2 tag. have a look at http://www.id3lib.org[^] for more info on id3 tags.
Maximilien Lincourt
Your Head A Splode - Strong Bad
|
|
|
|
|
I have 3 checkboxes, if i put 1st one under group, does that mean that i can only select one box at any one time, just like in radio buttons? Also, for radio buttons, are they assigned button1 = -1, button 2=0, button3=1 and so forth? cause i need to use if else statements for the different buttons.
|
|
|
|
|
coda_x wrote:
I have 3 checkboxes, if i put 1st one under group, does that mean that i can only select one box at any one time, just like in radio buttons?
No. Check boxes are completely independent.
coda_x wrote:
Also, for radio buttons, are they assigned button1 = -1, button 2=0, button3=1 and so forth?
No. They start from 0 (button 1=0, button 2=1 etc...)
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
I have a very primitive question on C++.
If I want include a library I use #include
say, #include <iostream> , iostream header file all I/O functions are declared.
But Including a Standard C++ header does not introduce any library names into the current namespace. For that we have to use
using namespace std;
What does this mean? Does it mean in namespace std all the functions in standard library files are defined and that's why we need that?
|
|
|
|
|
Binayak wrote:
using namespace std;
What does this mean? Does it mean in namespace std all the functions in standard library files are defined and that's why we need that?
Yes.
Having the using statement means that you don't have to qualify each individual std name e.g. std::cout << "Hello world" << std::endl
Lets be honest, isn't it amazing how many truly stupid people you meet during the course of the day. Carry around a pad and pencil, you'll have twenty or thirty names by the end of the day - George Carlin
Awasu 1.2.1 [^]: A free RSS reader with support for Code Project.
|
|
|
|
|
hi 'binayak',
so, to help you, i would say that the C++ standard includes some classes and functions into the std namespace.
In fact, be careful to the diference between the folowing directives :
<font style="color:green;">
<font style="color:blue;">#include</font> <iostream>
<font style="color:green;">
<font style="color:blue;">#include</font> <iostream.h>
so, if you use std:: and you don't want to call it each time you want a function defined inside (for example cout << "Hello world !" instead of std::cout << "Hello world !" ) you'd prefer the command line
<font style="color:blue;">using namespace</font> std;
Clearly, it tells to the compiler that it will have to look inside the std:: to find the called function.
you could also do this if you don't want all the standard namespace to be used implicitly :
<font style="color:blue;">#include</font> <iostream>
<font style="color:blue;">void</font> main (<font style="color:blue;">void</font>) {
<font style="color:blue;">using</font> std::cout; <font style="color:green;">
cout << "Hello world !";
}
hope that's more clear now
TOXCCT alias Nicolas C.
|
|
|
|
|
so, to help you, i would say that the C++ standard includes some classes and functions into the std namespace.
In fact, be careful to the diference between the folowing directives :
No. The iostream.h library is only the Microsoft fake of STL iostream and now is obsolete.
so, if you use std:: and you don't want to call it each time you want a function defined inside (for example printf("Hello world !") instead of std::printf("Hello world !")) you'd prefer the command line
printf is a function from stdio.h , not iostream .
Robert-Antonio
"Love without sex is like a fish without antlers"
|
|
|
|