|
thanks for the link to the faq
#include <Wininet.h>
.
.
.
BOOL bConnected;
DWORD dwFlags;
bConnected = InternetGetConnectedState ( &dwFlags, 0 );
if ( bConnected )
if ( dwFlags & INTERNET_CONNECTION_OFFLINE )
bConnected = FALSE;
i get this error:
error C2065: 'INTERNET_CONNECTION_OFFLINE' : undeclared identifier
any ideas?
thanks!
|
|
|
|
|
I have an application that produces a calibrated tape. I am tying to impliment the ability to print this in mirror image as well. I call
<br />
void CTransformView::OnDraw(CDC* pDC)<br />
{<br />
pDC->SetMapMode(MM_LOENGLISH);<br />
SetGraphicsMode(pDC->GetSafeHdc(), GM_ADVANCED);<br />
SetWorldTransform(pDC->m_hDC, &XForm);<br />
...<br />
...<br />
}<br />
with XFORM structure filled out appropriately, and on screen everything is fine, however, with print and print previews, all text is simply rendered upsite down, not mirrored! In fact, simply creating a dummy application that does nothing but print a line of text to screen and draws a single line under it exhibits the same behavior if you make the call to SetGraphicsMode, (without any transform call). You will see your line of text as normal on screen with your line under it, but printing and print previews will show the line under your text printed upside-down. Has anybody come across this bug and found a work-around, or am I missing something? Sheesh, will these MS bugs never cease?
TIA Eric
|
|
|
|
|
hello, I'm interesting in delete the title bar of all windows (title, button minimice, button maximize,...,all thing). I`ve proven with diferent option, trying with case HCBT_CREATEWND OR HCBT_ACTIVATE but i can´t achive it. At the moment only I´ve achived that the hook CBT work´s.
Please can anyone help me?
Sorry for my english.
|
|
|
|
|
check my firewall done with the CBT function hope it will help you.
gabby
|
|
|
|
|
unsigned int GetOtherOffset( int index ) {<br />
byte array[8];<br />
unsigned long otherAddress;<br />
if ( ReadProcessMemory( g_hCurrentProcess, (void *) (g_uiOtherBaseOffset), (void *) array, 8, NULL ) ) {<br />
otherAddress = GetUnsignedLong( array );<br />
<br />
if ( ReadProcessMemory( g_hCurrentProcess, (void *) (otherAddress + 152416 + (index * 480)), (void *) array, 8, NULL ) ) {<br />
return GetUnsignedLong( array );<br />
}<br />
}<br />
return -1;<br />
}
I understand that in the first part, ReadProcessMemory gets the value from g_uiOtherBaseOffset and stores it as an Unsigned Long Labled "otheraddress".
What I have trouble understanding is the second part...this part.
if ( ReadProcessMemory( g_hCurrentProcess, (void *) (otherAddress + 152416 + (index * 480)), (void *) array, 8, NULL ) ) {<br />
return GetUnsignedLong( array );
So, it takes the value from 'otheraddress' and adds it to 152416.....then what? Where does the 'index' part come from? And why is it multiplied by 480?
|
|
|
|
|
'index' is the parameter passed into the GetOtherOffset function
unsigned int GetOtherOffset( int index )
I don't know why 152416 is being added to it, nor why index is multiplied by 480. That all seems very horribly hacky. What is the function used for? Maybe that will provide clues
|
|
|
|
|
Hi,
I need to disable some special key's.
CTRL+ESC
CTRL+ALT+DEL
That I want to do is disable this key's so you don't be able to open explorer, or the task managen.
Is there anyone how can help me with this?.
PS: I want to use it in a MFC App.
|
|
|
|
|
maybe you can override them?
assign some action (like donothing or something) to it.
don't know how by heart.
"If I don't see you in this world, I'll see you in the next one... and don't be late." ~ Jimi Hendrix
|
|
|
|
|
|
Are you implying that the trapping of those keys cannot be done programmatically?
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
|
Then why suggest going to another forum? While it's not a trival task (i.e., writing a msgina.dll replacement), those keys that the OP was interested in can easily be "trapped" with code. Yes?
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
1. We get lots of people posting in the wrong forums.
2. There might have been people in the OS forum familiar with the subject in terms of controlling the features programmatically.
Yes ?
Sheesh, who pressed your button ?
The tigress is here
|
|
|
|
|
Trollslayer wrote:
1. We get lots of people posting in the wrong forums.
Of course, but what automatically led you to believe this was one?
Trollslayer wrote:
2. There might have been people in the OS forum familiar with the subject in terms of controlling the features programmatically.
Yes ?
Of course, but more often than not, folks in non-programming forums would be all too quick to say something along the lines of "Hey, this is a programming question. Take it to a related forum." It's usually the programming forums that answer both programming and non-programming questions.
Trollslayer wrote:
Sheesh, who pressed your button ?
No one, that I recall. I was simply trying to verify what you meant. Lack of details = misinterpretation.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
|
Papa: Thank for a quick reply,
I have check out that app but I dont now how to just use the disable of the keys. And I dont want to use the checkbox I just want to use it when the app starts.
Can you help me... please.
|
|
|
|
|
Then check the second link that i gave you, it has a sample program that use a small class to make this task as easy as calling DisableKeys
Just check the class
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
Well I did and I get this;
LINK : fatal error LNK1104: cannot open file "Debug\TaskKeyHook.lib"
What should I do.
|
|
|
|
|
Does TaskKeyHook.lib exist in the Debug folder?
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
No that whas the poblem,
But it whas in the realese folder so it works fine now.
But tht I whant to do is to set this funktion on the init dialog funk.
|
|
|
|
|
hian i creted a small program to deal with it
if you like give me your email i will send you both dll and program
I Think It will Work
-----------------------------
Alok Gupta
visit me at http://www.thisisalok.tk
|
|
|
|
|
Thank,
but it works fine now.
Thank anyway.
|
|
|
|
|
look man just use the windows keyboard hook and when you detect that ctrl+alt+del was hit just return 1; /error and the keyboard will have no //effect
else
return 0; //success
gabby
|
|
|
|
|
Thank you. The cause of the assertion was exactly due to the problem u said.
I want to draw some lines to the screen ,when uses dbl clicks,but I dont have a valid DC then...
Could u give me any suggestion on this one...
|
|
|
|
|
You need to store the data for your lines some other way.
Perhaps in an array of some data class representing the drawing to be performed.
Then, when the user does something, like move the mouse, add some data to your array for the new lines, and then call Invalidate() for your window.
The OnDraw will be called because of the painting to be done, and then you can go through your list of objects and draw the lines.
Basically, you should internally represent all drawing to be done with some data classes and then transform that data to drawing function calls in the OnDraw method.
If you do nto have htis data, and user draws soemthing, then when another window covers yours, and you get a paint message (OnDraw is claled) you will probably lose all the drawing you already did.
|
|
|
|