|
Yup, that was it. I found that right after I posted this message. Thanks.
|
|
|
|
|
I need to write an app to programmatically unbind a certain protocol from a network card. E.g. Check if Netbeui is bound to a certain ethernet network card and if so then I need to unbind it (without user intervention). The idea is that after running the app only TCP/IP would be bound to the ethernet card no matter what additional protocols are installed on the computer.
I've got it working in Win2k (with the use of the INetCfg API calls) but I can't find any API calls or code examples on how to do this in Win98/Win Me and NT4.
Any ideas?
|
|
|
|
|
What I'd like to do is to cature the contents of a window that is low in the z-order / burried by other windows.
I've tried using Joseph Newcomer's www.codeproject.com/bitmap/screencapture.asp Screen Capture To Clipboard function but this seems to capture whatever is highest in the z-order / currently displayed.
Any ideas anyone please?
|
|
|
|
|
hey jeremy ... think about it ... the only thing that knows whats in a window usually is the app that created it and will re-create it on a wm_paint message ... therefore the window contents don't necessarily exist until the app is top of the z-order so capturing its contents might be tricky
i honestly can't think of a way to do what you want without the co-operation of the original app creators
i hope someone points out i'm wrong and its just as easy as calling CCopyHiddenWindowContents() or whatever
---
"every year we invent better idiot proof systems and every year they invent better idiots"
|
|
|
|
|
You'd have to get hold of the Window HWND via the FindWindow() function, and then you'll have to use SetWindowPos to set it always on top.
Then you should be able to capture the contents.
Cheers,
Peter Pearson
|
|
|
|
|
Check the WM_PRINT and WM_PRINTCLIENT messages. If you're using MFC, there's even a CWnd::Print method. MSDN says:
"The WM_PRINT message is sent to a window to request that it draw itself in the specified device context, most commonly in a printer device context."
So you should create the memory device context and send WM_PRINT to the window you want to capture, passing HDC as wParam. You'll find more info in MSDN.
Cheers,
Tomasz Sowinski
|
|
|
|
|
i was wondering about being able to redirect an apps output to an abitrary dc but didn't know about the wm_print trick ... thanks
---
"every year we invent better idiot proof systems and every year they invent better idiots"
|
|
|
|
|
Hi,
I'm currently migrating from Delphi to Visual C++. I already know C++, but I've got a problem with Visual
C++ itself. In Delphi, one can create an UI with so called forms. They resemble the dialog-based applications
which one can create in Visual C++. However, the dialog based applications lack for example a main menu.
I've also tried the SDI and MDI wizards, with the document/view architecture. It's possible the let
one of the views inherit from CFormView, but that's not exactly what I'm looking for, since I don't
need the document/view architecture.
Any help would be appreciated,
Ton.
|
|
|
|
|
You can assign a menu to a dialog in the dialog editor.
--Mike--
http://home.inreach.com/mdunn/
The Signature, back by popular demand: Buffy. Pajamas.
|
|
|
|
|
You can try RadVC add-in (www.capitolsoft.com) too. It lets you work in a Delphi / VB - like RAD environment in Visual C++.
|
|
|
|
|
hi!
I use some keyboard function in a dialog box . ex. KEY_UP,KEY_DOWN.....
but ! why the function can't Work!
Could you teach me
|
|
|
|
|
Hi..
a little bit difficult to write you back.. cause the interesting thing would´ve been HOW you tried to do this.. one thing that may help you is overriding the PreTranslateMessage virtual - function. (i hope your using MFC)
There you can handle all the events you would like to.. and if you return false the message gets routed down to CMainFrame (if you´re using the Doc / View Stuff...)
BOOL CDlg::PreTranslateMessage(MSG* pMsg)
{
// TODO: Add your specialized code here and/or call the base class
if(pMsg->message == WM_KEYDOWN) //#256
if(pMsg->wParam == VK_ESCAPE) //#27
{
// do whatever you want to do if the user presses VK_ESCAPE
return true; //you´ve handled the message.. don´t route it any further
}
return CDialog::PreTranslateMessage(pMsg);
}
hope that i could help you with that...
|
|
|
|
|
Hi,
I have a project in VC++ that in release version works on some system without any problem but on some system it has bug on need to rebuild. ALL system are PentumIII
with WIN2000.
Please send me any advise you can.
maYSam
|
|
|
|
|
Hi everybody
I found answer of my question myself. It was because of optimize for maxspeed
in release version that cause crash only on few computers and I turned off
optimize of a function that was insecure with #pragma optimize("",off) and now I
havn't any problem.
maYSam
|
|
|
|
|
<<< In the name of GOD >>>
Hi,
I want to know, what is really CALLBACK ???
Is it function ?
What is performance ?
So, explain FULL about it ...
And if possible please write a example ...
Thanks.
My month article: Game programming by DirectX by Lan Mader.
Please visit in: www.geocities.com/hadi_rezaie/index.html
Hadi Rezaie
|
|
|
|
|
CALLBACK is a typedef referring to the
__stdcall "function calling convention".
You can read a FULL explanation about __cdecl, __stdcall and __fastcall calling conventions in MSDN.
--------------------------------------------------
If my messages appear curt, I apologize.
I try to be brief to save your time as well as mine.
--------------------------------------------------
|
|
|
|
|
in addition to what gbo said i think you might mean "what the hell is it?" and so it is simply a function pointer you provide to various api and mfc functions that allows the os to call into your app when an event happens that you want to be notified ... it kinda is a alternative to getting a message posted to your app queue for some situations (timers etc)
as far as i know that is
---
"every year we invent better idiot proof systems and every year they invent better idiots"
|
|
|
|
|
it's just a define to __stdcall, which is what windows uses (generally).
WINAPI, APIENTRY, CALLBACK,... etc, are #defined in windef.h, you can
look in there to further see what other calling conventions windows
has defined for you.
__stdcall says to push function arguments on the stack from right
to left, then call the function.
Mike
|
|
|
|
|
Is obj file written on fortran.
Is source this file.
May i have access to this file if..add it to vc rpoject..?
If yes how?
THX.
|
|
|
|
|
you can create lib and use as all other libs
(i never tried to add obj between lib files but from project settings\link\object-library modules naming has to be possible too)
t!
|
|
|
|
|
Is obj file written on fortran.
Is source this file.
May i have access to this file if..add it to vc rpoject..?
If yes how?
THX.
|
|
|
|
|
How can I use timer functions in Win32?
I'm doing an alarm clock so I want to learn!
CocaCola
|
|
|
|
|
Hello, the codegurus around the world.;)
I'm not familiar with Win32 like C style code so much,
but this is my guess.
1) Use ::SetTimer API function.
2) Pick up WM_TIMER message at WinProc function.
3) Maybe wParam or lParam includes Timer ID.
Or someone helps this?
Have a nice day!
-Masaaki Onishi-
|
|
|
|
|
Hi,
I must introduce to you, KillTimer function for erase timer.
My month article: Game programming by DirectX by Lan Mader.
Please visit in: www.geocities.com/hadi_rezaie/index.html
Hadi Rezaie
|
|
|
|
|
You should use a threaded timer. The windows timer messages are the lowest priority messages and cannot be relied on. There is no guarantee that they'll be processed on a busy system. There is a threaded timer class on CodeProject that I use all the time.
|
|
|
|