|
Hi,
Can someone please point me to a good tutorials about driver development
including examples?
Kind regards
Eran
|
|
|
|
|
Sir/Madam
I saw the program in this website which explains about loading an Image as Backgound in MainFrame.I want to do the same but my application is being developed as Single document and my Base Class is View.Please help me load image in the mainframe for the same(Single document - base class - View)
ThankingYou.
Regards,
Subha
|
|
|
|
|
Well, if that's the case, then the only thing that is visible is the view, so you need to draw in the view's OnPaint. Remember, you're drawing over the area that people type into, or whatever else goes on in your view. I'm hoping it's a CFormView, in which case it will do the job nicely. Otherwise, it will work, but has the potential to be ugly.
Christian
Hey, at least Logo had, at it's inception, a mechanical turtle. VB has always lacked even that... - Shog9 04-09-2002
During last 10 years, with invention of VB and similar programming environments, every ill-educated moron became able to develop software. - Alex E. - 12-Sept-2002
|
|
|
|
|
It is not CFormView.Its CView only.I have all the functions in the form of Dialog box and I dont have anything to be done within the area of mainframe.What is the part of coding that I have to add in OnPaint to get the background image in the mainframe.
regards,
Subhashree
|
|
|
|
|
You know, if you created an account, you'd get an email so you'd know right away when someone answered you.
Why do you have a view if you don't put anything in it ?
You basically need to use LoadImage to load a bitmap from disk, then BitBlt or StretchBlt to draw it onto the view. From memory you found the code to do it in a dialog on CP - the code will be identical.
Christian
Hey, at least Logo had, at it's inception, a mechanical turtle. VB has always lacked even that... - Shog9 04-09-2002
During last 10 years, with invention of VB and similar programming environments, every ill-educated moron became able to develop software. - Alex E. - 12-Sept-2002
|
|
|
|
|
Hi,
I am trying to do a netsend clone by using the NetMessageBufferSend
function.
I'd like to know which function I could use to be able to resolve a computer hostname knowing the username of the person logged on it.
Is there a win32 or NetApi function which allows that?
Thanks,
John
|
|
|
|
|
NetUserGetInfo
- pass NULL as ServerName (first param).
- request level 2 (third param).
--> resulting logged on workstations is in USER_INFO_2.usri2_workstations
Looks like you are developing a balloon messenger...
How low can you go ? (MS retrofuck)
|
|
|
|
|
I'm building a program, and I have this problem:
- I got CDocument/CView architecture
- In CMyAppDoc is CMyClass object
- In CMyClass object is a function SolveProblem()
- In SolveProblem is a loop that is working on a certain problem
How can I from _inside that loop_ update the screen? That way I could see the progress.
Two threads? How? I put SolveProblem work in another, and then...?
Just kick me in the right direction, no need to kick me all the way
|
|
|
|
|
Invalidate(FALSE); tells the screen to update itself, making the parameter TRUE also tells it to erase itself. If you're showing progress in a progress bar, it has a method to set it's level, and any control that contains text can be updated with SetWindowText, which will invalidate the control. You probably want the latter methods, I would think.
Oh, UpdateData(FALSE) ( from memory ) does it for you if you have controls and have made variables that are CStrings.
Christian
Hey, at least Logo had, at it's inception, a mechanical turtle. VB has always lacked even that... - Shog9 04-09-2002
During last 10 years, with invention of VB and similar programming environments, every ill-educated moron became able to develop software. - Alex E. - 12-Sept-2002
|
|
|
|
|
How can I get a pointer to CWnd object to be able to use Invalidate?
Invalidate is a member of CWnd, while my loop runs in CMyClass (which is a member variable of CMyAppDoc).
From MS VC++6 help:
CWnd::Invalidate
void Invalidate( BOOL bErase = TRUE );
- - - - -
I could rephrase the question:
How to cause screen update from a loop inside my own class?
|
|
|
|
|
Check AfxGetMainWnd which you can access your CMainFrame object. You can access main frame at any place in your code and updating main frame shall update all windows (I'm not sure with the last one but it should work). Or from that point you can access the window that you want to update.
ozgur.
|
|
|
|
|
Sorry - I did not get that you were outside your window. As has been said, AfxGetMainWnd, and if you cast the return value to CMainframe, you can get access to views, etc. Better yet would be to pass the pointer in from the window when you call the method.
Christian
Hey, at least Logo had, at it's inception, a mechanical turtle. VB has always lacked even that... - Shog9 04-09-2002
During last 10 years, with invention of VB and similar programming environments, every ill-educated moron became able to develop software. - Alex E. - 12-Sept-2002
|
|
|
|
|
Yes, that would be the best solution. I already catch the Menu command in CView class object,
I'll just pass the CView pointer to my own class (I get the pointer to my own class object from pDoc),
and then I can use the Invalidate() inside my own class.
I seem to always try to cut down the number of passed parameters and look for other
ways of getting the needed information (usually pointers).
|
|
|
|
|
The way I see it there are only 2 practical ways of implementing something like this.
1) A string of bytes having each new line seperated by a CRLF.
2) An array of strings (variable or fixed)
How do you reckon Notepad and VS IDE editor are programmed...? Which design...? I'm looking for speed and efficiency rather than ease of implementation...which would you suggest and why...?
Thanx!
"An expert is someone who has made all the mistakes in his or her field" - Niels Bohr
|
|
|
|
|
I would prefer a single storage, it's better for heap and I would consider use a secondary heap (CreateHeap API function) too. If I needed line oriented access, I would build an index - a vector with offsets or pointers to the line beginings.
Pavel
Sonork 100.15206
|
|
|
|
|
There are many factors to weigh up such as, how big are the files you want to handle, how long are the lines, do you need fast random access to a line, will the file undergo mass frequent changes, is being constrained by memory an issue (editing a 250M file in memory may not be feasible), how many files do you want to be able to edit at once, etc.etc.
If you are only working with small files, say < 10K lines then an in memory, linked list may be appropriate. For larger files a disk based implementation is likely the best approach. An array of strings is unlikely to be workable if lines are inserted and deleted frequently, or change length as there would be too much time spent shuffling the heap around.
In ED (see sig) I essentially use a database which provides fast random (indexed) and sequential access to any line, the ability to work with files of any size and any number of files, with disk space the only real constraint.
There are various text book algorithms around for this. I don't have any references on hand but try doing a Google search.
Neville Franks, Author of ED for Windows. www.getsoft.com
|
|
|
|
|
in my editor im using an array of 'row objects' and that works really good.
my editor also supports folding a'la vs.net and its written in c# and there is no performance issue what so ever, so i suppose if it works in c# it would work even better in c++
but as previous posters said , it depends on the size of the file..
ive only tested mine with some 70 000 lines and it starts to get quite slow at that size , but that is because of the folding calculations and not the time spent removing / inserting rows into the document..
//Roger
---------
http://www.sourcecode4free.com/screen.gif
http://www.sourcecode4free.com/screen2.gif
http://www.sourcecode4free.com/screen3.gif
|
|
|
|
|
im trying to to do a language module to get synonyms of an input string.
And have decided upon using the dictionary provided by word.as creating an efficient dictionary itself seems like reinventingthe wheel.
i came upon the msth_am.lex and msth32.ll files
along with couple others too
which i believe is used by the word application for its thesaurus /spell check and other lex functions.[this too is only an assumption]
there seem to be functions exposed like
ThesaurusCheck
and
ThesaurusGetString
could anyone provide me inputs on -
1.how to use these functions?
2.is there any more efficient/simpler method to acces the word thesraus function
though i dont sem to be getting much inputs from else where including microsoft
open to any suggestions
fordge
|
|
|
|
|
I created a control derived from CTreeCtrl, I wanna get back the TREEITEM's lParam from the OnNMDblclk(NMHDR *pNMHDR, LRESULT *pResult) handler, how to do it ?
I tried something like below but it seems invalid.
TVITEM& item = ((LPNMTREEVIEW)pNMHDR)->itemOld;
TVITEMDATA* pData = (TVITEMDATA*) item.lParam;
|
|
|
|
|
It's a mystery to use that NMHDR for me either. What I do is to use:
HTREEITEM CTreeCtrl::GetSelectedItem ()
then you can access item data again using CTreeCtrl functions. Since on DblClick item is already selected, this would work fine ( OnLClcik as well ) But in case of OnRClick you would get problem.
ozgur.
|
|
|
|
|
i am developing a MFC client application that package some data and post back to web server using HTTP.
the targeted url is a aspx page that will process the html form and return me some content..XML.
CInternetSession session;
CHttpConnection* pConnection = 0;
CHttpFile* phttpFile = 0;
i managed to post a data to a server using;
phttpFile->OpenRequest(...)
phttpFile->SendRequest(...)
the web server successfully receives the POST and will return html or xml. how do i get the response from the web server, after the SendRequest()...?
thanks
meng
|
|
|
|
|
Something like this :-
<br />
CInternetSession conn;<br />
CHttpConnection *phttpconn;<br />
<br />
phttpconn= conn.GetHttpConnection(m_server,<br />
(INTERNET_PORT )80); <br />
<br />
CHttpFile* phttpfile = phttpconn->OpenRequest("GET",<br />
cmd); <br />
<br />
BOOL b1=phttpfile->SendRequest();<br />
<br />
<br />
CFile f2(s,CFile::OpenFlags::modeCreate | CFile::OpenFlags::modeWrite); <br />
while(true)<br />
{<br />
n=phttpfile->Read(buff2,127);<br />
buff2[n]=0;<br />
f2.Write(buff2,n); <br />
if(n<127)<br />
break;<br />
}<br />
f2.Close();<br />
<br />
Regards,
Nish
Author of the romantic comedy
Summer Love and Some more Cricket [New Win]
Review by Shog9
Click here for review[NW]
|
|
|
|
|
Nishie, you are showing them how to write html filters... And later you'll complain...
How low can you go ? (MS retrofuck)
|
|
|
|
|
|
Hello,
I have a question regarding Replaying of events captured from a CHTMLView . I want to know if there is any way by which i can replay an event (like a mouseclick on a button or on a href link in a webpage) captured from a webcontrol in a application. If so i would appreciate your help.
I have been able to capture the event but now i dont know how to replay it back. Its an MFC based application with view class derived from CHTMLView.
Prasad
Thanks again.
|
|
|
|