|
Accessing controls from outside a dialog is in general a bad design practice. Also, try to avoid global variables and global functions (it's lead in general to a lot of troubles).
Your problem could probably solved in another way than using global funcions. Why do you want to use such behavior in a global function ? What do you need to do exactly ? If you describe in details what you are trying to achieve, we could probably help you by pointing you better ways of doing it...
|
|
|
|
|
Thank you. I know that using global functions is not a good design practice, but due to external reasons i have to use at least one, and that one needs to update some controls very frequently (25 times/sec).
The process is this:
launch aplication
|__launch dialog
|__launch DirectShow graph
|__uses filter that takes a function (not method) as parameter
|____function accesses dialog controls 25 times per second to update some progress bars and labels
Thanks again.
|
|
|
|
|
ProbeVision wrote: Some of those funcions need to access to the control's (some progress bar and a label) methods of that dialog. Is that possible?
Perhaps, but why would you want to? It sounds like a recipe for disaster. Why not just send the dialog a standard Windows message and let the dialog itself communicate with its controls? If you absolutely had to communicate with the controls, use SendDlgItemMessage() .
"Take only what you need and leave the land as you found it." - Native American Proverb
|
|
|
|
|
Thank you, but how could i send a Windows message to a dialog?
|
|
|
|
|
ProbeVision wrote: how could i send a Windows message to a dialog?
The same way you would send a message to any other window...by using SendMessage() .
"Take only what you need and leave the land as you found it." - Native American Proverb
|
|
|
|
|
Thank you, the problem is solved. Your help was very useful.
|
|
|
|
|
Hello
I am using recursive function to populate directories and sub directories in a tree control.How can i make a directroy, sub directory of some directory. Please help me.
Waiting for reply...
We Believe in Excellence
|
|
|
|
|
Aqueel wrote: How can i make a directroy, sub directory of some directory.
By using CreateDirectory() or SHCreateDirectoryEx() .
"Take only what you need and leave the land as you found it." - Native American Proverb
|
|
|
|
|
Hi
How to differentiate MFC functions and SDK and what are the differences between these two. Please help me in this regard.
Thanks
|
|
|
|
|
Microsoft Platform SDK is freely available from Microsoft. It contains all header files, libraries and tools required to develop Windows applications. It contains some samples and documentation also. But it does not have any good object oriented window library like MFC. It is really difficult and challenging to produce high functionality applications with a great looking GUI and all.
But on the other hand, MFC is set of classes (Not free), that has wrappers for windows API, written in C++. There might be other packages those are similar (Think class library by symantec, and Object windows library by Borland, etc...) but MFC is the most celebrated package when it comes to windows application development with GUI.
Regards,
Rajesh R. Subramanian.
Akruti Software,
Bombay, India.
You have an apple and me too. We exchange those and We have an apple each.
You have an idea and me too. We exchange those and We have two ideas each.
-- modified at 2:33 Wednesday 30th November, 2005
|
|
|
|
|
Rajesh R. Subramanian wrote: Microsoft Platform SDK is freely available from Microsoft
Rajesh R. Subramanian wrote: But on the other hand, MFC is set of classes (Not free),
I am totally confused by your above two statement! nothing is free buddy!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
ThatsAlok wrote: I am totally confused by your above two statement! nothing is free buddy!
You can freely download the Platform SDK from Microsoft, whereas you cannot do so with MFC. Is that what you are referring to?
"Take only what you need and leave the land as you found it." - Native American Proverb
|
|
|
|
|
DavidCrow wrote: You can freely download the Platform SDK from Microsoft, whereas you cannot do so with MFC
Little OT question Sir, Is there is Some diffrence between Windows SDK and Plateform SDK?
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
ThatsAlok wrote: Is there is Some diffrence between Windows SDK and Plateform SDK?
The Windows SDK is a subset of the Platform SDK.
"Take only what you need and leave the land as you found it." - Native American Proverb
|
|
|
|
|
if the "winmain()" is visible, its an SDK program, if not it could be MFC.
SDK is programmed using C for calling APIs directly (though u can create your own classes in C++)
MFC is object oriented fully C++ based, wraps the raw API and gives you a faster way to create applications.
first learn SDK, then come to MFC. never land on MFC straight away. the mistake which i did Then you'd be asking "what the heck is windproc and whatz a winmain??!"
"But your mind is very complex, very tricky. It makes simple things complicated. -- that's its work. And for centuries it has been trained for only one thing: to make things so complicated that your life becomes impossible."- Osho
<marquee scrollamount="1" scrolldelay="1" direction="up" height="10" step="1"> --[V]--
|
|
|
|
|
if the program have any dependancy to MFCxxx.dll, then the program uses MFC somewhere
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
if the project is done in MFC , it'll have MFC functions . if it is done in SDK , it will have SDK functions.
"But your mind is very complex, very tricky. It makes simple things complicated. -- that's its work. And for centuries it has been trained for only one thing: to make things so complicated that your life becomes impossible."- Osho
<marquee scrollamount="1" scrolldelay="1" direction="up" height="10" step="1"> --[V]--
|
|
|
|
|
snprani wrote: How to differentiate MFC functions and SDK and what are the differences between these two. Please help me in this regard.
Buddy, MFC is just a Object oriented Wrapper Over Windows SDK api.. which simplify working with apis easily.. thats a only major diffrence between them
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
Read about MFC here.
"Take only what you need and leave the land as you found it." - Native American Proverb
|
|
|
|
|
I would like to know how to implement it in XP?
MOV AX, 6F09H ; Setting the Digital port is output
MOV BL, 09H ; Digital value is 09H
INT 15H
Can it be implement with inpout32.dll?
Please help!
|
|
|
|
|
The C compiler can handle inline assembly code, although I have never used this myself - maybe you could just use that?
Alternatively, a quick google tells me that INT 15H gives access to various BIOS calls, mostly related to memory maps etc., but after a 5-minute search I did not see INT 15 with those AX and BL values. So take a step back, and tell us what you are actually trying to do. What information are you looking for / what do you expect this call to do?
|
|
|
|
|
Thank you for answering my message!
In fact that it is the control of Digital I/O of an industical PC.
I need to use mfc to do it because it is only a part of my program.
Can you give me more hints to do it?
Please help!
|
|
|
|
|
My guess would be that there are 2 options - see if you can use the exact assembler code you list (MOV, MOV, INT), or else find out what the calls actually do, and try to repeat that functionality using C++.
This article http://www.codeproject.com/cpp/extasm.asp[^] has examples on how to include assembly statements into your code. There are restrictions on what you have privilege to do as a "normal" program (i.e. not part of the kernel) but I can not remember that stuff any more. If you want some ideas, look at http://www.codeproject.com/system/soviet_kernel_hack.asp[^] - I have no idea what that article means, though!!!
Trying to find out what the code actually does may be easier, as long as the system is not too old. What documentation do you have? The programmer's guide for the PC, which should be available if you are trying to use features which are specific to the PC, should have this information.
|
|
|
|
|
Thank you very much!
I found that it is using a chip set W83627HF.
Now I can use the "inpout32.dll" to set it.
Do you how to access it without using "inpout32.dll"?
I think it should have driver inside the Windows.
Please help!
|
|
|
|
|
To start off, download www.winbond.com/PDF/sheet/w83627hf.pdf[^], if you do not have it already.
This PDF document tells you for the Winbond chip what information is available at what port address, so you can use InpOut32.DLL to read information, or to write settings. For example, look at figure 2.1 on page 23.
But this still does not tell you how to replace the MOV, MOV, INT instructions. As far as I know, the MOV, MOV, INT instructions are motherboard BIOS functions - if you can find out what these actually do (maybe from motherboard documentation), maybe you can use the W83627 documentation and get the same effect by using INPOUT32 to write to or read from ports.
|
|
|
|