|
Windows makes this tough to do. If you are up to writing a device driver, I think the bios INT 13h Extended Read (42h) will do it. This is buried in the DDK docs under 'Design and implementation guide' | Interrupt 13h Extension APIs' | 'Reference' in the MSDN.
I doubt you can do this kind of thing through DeviceIoControl. If its possible, it would be NT only I think.
Just passing on the hints (confusion?) I've managed to scrounge so far...
DOS was so cool...
|
|
|
|
|
Hi !
I want to get handle of a control in a web page. I used WindowFromPoint function but I am getting the handle to the container of that control. I want to know how the events get generated inside a web page and how the controls in the page (like command buttons, combo boxes, etc.,) are identified. If I want to manipulate those controls from out side the browser, is it possible? (like normal window and all it's controls could be mainipulated from out side the application).
Thanks in advance...
John
|
|
|
|
|
In Internet Explorer you cannot get it. Since the whole container is a single window, you will only get the handle of the container.
But you can get in netscape navigator, since they implement as a normal windows program and then create controls on runtime! SO it will work in netscape, but not in IE.
Regards
Ravi
|
|
|
|
|
Hi,
I have some questions concerning application distribution:
I have a list of dependencies (I used the dependency tool of VC++6.0):
Executables
MyApp1.exe
MyApp2.exe
DLLs
1. My Application DLLS
MyDLL1.dll
MyDLL2.dll
2. MFC DLLs
MFC42.DLL
3. Other DLLs
advapi32.dll
comctl32.dll
comdlg32.dll
gdi32.dll
imagehlp.dll
kernel32.dll
msvcirt.dll
msvcrt.dll
ntdll.dll
rpcrt4.dll
shell32.dll
shlwapi.dll
SlsApi.dll
user32.dll
I want to install as many private copies of these DLLs as I can. (I am horrified of upgrading people’s systems without their knowledge. (I want to avoid copying DLLs to the system32 or system dirs)
That means e.g. I put the MFC42.dll in the .exe module path. (my own local MFC dll copy)
Which of the other DLLs should I include in my install program?
I can’t imagine having my own private copy of e.g. ntdll.dll, ….
Could someone help me out here or at least point me at the information needed to get a correct list of redistributable DLLs (and their preferred target directory), so I do not have to ask this silly question in the future. Anyway, a solution for this particular distribution would be highly appreciated.
Oh yes, static linking of MFC is out of the question for technical reasons (program structure -> explicit linking mechanisms, …).
Best Regards,
Gert.
|
|
|
|
|
Hello!
I've created a CListCtrl with ownerdraw and everything works just dandy, but there is one thing.
What message does Windows send when the user uses the down and up arrows to scroll in the list? It's not the normal WM_VSCROLL when using the scrollbar, it's something else.
I need the message that comes after the listctrl has been redrawn.
Please help me!
/Mathias
|
|
|
|
|
Hello Mathias,
what you can do is trap the message (when the user pushes the up or down arrow = button) and then use this functions to scroll: BOOL Scroll( CSize size );
Check the msdn for more specifics on the functions. Since it's an ownerdrawn CListCtrl, you'll have to redraw everything yourself.
|
|
|
|
|
First of all, thanx for the hint.
I was probably not descriping my question enough.
The thing is, when the list has more items than can be shown and the user selects the item at the bottom of the list window(that are shown, more items below) the listcontrol automatically scroll down(I want it this way,EnsureVisible(...)) one row. This is where the problem start. After it has repainted itself, I need to calculate what items are shown and therefore wants a message from Windows telling me that it has been done, like the message SB_ENDSCROLL associated with CWnd::OnVScroll.
Thanks!
/Mathias
|
|
|
|
|
Maybe you have to take a different approach:
you said:
>>I need to calculate what items are shown
Then you could use this function:
int GetTopIndex( ) const; (=The index of the topmost visible item.)
Since the listcontrol is owner drawn, you should get a WM_DRAWITEM message. You should make a handler for this and then you can use the GetTopIndex function to get the first visible item.
|
|
|
|
|
Hai
Iam interested in writing my own installation program to setup the files.What are concepts and procedures you have to follow .Any help would be appericiated
|
|
|
|
|
Depends on wether you are going to write a general install program or a specific install program just for your application. I'll guess it's the first one you are talking about.
1. It has to be easy to use.
2. Things it needs to do:
2.1. Copy files to a target directory
2.2. Compress files to reduce install size, uncompress them again while installing.
2.3. Ability to make subdirectories and copy files in there
2.4. Make it easy to copy files to certain specific windows directories like system32 or fonts.
2.5. Place (if wanted) icons on desktop.
2.6. Make an entry in start menu
2.7. Possibility to add a certain document type to the system
2.8. Registry control
2.9. Cool looking customizable install screens (different types of setup, license agreement , ... )
2.9. Properly uninstall (=undo all previous steps)
That's about all i can think off. You might want to take a look at this freeware installer that i frequently use, Inno Setup, http://www.jrsoftware.org/
|
|
|
|
|
Is there a special way to make self-extracting .exe's, if I have an .exe file but want to be able to specify a specific config file and zip file.
/XTSea
|
|
|
|
|
You might want to check these links here on codeproject
-> http://www.codeproject.com/useritems/sfxframework.asp
-> http://www.codeproject.com/file/self_extractor.asp
They should help you get started
|
|
|
|
|
I would not suggest you to write your installation program. And according to the new logo requirements of windows you have to install through Windows Installer(MSI). There are variety of reasons to enfore this, since MS beleives installation is one of the main culprit in many "file missing" or dll hell problem.
So you *have* to go through MSI to install your program and I suggest to look at ISWI(InstallShield for WIndows Installer). or Visual Studio Installer.
Regards
Ravi
|
|
|
|
|
I found another great installer that's free. I've found it to be easier to use than pay installer and it has all the features. It's call GP-Install and you can get it at: http://www.qsc.co.uk/ They say that about 5000 applications use it. I would highly recommend checking there before spending any money on a pay installer. It's very professional!
|
|
|
|
|
I have the following situation:
DataDialog::Start()
{
...
m_pDataSet = new CDataSet(m_pDB);
try
{
m_pDataSet->Open()
}
...
}
DataDialog::OnReceiveData()
{
...
if (m_pDataSet->IsOpen())
{
m_pDataSet->AddNew();
...
m_pDataSet->Update();
}
...
}
DataDialog::Stop()
{
...
if (m_pDataSet->IsOpen())
{
try
{
m_pDataSet->Close();
}
...
}
delete m_pDataSet;
...
}
where m_pDataSet is a pointer to an object derived from CDaoRecordSet and m_pDB is a pointer to a CDaoDatabase. My problem is that I get an unhandled exception when I close the data set (the data is stored fine). I tried opening and closing the data set in the OnReceiveData function and that does not crash, but it cannot keep up with the incoming data.
Any suggestions?
Thanks.
|
|
|
|
|
Does anyone know how to get the memory address of a bitmap resource, using it's ID ?
I would appreciate any help !
|
|
|
|
|
FindResource, LoadResource, and LockResource gives you a pointer to read-only data.
|
|
|
|
|
Hi
I have a problem with my application.
i made my application in VC++ 6.0 .
when i tried running that on the user's machine i found out that he is having a different screen resolution.
I developed the application in 600X800 .
but the user's machien is running on 480X600.
How do i do now.
i need my dialog box and all the controls to be visible in this new resolution also.
i cannot statically change the position of all my controls now.
Is there any way .. where i can do it for the dialog box and it gets adjusted for all the controls also?
i used MFC.
Thanks.
|
|
|
|
|
To get the size of the screen:
n_screen_width = GetSystemMetrics(SM_CXSCREEN);
n_screen_height= GetSystemMetrics(SM_CYSCREEN);
Then you can resize a control/window by using these functions:
SetWindowPos( const CWnd* pWndInsertAfter, int x, int y, int cx, int cy, UINT nFlags );
OR
void MoveWindow( int x, int y, int nWidth, int nHeight, BOOL bRepaint = TRUE );
void MoveWindow( LPCRECT lpRect, BOOL bRepaint = TRUE );
|
|
|
|
|
Hi Thank u.
i have a command button in the right most corner.
i placed it there while certaing the dialog box.
but while running when i changed the screen resolution, that command button was not visible.
where exactly am i supposed to place the
SetWindowPos or MoveWindow functions?
Is it enough if i write for the dialog box onintit or Precreatewindow.
do i have to write the same code for all teh controls inside the dialog box too ???
i am new to VC++.
and this is urjent.
could u pl. provide me some more help on this.
Thank u.
|
|
|
|
|
I think that when you change the screen resolution while your program is running that you receive a WM_PAINT/WM_SIZE message from Windows.
Then you could write an WM_PAINT/WM_SIZE handler that paints the window according to the systemmetrics values.
You can probably just move the command button then to a position where it can be seen on the screen. You can use either of the functions to accomplish this.
Rundown:
-> Receive WM_PAINT/WM_SIZE
-> In WM_PAINT/WM_SIZE handler:
-> check the screenmetrics
-> call SetWindowPos / MoveWindow to place window correctly on screen
-> resize and/or move all controls on the screen
>>do i have to write the same code for all teh controls >>inside the dialog box too ???
as explained above, let the parent window handle this (dialog box)
|
|
|
|
|
Hi,
You may try using a class that simplifies resizing a dialog and all its content. There are a lot of them on CodeProject!
I wrote one, too. If you wish, look at:
CResizableDialog - A CDialog derived class to implement resizable dialogs with MFC.
I think it's quite simple to use. But there are also many other good choices. Look in the Dialog section.
Hope this helps,
Paolo.
|
|
|
|
|
One of the things you either love or hate about VS6 and VC6 is the the "member" list that appears after you've typed "->" or "." after a class or structure name.
When I add members to classes of mine, they are accordingly listed after I type the class name. However I have a header file will lots of structure definitions in a directory different to the main app / source code. If I modify one of these structures, the changes don't seem to be listed when I next type the structure name.
Any ideas why, or what I'm doing wrong please?
Thanks
|
|
|
|
|
This is a common problem, intellisense isn't really reliable in VC++ (and of course much more complicated than in e.g.VB). The advises range from waiting for full moon, step out of your cubicle and howl all night long, to: close the project, delete all temporary files (.opt, aps, .ncb, .clw, although .ncb is the likeliest), reopen the project, and open clazz wizard dialog, to rebuild the clw information. Well, I've found out both methods have their advantages... Good luck!
Peter
|
|
|
|
|
Deleting the .NCB file usually fixes it for me. The other files have nothing to do with IntelliSense. .APS = resource browser data, .OPT = debugging settings, .CLW = ClassWizard data.
|
|
|
|