|
Hi Tomasz, your advice works well to hide my modeless dialog. Thank you!
But by passing GetDesktopWindow() instead of "this" as the second parameter, I couldn't get access to my SDI in the dialog using GetParent(). I need to post back some message to my SDI in the dialog when a button is pressed. Any suggestion?
|
|
|
|
|
hmm, maybe I can add a member variable of CMyview to myDialog and initialize it after I create the dialog.
|
|
|
|
|
Does anyone ever developed one ? Where I can find information about this ?
Mauricio Ritter - Brazil
Sonorking now: 100.13560 Trank
|
|
|
|
|
MDAC SDK should have this info. There's even 'Sample OLEDB Provider' sample, at least in v2.5 which is on my disk.
Tomasz Sowinski -- http://www.shooltz.com
|
|
|
|
|
Tks !
Mauricio Ritter - Brazil
Sonorking now: 100.13560 Trank
|
|
|
|
|
Till now on, i've always just written programs using C, often MFC along with it. But i just keep calling functions and i know how to use all of that but i dont really understand how they work... i mean, i would like to know:
a) Is it possible to directly access hardware through C (like for example video memory)
b) Where can i get examples/source of this?? (for instance winsock source or some display library or something)
I just mean that i would like to be able to work on a lower level closer to the hardware to manipulate it better, like for example whats the code to draw a black pixel on the screen in pure C? don't you need to access the video card or something? (when not using ready-made api's)
I hope you know what i mean...
Thanks.
Kuniva
--------------------------------------------
God gave man a penis and a brain but not enough blood to make both of 'em work at the same time.
|
|
|
|
|
Windows and other OSes generally isolate you from hardware through their abstraction layers. So you can't get the address of video memory and write a byte there. Instead you have to use DirectX, which is a part of OS and provides the programmatic interface for you. The layer between your program and hardware is not very thick in this case.
OTOH, if you want to go hardcore, you'll need to create a device driver. These are the beasts which are allowed to talk to hardware directly.
Tomasz Sowinski -- http://www.shooltz.com
|
|
|
|
|
I'm trying to flush all system buffers associated with a drive on a Win 2k system. The only way I found is to use an Int 21h function 710Dh from the SDK documentation. Can anyone think of another simple way to do this?
I think this will help me with my testing, but it isn't worth spending a lot of time on.
Brad Manske
|
|
|
|
|
Brad Manske wrote:
The only way I found is to use an Int 21h function 710Dh from the SDK documentation.
Does Int 21h work on W2k?
Tomasz Sowinski -- http://www.shooltz.com
|
|
|
|
|
I'm guessing that it will not. The page in the SDK is under a heading for 95/98/ME.
Brad Manske
|
|
|
|
|
I'd look into DeviceIoControl. There's a control code, FSCTL_LOCK_VOLUME, which apparently does flush the buffers. You could lock and unlock immediately. I've never done this, however - treat this with 1e6 milligrams of salt.
Tomasz Sowinski -- http://www.shooltz.com
|
|
|
|
|
As much as 1 kg. of salt? Perhaps you meant 1e3 milligrams.
/ravi
"There is always one more bug..."
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
Ravi Bhavnani wrote:
Perhaps you meant 1e3 milligrams
No, when I write 1e6 I mean 1e6
This DeviceIoControl is quite low level for my taste. If the guy looses his data, I don't want to be responsible
Tomasz Sowinski -- http://www.shooltz.com
|
|
|
|
|
Tomasz Sowinski wrote:
No, when I write 1e6 I mean 1e6
LOL
I didn't even notice the quantity specified. Now I feel like I really got my money's worth.
Brad Manske
|
|
|
|
|
I've looked through the documentation and it looks like it might work. If it doesn't, it would only be a little more work to try dismounting the volume. So I now have several more things to try.
Thanks for your help.
Brad Manske
|
|
|
|
|
|
I'm writing my own custom install program. I need to create links in the common desktop, common programs, and common startup directories. I use SHGetSpecialFolderPath to find these directories, but when I run the setup program on NT4 with IE6 I get told it can't find SHGetSpecialFolderPath in SHELL32.dll
Quoting from MSDN...
Requirements...
Windows NT/2000: Requires Windows 2000 (or Windows NT 4.0 with Internet Explorer 4.0 or later).
When calling SHGetSpecialFolderPath I write "BOOL success = SHGetSpecialFolderPath(m_hWnd, path, ssfCOMMONDESKTOPDIR, FALSE);" for example.
Well the NT4 PC that I'm testing it on has IE6 on it, so in theory should work. Anyone know why I'm getting this error please?
Jeremy Davis
http://www.astad.org
|
|
|
|
|
What version of shell32.dll do you Have?
You need the version 4.71 or later...;)
Best Reagards
Carlos Antollini.
Sonork ID 100.10529 cantollini
|
|
|
|
|
Hmm, I saw that in MSDN. How would I find what version I have? Also why didn't IE6 install the latest version? Thanks for your help anyway.
Jeremy Davis
http://www.astad.org
|
|
|
|
|
Can you run depends.exe on target system and check if Shell32.dll exports SHGetSpecialFolderPath? You'll be able to tell whether problem is located in OS or in your installer.
Tomasz Sowinski -- http://www.shooltz.com
|
|
|
|
|
... and if you're using GetProcAddress to get the SHGetSpecialFolderPath, do not forget that actual name is SHGetSpecialFolderPathA (if you want ANSI) or SHGetSpecialFolderPathW (if UNICODE is your cup of tea)
Tomasz Sowinski -- http://www.shooltz.com
|
|
|
|
|
Thanks for your help. In the end I've used SHGetSpecialFolderLocation to find the directories ppidl, and converted it into a path using SHGetPathFromIDList.
Jeremy Davis
http://www.astad.org
|
|
|
|
|
|
I created a window on the screen, but it doesn't seem to repaint itself properly. I've called the updatewindow.
|
|
|
|
|