|
|
gothic_coder wrote: How do i hide my application from Task bar??
ShowWindow(SW_HIDE) .
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
ShowWindow(SW_HIDE).
Can you elaborate more on that?? I just need to hide my application button from task bar... The dialog will come properly..
Thanks.
|
|
|
|
|
gothic_coder wrote: I just need to hide my application button from task bar...
Which is what I showed. If, however, you need the dialog to be otherwise visible, see here, and here (about 3/4 way down).
In the future, please explain all of your requirements up front so that we do not provide you with less-than-helpful suggestions.
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
You make your main application window a child window of a hidden parent window.
Regards,
--Perspx
"I've got my kids brainwashed: You don't use Google, and you don't use an iPod." - Steve Ballmer
"Some people have told me they don't think a fat penguin really embodies the grace of Linux, which just tells me they have never seen an angry penguin charging at them in excess of 100mph." - Linus Torvalds
|
|
|
|
|
Hello,
Being a very noob at c++, i managed to screw it up completely with this little piece of code
#define stdcall_api __stdcall
Now, at the time, i did not know this would hurt me in so many ways that would make the Spanish Inquisition proud, but apparently this had the effect of generating me 272 errors , all located in winnt.h and winbase.h, in all my Visual c++ 2008 projects that i have and need to build.
My question is: can i get my projects building again?
Thank you very very much,
A noob @ c++
|
|
|
|
|
what kind of errors are you getting (show the first ones) ?
|
|
|
|
|
Error 1 error C2146: syntax error : missing ';' before identifier 'Int64ShllMod32' c:\program files\microsoft sdks\windows\v6.0a\include\winnt.h 654
Error 2 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int c:\program files\microsoft sdks\windows\v6.0a\include\winnt.h 657
Error 3 error C2146: syntax error : missing ';' before identifier 'Int64ShraMod32' c:\program files\microsoft sdks\windows\v6.0a\include\winnt.h 661
Error 4 error C2371: 'stdcall_api' : redefinition; different basic types c:\program files\microsoft sdks\windows\v6.0a\include\winnt.h 661
Error 5 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int c:\program files\microsoft sdks\windows\v6.0a\include\winnt.h 664
Error 6 error C2146: syntax error : missing ';' before identifier 'Int64ShrlMod32' c:\program files\microsoft sdks\windows\v6.0a\include\winnt.h 668
Error 7 error C2086: 'ULONGLONG stdcall_api' : redefinition c:\program files\microsoft sdks\windows\v6.0a\include\winnt.h 668 OSPI
Error 8 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int c:\program files\microsoft sdks\windows\v6.0a\include\winnt.h 671
This kind of errors
|
|
|
|
|
just a guess, in what order are you #including your headers, and where do you #define you stdcall_api ?
|
|
|
|
|
thoru wrote:
#define stdcall_api __stdcall
You probably meant the other way around since __stdcall is a reserved word, i.e. you want the identifier stdcall_api to be substituted with __stdcall during the preprocessing phase, right?
The errors you got are from the windows header files wherever __stdcall is substituted by stdcall_api which is an unknown identifier.
Do it like this:
#define __stdcall stdcall_api
Forget that the above ever existed, it's embarrassing.
"It's supposed to be hard, otherwise anybody could do it!" - selfquote "High speed never compensates for wrong direction!" - unknown
modified on Wednesday, October 8, 2008 8:56 AM
|
|
|
|
|
Nope, still did not fix my problems, but thank you
|
|
|
|
|
Sorry thoru, disregard from my previous post, I must have been delirious when I wrote it.
"It's supposed to be hard, otherwise anybody could do it!" - selfquote "High speed never compensates for wrong direction!" - unknown
|
|
|
|
|
Roger Stoltz wrote: Do it like this:
#define __stdcall stdcall_api
no Roger, you're going to replace every occurence of __stdcall with stdcall_api (which is not defined, so leading to errors).
what the OP wants is the opposite, and remember #define works "the opposite" as typedef
so he wrote it well ; the error is elsewhere.
|
|
|
|
|
Yeah, plus, i do not see why it would affect my other builds or this one, if i take the #define out.
I think i have stumbled upon something very strange with this stdcall_api.
|
|
|
|
|
hum, also, why are you defining such stdcall_api macro ?
|
|
|
|
|
How embarrassing, it's inexcusable and I'm truly sorry.
Just made myself look like a newbie.
If I could I would vote my previous reply as "unhelpful"....
*Geeee....*
"It's supposed to be hard, otherwise anybody could do it!" - selfquote "High speed never compensates for wrong direction!" - unknown
|
|
|
|
|
Nevermind, I know you're a strong member here.
|
|
|
|
|
Thanks tox'.
"It's supposed to be hard, otherwise anybody could do it!" - selfquote "High speed never compensates for wrong direction!" - unknown
|
|
|
|
|
Roger, believe me or not, your post actually helped me, so it wasn't a complete loss of a post.
First of all, thanks to Roger and toxxct for your posts.
So this is my fix:
I did a compare in the sdk between v5 and v6 in the include folder and looked at winnt.h
Where the stdcall_api was mentioned in v6, i changed it back to v5 which strange enough was __stdcall.
I have no clue as to how that was changed in there (i mean __stdcall being replaced bye stdcall_api) but this fixed it.
They should have a #ifdef NEWBIE_IN_C {code for restricting access to this super sensitive keywords} #endif.
-Thoru, a newbie in C++
|
|
|
|
|
thoru wrote: Roger, believe me or not, your post actually helped me, so it wasn't a complete loss of a post.
I'm glad that it helped you in some strange way.
However, right now I feel like I'm standing in the town square with my pants down...
Like Al Pacino says in the movie "Donnie Brasco": forget about it.....
"It's supposed to be hard, otherwise anybody could do it!" - selfquote "High speed never compensates for wrong direction!" - unknown
|
|
|
|
|
Hi,
I am using GetFileSize() to get the Hard Drive Size but this function is getting fail. Code is here:
DWORD dwFileSizeHigh=NULL;
DWORD dwFileSizelow=NULL ;
dwFileSizelow = GetFileSize(m_hFile,&dwFileSizeHigh);
And what is the use of High and Low DWORD. I try to get the information from MSDN but could not understand.
efhghgfffhf
|
|
|
|
|
mdsameerahsan wrote: I am using GetFileSize() to get the Hard Drive Size but this function is getting fail. Code is here:
What is the last error code? Add @err,hr to watch window. You could see the last error description. Your code seems fine. May be something wrong with your file handle. Anyway check the last error description.
mdsameerahsan wrote: And what is the use of High and Low DWORD. I try to get the information from MSDN but could not understand.
The GetFileSize() api returns the total file size as 8 bytes that's by using two DWORDS. The dwFileSizeHigh stands for the low order 4 bytes and dwFileSizeHigh stands for high order 4 bytes. For getting the real file size, you should read them together.
Regards,
Jijo.
_____________________________________________________
http://weseetips.com[ ^] Visual C++ tips and tricks. Updated daily.
|
|
|
|
|
mdsameerahsan wrote: get the Hard Drive Size
To get this you should use GetDiskFreeSpaceEx() .
You see, wire telegraph is a kind of a very, very long cat. You pull his tail in New York and his head is meowing in Los Angeles. Do you understand this? And radio operates exactly the same way: you send signals here, they receive them there. The only difference is that there is no cat.
Albert Einstein
|
|
|
|
|
mdsameerahsan wrote: I am using GetFileSize() to get the Hard Drive Size
How does getting the size of a file give you the hard drive size?
Or did you mean the size of the file on the harddrive?
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Come on, Mark. If you fill the HD completely up with files, and then add all their sizes up, that will tell you the HD's size.
You need to start thinking outside of the box else a "fish filet" will soon be on your resume.
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|