|
hi all,
I am using Text boxes to MFC Dialog base Applcation.But I can not change the Color Scroll bars which appear with TextBoxes,ListBoxes like that..
How do I do that?
if any one this pl reply me..
Thanks in advance..
|
|
|
|
|
How to call javascript in mfc project without CHtmlView?
I have a source code implement IDispatch by CHtmlView,
but in my project I don't need it.
Thanks!
|
|
|
|
|
Sounds like you need to look at Active Script Host.
onwards and upwards...
|
|
|
|
|
Hi
I am working with Win32 serial communication programming in vc++. I was asked to use sliding window method here, but I am totally new and have no idea about this sliding window consept.
Can anyone please help me by giveing me some information on sliding window and its implementation algorithm and how it can be used in serial communication.
I would be of great help to me if any one can give me some inputs.
Thanks
Madhavi
|
|
|
|
|
Try Here[^]
or
Try using google and insert "sliding window method"
Ant.
I'm hard, yet soft. I'm coloured, yet clear. I'm fruity and sweet. I'm jelly, what am I? Muse on it further, I shall return! - David Walliams (Little Britain)
|
|
|
|
|
I have a few Property pages (not Wizard). On one of these I am displaying a picture (Picture Control). The file name is in a global variable. When I initialize it, the picture is displayed correctly. If a file is loaded, I want to show the picture when the user switches between the tabs. Currently when I come back to the tab with picture it is not displaying again. I have written the following code in OnSetActive event -
<br />
if (g_strFileName != "") {<br />
CDC *dc;<br />
dc = GetDC();<br />
CPicture ppic;<br />
ppic.Load(g_strFileName);<br />
CRect rc; GetDlgItem(IDC_RECT_BITMAP)->GetWindowRect(rc);<br />
ScreenToClient(&rc);<br />
ppic.Render(dc, rc);<br />
ReleaseDC(dc);<br />
}<br />
I am also calling Invalidate(TRUE) in InitDialog. Any help would be appreciated.
I have also tried OnPaint/ InitDialog etc. No luck. Thanks.
|
|
|
|
|
1. Are you returning CPropertyPage::OnSetActive(); in from your OnSetActive() function?
I am also calling Invalidate(TRUE) in InitDialog. Any help would be appreciated.
I have also tried OnPaint/ InitDialog etc. No luck. Thanks.
--> InitDialog() function is only called once and not everytime you navigate through the tab pages. so it won;t help.
Thanks
Abhi Lahare
|
|
|
|
|
Yes, I am returning return CPropertyPage::OnSetActive();
|
|
|
|
|
Thanks Abhi for replying to my question . I somehow found a solution. I made the picture control Transparent and Simple and moved the painting code to OnPaint. Now it seems to be working perfectly fine. Still not sure what the problem was .
|
|
|
|
|
I have a semi-transparent window. I need all mouse clicks to fall through to proper windows underneath mine. I need to implement a "click-through window"
How do I do this?
|
|
|
|
|
|
HTTRANSPARENT is usefull when you create a control and you want clickthrough to the parent... However in my case I want clicks to fall through a top level window to the underlying windows.
|
|
|
|
|
|
Hi all:
I'm required to manipulate files order through a listctrl, in that case the file ordering appears after the execution of DOS command "dir" must be the order I've specified in that listctrl. But note it has nothing to do with the command "dir" itself, the ordering after the execution of "dir" has some meanings to me!
I already come up with a solution which is the first file copy to the certain folder is appearing at the top of the list after execute "dir".
But with little testing I found that this solution is unreliable within certain environments. Such as if the destination folder is not clean (has some existing files and folders).
How can I accomplish this with other solutions?
Can anybody provides other alternatives, really stable ones!
Thanks for viewing!
|
|
|
|
|
As far as i know the DOS command dir lists files alphabetically.
|
|
|
|
|
Anonymous wrote:
As far as i know the DOS command dir lists files alphabetically.
Only on NTFS volumes. With FATxx volumes, they are enumerated in the order in which they were added to the FAT. The default sort order provided by the Dir command supercedes this, however.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
Hi and Happy New Year!
I want my app running in the background. If I press "SHIFT" + "left mouse button" my application should get the content of the website (not the HTML code oder pic, text only).
I work with keybd_event() to send keys .
keybd_event(VK_CONTROL, 0, 0, 0); // press control
keybd_event('A', 0, 0, 0); // press 'a' to mark all
keybd_event('C', 0, 0, 0); // press 'c' to copy
m_ctrl_OriginalText.SetFocus();
keybd_event('V', 0, 0, 0); // press 'v' to paste
But I have a problem: I don't know how to send the keybd_event() of my app to a website I see. If I click the website my app'll loose the focus and doesn't work.
How can I solve this problem?
Thank you for your interest!
|
|
|
|
|
I dont see why you are trying to use a weird workaround...
You can user COM to properly access every aspect of the web browser (assuming u are talking about internet explorer)
|
|
|
|
|
rising_sun_2005 wrote:
I want my app running in the background. If I press "SHIFT" + "left mouse button" my application should get the content of the website (not the HTML code oder pic, text only).
You will have to write extensions for all the browsers where you want to accomplish this. If its for Internet Explorer its called writing BHO's (Browser Helper Objects). Search msdn for 'BHO'/'Browser Helper Objects'.
suhredayan There is no spoon.
|
|
|
|
|
Thank you all!
I'll try making it with this COM 'BHO'/'Browser Helper Objects'.
Have a nice day!
Thank you for your interest!
|
|
|
|
|
Hi,
Can anybody suggest a way to completely overwrite the contents of a text file with some new text?
Thanks very much,
dlarkin77
|
|
|
|
|
1) Open the file
2) Write some new text to it
3) Close the file
You left me high and dry and changed me
You lied to me and now i’m angry...
|
|
|
|
|
Thanks very much Shog9. Much appreciated.
dlarkin77
|
|
|
|
|
To be more specific, open the file with an option to truncate the file. I don't know what API:s you are using.
With standard C++ class std::ofstream , you can use the "normal" constructor: explicit ofstream ( const char * filename, openmode mode = out | trunc );
The last parameter is the open mode, which defaults to output and truncate.
In Win32, look at the function CreateFile . It has a parameter called dwCreationDisposition which you're interested in. You will want to use CREATE_ALWAYS or TRUNCATE_EXISTING .
For MFC, I really don't know. Haven't touched the crud in 3 years.
--
Komm tu mir langsam weh, leg mir die Ketten an
und zieh die Knoten fest, damit ich lachen kann
I blog too now[^]
|
|
|
|
|
Hi. I have encountered this problem as well, while working for some projects(writing a dos edit-like app, while handling the swap). As far as I could dig, I learned that one approach is to use a temp file, where you write the stuff you need in the file (which means you read the parts you need from the old file and put it in the temp file along with the new content), delete the original file, and name the temp file as you want. Even if some languages might hide that from you, that's what's happening underneath ...
|
|
|
|