|
Can anyone give a link to any useful article?
|
|
|
|
|
This sounds like a rewording of another post on modems.
Look up TAPI on the MSN Library or look for a book on the subject.
Trust in the code Luke. Yea right!
|
|
|
|
|
Hi,
Is there anyway to get the keyboard input eg check if CTRL + A is pressed, while the program does not have focus?
thanks alot
|
|
|
|
|
GetKeyState() & GetAsyncKeyState() return with hi-bit set if key was down. If they don't work then a keyboard hook maybe the only way.
Please don't be Anonymous.
Neville Franks, Author of ED for Windows. www.getsoft.com
Make money with our new Affilate program
|
|
|
|
|
What is Anonymous up to!
Your answer is to 'Anonymous' is correct but first he needs to receive a messages (other than paint). If he wants to know the key state when his program [or window] does not have the focus, then he will have to set up a timer processor to call GetKeyState() [and or GetAsyncKeyState()] so that he can monitor the status of the keyboard.
Trust in the code Luke. Yea right!
|
|
|
|
|
Anyone know how the skinning engine was designed?? How does the main app start and basically load a skin as the default UI?
|
|
|
|
|
Does anyone know how to get the handle to a pane in the status bar?
Thanks
|
|
|
|
|
Are you using MFC? If so, use the m_wndStatusBar object. It belongs to the CFrameWnd-derived class.
If you are trying to add something to one of the panes, examples are plentiful here, and from MSDN.
|
|
|
|
|
Yes, I am using MFC. The m_wndStatusBar gives me the CStatusBar, but I need a handle to one of the panes inside that status bar. There are methods like GetPaneInfo, GetPaneStyle, but none returns the pane.
Thanks
|
|
|
|
|
What are you wanting to do with the pane that the CStatusBar methods do not provide? From what I can tell, the msctls_statsbar32 control does not have sub-controls (e.g., panes), thus no separate handle exists.
|
|
|
|
|
The panes in a status bar are not child windows, thus they don't have HWND s.
--Mike--
Yeah, payin' the bills with my mad programming skillz.
Defraggin' my hard drive for thrills.
Homepage | RightClick-Encrypt | 1ClickPicGrabber
"You have Erica on the brain" - Jon Sagara to me
|
|
|
|
|
I forget (but I alway know where to start)! Look for the MFC FAQ on the web (I hope it is still maintained by Scot Wingo at Rogue Wave Software). If you want the book then look for "The MFC Answer Book" by Eugene Kain. The book will give you your answers.
Note: I recommend "The MFC Answer Book" for any-body doing Windows programing. A lot of the questions it answers could be done better using a different approch, but if you do not know where to begin then how can you improve on what you do not know.
I know the above does not directly answer your question, but (I ass-u-me) most of us need to refresh our memory every time we need to do something that seems so trivial.
|
|
|
|
|
I have a formview based MFC project, I need to import a logo design into the background of the page.
Is there a way to do this in MFC?
|
|
|
|
|
Two choices:
1) Draw image yourself.
2) Place CStatic in your background.
Brian
|
|
|
|
|
First stop being Anonymous we are not the bad guys.
Secound you can use LoadImage() to load a some image files.
Third there are several aticles at codeproject on loading files that you can not load with LoadImage().
Fouth there are sample files in the MSDN Library for using bitmaps as the backgroud of dialogs, which is basicaly what you are doing when you are using forms. There may be some aticles at codeproject for doing the same thing, if not do a search of the www because there out-there.
Trust in the code Luke. Yea right!
|
|
|
|
|
Does anyone know how to read a file that has been locked by the os? I want to open a file and retrieve its contents. It is already open by another program though. I can't seem to get it open. I don't need to change any data, just read the file. I know that this is possible, as I have seen other programs and editors that are capable of this. I am assuming I have to use c++ for this, but c# would be OK also.
|
|
|
|
|
What mode did the OS open the file with? What mode are you using? If the OS opened with "share none," you won't even be able to read the file.
|
|
|
|
|
I don't know the mode the os used. How can I find out? The file I want to read is a sql server transaction log file. I know that this is possible as I have seen products that will do this, I just don't know how. I have only tried to open the file with c#'s System.IO binary reader for now. I haven't looked at c++ yet. I figured that I would though.
|
|
|
|
|
If you are using CFile then use: modeRead | shareDenyNone. This will work if the file isn't opened for shareDenyNone access. This is what I do in ED (see sig). You may want to see if you can open the file using ED. It should open in "view" mode.
Neville Franks, Author of ED for Windows. www.getsoft.com
Make money with our new Affilate program
|
|
|
|
|
Thanks everyone. It did open in ED. So I will try to open it with cfile.
|
|
|
|
|
jspano wrote:
It did open in ED. So I will try to open it with cfile
You don't need to use CFile. All of the file open functions support the same options.
Neville Franks, Author of ED for Windows. www.getsoft.com
Make money with our new Affilate program
|
|
|
|
|
Thanks. Can you suggest the one that is most optimal for performance? The best solution would be to open the file and somehow put the bytes into a managed FileStream or ByteReader etc in .Net.
|
|
|
|
|
Sorry but I'm not using .Net. If you are only interested in reading the file then I'd like at using a simple memory mapped file. It will also depend on what you want to do with the file, how big it can be etc. Do you need fast random acces to lines within the file etc.
Neville Franks, Author of ED for Windows. www.getsoft.com
Make money with our new Affilate program
|
|
|
|
|
basically I would need to read from start to finish the whole file into memory. This might not work always though, since the files could be huge. Up to say 100megs or more. What techniques do programs like your or word do for large files? as the user scrolls around go get more data?
Thanks
|
|
|
|
|
ED uses a propriety database style system where it has instant access to any line and lines can grow or shrink, be deleted or inserted as required (ie. be edited).
If you just need to read the file then I'd definitely use a memory mapped file (mmf). You could build a simple STL vector<> with pointers to the start of each line. Have a look at the article here on CP on PugXML where you will see code I've added to read the XML file using mmf.
Neville Franks, Author of ED for Windows. www.getsoft.com
Make money with our new Affilate program
|
|
|
|