|
And how can I then read these 16-bit addresses?
It must be possible. Or how do other system information programs get advanced information about the BIOS (more than the 4 information strings in the registry)...?
|
|
|
|
|
Dominik Reichl wrote:
How can I read this byte?
From Win32? You can't. You needing ring0 privs (i.e. kernel-mode device driver).
But why would you want direct hardware access when GetKeyState, GetAsynchKeyState and GetKeyboardState can give you the same info?
|
|
|
|
|
I am currently developing a system information tool and there I need BIOS information (more than the 3 string values in the registry).
The keystate access was just thought as an example. There are many other, more interesting, values in this memory section.
Do you know how other system information programs get this information? For example, how do I detect, if the installed BIOS is flashable?
Thank you
-Dominik
|
|
|
|
|
I have some dialog controls inside an CFormView derived dialog and I need to clear them when the user selects New from file menu or when CDocument::OnNewDocument() is called.
How can I do this?
Thanks
"An expert is someone who has made all the mistakes in his or her field" - Niels Bohr
|
|
|
|
|
Can u be more clear..??
Is this Document and ur Fromview related ....
OnNewDocument() which view is created? or u want to show existing view...
Is this SDI or MDI....
Canu be more specific
cheers,
Super
------------------------------------------
Too much of good is bad,mix some evil in it
|
|
|
|
|
You can use CDocument::UpdateAllViews to send an update message to all the views which are attached to your doc.
|
|
|
|
|
I'm trying to use multiple CFrameWnd objects in addition to my main window. CMainFrame is my main window class create by App Wizard. I later created another subclassed CFrameWnd but I want it to be a child window of CMainFrame. I've only been able to get it to work properly if I create this child window using the "new" operator.
From my basic knowledge of C++, it is best to delete objects allocated with the new operator once we're done with the object. When should I use delete in this scenario? One of my attempts was to add a pointer to my subclass (call it CMyChildFrmWnd) as a public member variable in CMainFrame (m_myChildFrmWnd). I override CMainFrame::OnDestroy() which is just a message handler and not the Destroy() function itself, and in OnDestroy() I do:
if(m_myChildFrmWnd)
{
delete(m_myChildFrmWnd);
m_myChildFrmWnd = NULL;
}
Doing this causes an Access Violation error (0xC0000005).
If I don't manually delete this pointer allocated by using the new operator, will the memory consumed be freed automatically when the program exits? Is it going to be a problem if I keep creating new instances of CMyChildFrmWnd over and over again throughout the lifetime of the program's execution? For example, every time the user clicks a button:
m_myChildFrmWnd = new CMyChildFrmWnd;
Any suggestions on how to handle this or a better way of creating multiple frame windows? I would prefer not to use MDI child windows.
|
|
|
|
|
CFrameWnd s auto delete on destroy time, so you mustn't delete them explicitly: they will clean up when the user closes them or programmatically with m_myChildFrmWnd->DestroyWindow() .
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Thanks for the quick reply.
|
|
|
|
|
How can I define the full path of my application(exe file) in order to check it's location in the PC every time it is started? Is there SDK or MFC function about this?
|
|
|
|
|
Use GetModuleFileName with hModule==NULL .
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
i have a little problem.
my project name is MASTER. and in this project there are some class such as CMASTERView.
i defined some Public Variable in CMASTERView class(for example w1,w2,w3)
then i defined a class with this name : TREE. i do this with ADD CLASS option.
even i want to use w1 or w2 or w3 in class TREE an error occures : "w1" undeclared indentifier
what can i do if i want to use those tree variables in Class TREE ?
thnx
|
|
|
|
|
Well I really fully understand what u wanted to say..Anyway i will try to clear with what i have understood..
What is the relation between TREE class and CMasterview Class..If there no relation then that varibale will be out of scope only...
cheers,
Super
------------------------------------------
Too much of good is bad,mix some evil in it
|
|
|
|
|
w1,w2,w3 are members of class MASTER, they are not global variables. You need an instance of the class MASTER containing them. Public means that you can access them from any code, not only from methods of the MASTER class.
MASTER m1,*m2;
m2 = new MASTER();
m1.w1 = 1;
m2->w1 = 2;
Pavel
Sonork 100.15206
|
|
|
|
|
I'm reimplementing a project that currently uses a ListView as the major interface. This list displays a lot of items that themselves contain lists. But to see the contained lists you currently double-click an item and a new dialog-based editor window opens.
I'd like to redo this with an "expanding listview" rather like the Macintosh version of a treeview with the little triangle widget on the left. However, both the main listview and the subitems have column headings, and of course they are completely different from each other. So I probably want to have a second header control appear when a tree is expanded, and dragging the header column sizes should only change the columns for the item or subitem entries. Then of course all of the line items have to allow single/multiple selection, cut/paste and drag/drop, both to other places in the current listview, but also to other listview windows in the same project.
I have a hunch I'm going to end up having to build this thing myself from pretty much scratch, and GUI stuff is *not* my stong point!
So does anyone have suggestions on where I can find this contol? Or more likely, suggestions on which pieces I might grab to start making this thing?
Thanks a bunch!
Loren
|
|
|
|
|
How can I find out whether a scrollbar associated with a CScrollView window is currently being shown?
|
|
|
|
|
You can use CWnd::GetScrollBarInfo
|
|
|
|
|
Use it how? GetScrollInfo() only seems to access information about the position, range, and page of a scrollbar. I need to find out whether the scrollbar is currently being displayed.
|
|
|
|
|
The function name is GetScrollBarInfo. If your view inherits from CScrollView, you can see if the bar is shown by comparing the client size against the total scroll size :
CRect rectClient;
GetClientRect( rectClient);
CSize sizeScroll = GetTotalSize();
BOOL bSbVert = rectClient.Height() < sizeScroll.cy;
BOOL bSbHorz = rectClient.Height() < sizeScroll.cx;
|
|
|
|
|
Hi, does anyone know for some good (read step-by-step) tutorial on "transfering" win32 program as windows screensaver?
I have alaready done graphics detail as Win32 program (.exe) but I don't know hoe to make it as ss. I read somewhere (among other docs in MSDN) that it must have three function, but also it requires to exported and/or that program (during compilation) should not be Win32 program but instead a DLL.
I've tried all this above but I could not get ss, so I'm asking for help (tutorial, howto...) on making ss in VCbutnot on graphics technique (such as GL, DD...).
Thanks.
|
|
|
|
|
Check out Mike's Normal Code Project Screen Saver which is straight Win32. I don't cover the minute details, because MSDN was enough info for me to go on, but maybe you can gleam something from the code.
--Mike--
If it doesn't move and it should: WD-40. If it moves and it shouldn't: duct tape.
1ClickPicGrabber - Grab & organize pictures from your favorite web pages, with 1 click!
My really out-of-date homepage
Sonork-100.19012 Acid_Helm
|
|
|
|
|
This article does'nt write on subject I am interested in, as such it did'nt helped me at all.
Instead, I am (as I wrote above) intereseted in "procedure" in "completing" screen saver in Visual C++ environment.
Thanks.
|
|
|
|
|
Just got Visual C++ .NET and am having a problem that I can't figure out. I am trying to use the CRecordset::GetFieldValue function. .NET is giving me errors telling me that it can't convert from a CString to a CDBVariant.
I'm using it like this:
recordset.GetFieldValue("Field", TestString);
This works fine in VC++ 6.0, but now it doesn't work in .NET?? Am I doing something wrong? I selected to create a regular dll file, but everywhere that I call this it tells me the same error.
|
|
|
|
|
Hello everyone,
This is kind of a LAZY question but I will ask it anyway..
Does anyone have a good way of calculating file transfer rates? I have an application where I transfer files.. On my status bar I have a pane for the progress bar, transfer rate and the name of the file being transferred..
In the transfer rate I have
int nSpeed = 0;
CString strRate;
strRate.Format("%dKb of %dKb - %dKbps",wParam/1000, m_dwFileLength/1000, nSpeed);
This works fine minus the speed of course
I would like to show the speed.. (nSpeed)
What would be my best bet for calculating the speed?
Thanks,
Rob
|
|
|
|
|
Never mind I figured it out...
|
|
|
|