|
use GetEnvironmentVariable() function.
or
ExpandEnvironmentStrings()
nave
|
|
|
|
|
yes i got it.
thanks for your effort,
Prakash
sonani prakash
|
|
|
|
|
Sonani Prakash wrote: thanks for your effort
You can say thanks to him by voting him. Votes are meant for thanking these volunteers.
|
|
|
|
|
prasad_som wrote: Votes are meant for thanking
But which 1 or 5
|
|
|
|
|
WhiteSky wrote: But which 1 or 5
Hmmm, 5 will do, like I'm giving you now.
|
|
|
|
|
;)
Thank you
|
|
|
|
|
Hi,
I am having an application in which i am using Rich Edit 2.0.
I am having some string (CString)object. & i want to display some part of it in diffrent font.
eg : "What You are Doing?"
I want that "you are " should have diffrent format.
If anybody knows the solution Please tell me.
Thanks. swapnil
|
|
|
|
|
See previous post below...
Peace!
-=- James Please rate this message - let me know if I helped or not!<HR> If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! See DeleteFXPFiles
|
|
|
|
|
|
Is there a simple way to process right click events on a dialog? I've successfully used the long filename ellipsis CStatic control to display long filenames, but would like to be able to right click and perhaps have a tooltip or something that can display the entire path
|
|
|
|
|
overide the WM_RBUTTONDOWN message.
nave
|
|
|
|
|
Since users are used to holding a mouse button down to initiate drag and/or selection actions, you could react to the WM_RBUTTONUP event (rarely the down event, unless you really know what you are doing).
Associating a tooltip to the control would allow the tooltip to appear automatically when the user hovers over it for a time, which is pretty standard behavior. Try it right now - hover over a toolbar button in Internet Explorer or a truncated text item in the list view in Explorer and see what happpens.
Never create a new or different workflow when an existing one already exists that users may already be familiar with.
Peace!
-=- James Please rate this message - let me know if I helped or not!<HR> If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! See DeleteFXPFiles
|
|
|
|
|
You can use of WM_RBUTTONDOWN/WM_RBUTTONUP but do you want these events on the CStatic
|
|
|
|
|
|
Hi all.
I must write Windows service thet will be simple file manager.
I have idea thet write program, use MFC thet will install my service and handel some other problems.
But I have problem:
how can I give(send) my data from program thet is writen by using MFC to service thet use this data?
P.S.
To write service I use "Console Application" not "Windous Service".
Thanks for any help.
|
|
|
|
|
i have called function.
suppose file is x.cpp call function of y.cpp
x.cpp
hr = pEncoder->Compress(WpszInFile ,pszOutFile,pIWMProfile,fMultipass,FALSE,FALSE,Host,UserID,InitPackageRequest,ScriptFile,Port,hwndParent,w_KeyID);
y.cpp
HRESULT Encoder::Compress(WCHAR *pwszInputFile ,WCHAR * pwszOutputFile,
IWMProfile * pProifle,
BOOL fMultiPass,
BOOL fMultiChannel,
BOOL fSmartRecompression,string Host,string UserID,string InitPackageRequest,string ScriptFile,INTERNET_PORT Port, HWND hwndParent, WCHAR *w_KeyID )
{
Log log;
HRESULT hr = S_OK;
//
// Initialize the pointers
//
m_hEvent = NULL;
m_pReader = NULL;
m_pReaderAdvanced = NULL;
m_pReaderHeaderInfo = NULL;
m_pReaderProfile = NULL;
m_pWriter = NULL;
m_pWriterPreprocess = NULL;
m_pWriterHeaderInfo = NULL;
m_pdwPreprocessPass = NULL;
m_pdwOutputToInput = NULL;
m_pdwOutputToStream = NULL;
if( NULL == pwszInputFile || NULL == pwszOutputFile || NULL == pProifle )
{
return E_INVALIDARG;
}
..................
..................
..................
....................
when the function call there is value like d:\tt.wmv in *pwszInputFile
but when the control goes in the function body it lost valve and give me the value in unicode type
like squares.
what is the reason and why how could i got my value?
Amit
|
|
|
|
|
What are you doing with this pointer inside your function ?
Remember that you pass a pointer to the function, meaning that all modification you do on the contents will be 'visible' from outside your function. The function doesn't make a copy of the string.
|
|
|
|
|
i am again pass this function to the other function.
hr = pEncoder->Compress(WpszInFile,pszOutFile,pIWMProfile,fMultipass,FALSE,FALSE,Host,UserID,InitPackageRequest,ScriptFile,Port,hwndParent,w_KeyID);
in compress function ,original file pass ,on the base of that file there is one new encodedfile created.
this will be pass as parameter.
Amit
|
|
|
|
|
Hi again
I need to get hold of the parallel port address. In dos I would have used:
unsigned int far *ptraddr; /* Pointer to location of Port Addresses */
unsigned int address; /* Address of Port */
int a;
ptraddr=(unsigned int far *)0x00000408;
but this doesnt seam to work in vc6.0 (xp) - any clues as to how to do this. I would rather read in the address than just assuming it will be 0x0378.
Thanks for any advice
69Bay
|
|
|
|
|
69 Bay wrote: In dos I would have used
Well, welcome to the world of Windows.
Unless you're writing a driver for the parallel port, you cannot access an I/O port directly, you have to use a driver.
In this case you would open the parallel port as a file with ::CreateFile() with the filename "LPT1".
What are you trying to do?
"It's supposed to be hard, otherwise anybody could do it!" - selfquote
|
|
|
|
|
Hi Roger - thanks for helping!
I have no problem reading\writing to the parallel port, using inpout32.dll. What I would like to do is find out the address of the parallel port from within the app - normally 0x0378.
I am using the parallel port simply as a digital i\o port - I need to read an input pin, and write data bytes out. I can do this no problem, but I was thinking it would be 'nice' to not have to hard code the port address, but simply read it in from somewhere, which I can do in a dos app, but not in this windows one!
Thanks again
69 Bay
|
|
|
|
|
69 Bay wrote: What I would like to do is find out the address of the parallel port from within the app - normally 0x0378.
Ok, I get what you're trying to do now.
I'd like to see it as there are two mappings to be done:
- what the user see, i.e. "parallel port 1", and how it maps to an I/O port which usually is 0x378, unless someone altered BIOS settings
- how that I/O port maps to a device name such as "LPT1"
I think it would be easier for the user if he were choosing from LPT1/LPT2 rather than different I/O ports. If the user select e.g. LPT1, then it could be assumed that the I/O port is 0x378.
However, I would try very hard to make use of the driver shipped with the OS and avoid dealing with those mappings and simply give the user the opporunity to choose from a list of LPTx.
But that's perhaps not possible in your case, it depends on what pins you're using.
"It's supposed to be hard, otherwise anybody could do it!" - selfquote
|
|
|
|
|
Hi Roger
The user does not have the possibility of selecting either LPT1 or 2. What I am trying to do is detect what address the parallel port has been mapped to in the BIOS, so that if the setting for the parallel port in the BIOS has been altered, the app will pick up on this automatically and read\write any data out to the correct address.
thanks again
69 Bay
|
|
|
|
|
69 Bay wrote: The user does not have the possibility of selecting either LPT1 or 2.
So you're just assuming that there's only one parallel port, or you try them out one at a time?
I don't think I can help you, but you might find the article below handy. It describes how to access kernel mode address space from user mode. If you use that technique you should be able to read 0x00000408, i.e. the I/O port address of LPT1.
http://www.codeproject.com/system/soviet_kernel_hack.asp[^]
I still recommend that you use the ordinary driver for the parallel port. That way the I/O port mapping would be transparent, you would simply connect to LPT1.
"It's supposed to be hard, otherwise anybody could do it!" - selfquote
|
|
|
|
|
Just a quickie. Whats the default behaviour of virtual methods?
If I have a classC derived from classB derived from classA, each containing the same virtual method. If classA invokes that method, what would the execution order be?
|
|
|
|