|
hi all,
I am developing a application that takes input from file. I want to display the file name that is opened on the TITLE BAR of Dialog BOX. I need very simple code. As i am begineer, I don't understand complex codes.
thank you
sarojsigdel
|
|
|
|
|
use SetWindowText to set the caption on a dialog
void CMyDialog::SomeFunction()
{
SetWindowText("New Title");
}
|
|
|
|
|
thanks Chris
the code worked
thanks a lot
|
|
|
|
|
Or you can use of WM_SETTEXT .
|
|
|
|
|
Hey Friends
I am calling the function get_images but finally i could not figure out it's path
Need Help.
Regards
IHTMLElementCollection* pColl = NULL;
hr = pHtmlDoc->get_images (&pColl);
..
long nLength = 0;
pColl->get_length (&nLength);
for (int i = 0; i < nLength && bSearch; i++)
{
hr = pElemDispatch->QueryInterface (IID_IHTMLElement, (void**)&pElem);
if (SUCCEEDED (hr) && (pElem != NULL))
{
//I got an Image but how to read it?
//Could not find even its path??
}
}
|
|
|
|
|
Did you try querying the interface for IPicture? Also, I didn't see any code for getting pElemDispatch from pColl.
Nathan
|
|
|
|
|
hi.. my program is about to capture the dektop by creating compatible dc and compatible bitmap and than convert it from ddb to dib. But I want to compress it before storing it in DAT format. How to proceed with this
prashant
|
|
|
|
|
Since you mention a specific format (DAT), it is unclear if you mean that you want to scale the image before storing it, or if you really mean data compression.
Scaling can be done in a coarse fashion by drawing the image to a target DC with reduced target width and height values. GDI+ offers functions that may make a better quality image, as will a dedicated graphics library.
If you really mean data compression, which should happen after the image is first converted to its target format (DAT?), then you can use a library like ZLIB[^].
Lastly, if you meant tape backup (or other offline/removable storage) when you said "DAT", then ZLIB helps there, too.
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
|
|
|
|
|
Thanks James for reply.I mean data compression. I will go through the link about ZLIB. Thanx
prashant
|
|
|
|
|
Hi guys
i want to detect Floppy arrival but 'WM_DEVICECHANGE' does not work for floppy so is there anyway to detect Floppy arrival.
with regards
RYK
|
|
|
|
|
VC_RYK wrote: i want to detect Floppy arrival but 'WM_DEVICECHANGE' does not work for floppy so is there anyway to detect Floppy arrival.
Actually Floppy Drive doesn't work the way CD Drive work. I mean, you could simply put Floppy in the drive, but to make Computer aware you have to click on floppy icon, which is not in case of cd drive. thats just my logical conclusion!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
I think its not good way but he can uses of SetCurrentDirectory check return value if its nonzero it has floppy.
|
|
|
|
|
Hamid. wrote: I think its not good way but he can uses of SetCurrentDirectory check return value if its nonzero it has floppy.
But you have to poll regularly for that.. i don't think thats good design and could present user headache, as if floppy is corrupt, it could hang the system!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
Well I said its not good idea but I dont think it hang the system.
|
|
|
|
|
Hamid. wrote: Well I said its not good idea but I dont think it hang the system.
well you have to test that yourself try putting corrupt floppy into your computer and acess it through My COmputer!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
I dont use of floppy disk.;P
|
|
|
|
|
Hamid. wrote: I dont use of floppy disk.
USe ZIP Drive then
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
Ok
|
|
|
|
|
PC floppy drives have (or used to have) a active low Disc Change line, which went high (1 ) when the drive was empty and was low (0 ) when a disc was inserted.
Not sure if/how you can get direct access to that line on Win32, though...
Maybe there is an LVM routine that can be used?
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
|
|
|
|
|
with the help of WMI, you can find out the arrival and removal of floppy drives and offourse all other drives.
|
|
|
|
|
Naveen.R wrote: with the help of WMI, you can find out the arrival and removal of floppy drives and offourse all other drives.
Hi Naveen,
could you please help me in finding out the exact WMI Class , which could help me in this purpose.. it could work as wonderfull tip for my FAQ site. if you allow i will publish that with you name.
Thanks
Alok
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
I saw two classes Win32_FloppyController/Win32_FloppyDrive .
|
|
|
|
|
ThatsAlok wrote: could you please help me in finding out the exact WMI Class
Any thing for you sir
Actaully I tried this for one of my project requirment. I used the ExecNotificationQueryAsync() function with the following query.
HRESULT hres = pSvc->ExecNotificationQueryAsync(<br />
_bstr_t("WQL"), <br />
_bstr_t("SELECT *" <br />
"FROM __InstanceOperationEvent WITHIN 1 "<br />
"WHERE TargetInstance ISA 'Win32_LogicalDisk'"), <br />
WBEM_FLAG_SEND_STATUS, NULL, pStubSink );
And in the notification handler we can check the instance is __InstanceCreationEvent and __InstanceDeletionEvent for any drive arrival or removal. But if you want disk arrival or removal you may need to handle the __InstanceModificationEvent( this one i didnt check ).
|
|
|
|
|
Hi all,
Say I have a CString and I want to assign the current system date on a MFC application click event. How can I do it.
Thanks
I appreciate your help all the time...
Eranga
|
|
|
|
|
Eranga Thennakoon wrote: Say I have a CString and I want to assign the current system date on a MFC application click event. How can I do it.
CTime::GetCurrentTime and CTime::Format!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|