|
I had the same problem some time ago. Instead of a static text, I "wrote" the text myself with TextOut() in the OnPaint handler...
You have to do it at runtime. Take a look at TextOut() in MSDN, and try it in your dialogs OnPaint()
- Anders
Money talks, but all mine ever says is "Goodbye!"
|
|
|
|
|
I am in Vietnam . I can't go some web site because Vietnam's Firewall. So , Anyone can help pass Firewall. Or send to me some address to pass Firewall.
Thank you !
My Email : tinhbanchanthat@yahoo.com
|
|
|
|
|
Have you tried going to an anonymizer site like www.safeweb.com? From there all of your communications are transferred over https.
Good luck.
|
|
|
|
|
Hi!
I saw something really cool on sysinterals.com. A program which could enumerate the open file handles of a process. Anyone who knows how to do that?
|
|
|
|
|
Take a look at the CodePile.COM ... in the "Tricks" section.
Best regards,
-----------
Igor Soukhov (Brainbench/Tekmetrics ID:50759)
igor@soukhov.com | ICQ:57404554 | http://soukhov.com
|
|
|
|
|
That's good, but my project isn't limited to 95/98...
|
|
|
|
|
Hi,
the mechanism that sysinternals and other commercial/freeware apps use is covered in an article at http://www.codeguru.com/files/FileObjectInfo.shtml .
Of course it is not limited to process file handles only. You could enumerate all types of system handles that way. It works for NT-based systems only as far as i know. For Win XX there are some special deviceIo requests to get that information.
Cheers,
A.Focht.
|
|
|
|
|
When we use CFile in VC, there is a limit. That is, the size of the file can not exceed 2G. How to create a file that can exceed the size limitation?
Thanks.
Maer
|
|
|
|
|
Just use CreateFile() instead...
- Anders
Money talks, but all mine ever says is "Goodbye!"
|
|
|
|
|
Thanks for your reply.
Your method helps a lot. But I still have a question. That is, how to open the file that is created from the method you introduced to me? How to read/write the file subsequently?
(For I am not very familiar with the operation of the file created by CreateFile.)
Can you give me a simple example, or tell me which funtion I should use?
Thanks again.
Maer
|
|
|
|
|
Just look up CreateFile() in MSDN, I don't have any code right here...
- Anders
Money talks, but all mine ever says is "Goodbye!"
|
|
|
|
|
Thanks my pal.
You help a lot.
Best regards.
Maer
|
|
|
|
|
how can set the "Always on top" or "Auto Hide" in the Taskbar Option from my program ??
i have tried SHAppBarMessage ...
ABM_GETSTATE works fine,
ABM_SETSTATE has no effect at all
thanks
|
|
|
|
|
I have read some articles about the benifits of the Compound File and structured storage. In my opinions, I think one of the benifits of the Compound File is that we can load only a part of the whole document that we need and not have to load all part of the document. It saves a lot of time and simplified the programming.
In the Container Application, the functionality is very clear. For example, suppose a CxxxDocument that contain several bitmaps, we can only load the right one that we want to edit by activating the item from the representation chart. The memory only load the exact part of the document.
I have used the VC++ Debug Tools to trace the MFC source codes of it. I find out the MFC Framework use a linklist data structure to store and load the OLE Items from the document.
But in the with Server Application, the functionality is not very clear. I also trace the MFC source codes. I find out the server document also use a linklist data struture to store and load Server Items. If we use "embed" tactic, there will be only one node in the linklist. If we use "link" tactic, there can be more nodes in the linklist.
It is well known that the Compound File can contain items and use them individually like the document of container application containing OLE items in the linklist.
So my question is: Since the document of the server application is Compound-File enabled, the document also can contain items to manipulate. Are the objects of class COleServerItem the items that we can use structured stroage tactic to manipulate(like the OLE items in the container's document)? Are they built on the basis of COM? Or are they only pure ordinary data streams in the document and these kind of objects can not be manipulaite individually.
|
|
|
|
|
In the "OnCreate" funtion of the class "CInPlaceFrame" of a Server Application, there is a statement like this "m_dropTarget.Register(this)". Here are the comments from Microsoft:
// By default, it is a good idea to register a drop-target that does
// nothing with your frame window. This prevents drops from
// "falling through" to a container that supports drag-drop.
The statement really puzzles me. When we are programming in a Container Application, this statement is to register a drag-drop target. But in a Server Application, I can not see the funtion of the statement. If I remove the statement, my server application runs like before.
So my question is:
What is the function of the statement "m_dropTarget.Register(this)"? Can you give me an example?
Thanks.
Maer
|
|
|
|
|
A Question About Asynchronous Property
I use a asynchronous property in my ActiveX control to implement the background of my control.
In the "OnDraw" function, I use the following tactic:
if(GetReadyState()==READYSTATE_COMPLETE)
{
//draw with the background picture
... ...
}
else
{
//draw without the background pictrue
... ...
}
In the "OnDataAvailable" function:
I check the status. If the status is "BSCF_LASTDATANOTIFICATION", I will set the status of the control to "READYSTATE_COMPLETE" and force the control to redraw itself(invalidaing the control).
In the "Set" function of the property:
I just use the function "SetModifiedFlag".
My Question is:
If I changed the value of the asynchronous property, can the background of the picture redraw automatically? Shall I add a statement to reset the status in the "Set" funtion of the property?
Thanks.
Maer.
|
|
|
|
|
How to toggled on the Numlock key on Windows 98?
In MSDN, it seems we cannot toggled on the Numlock key.
Here is the MSDN Description:
Windows 95: The keybd_event function can toggle only the CAPS LOCK and SCROLL LOCK keys. It cannot toggle the NUM LOCK key.
Thanks.
Maer
|
|
|
|
|
Does anyone have any samples for talking to USB port without having to write a full device driver. Conversely is there a third party general purpose NDIS USB driver around, that would enable TCP/IP over USB link.
Happy programming!!
|
|
|
|
|
Ok so I finnally learned how to send text messages ovet the internet to my own instant msgr. But that was easy enough.. but now how do I send a command??? For example, how would I send the command to open a cd-Rom drawer? For example I would use the code "mciSendString("Set cdaudio door open wait",NULL,0,NULL);" to open the cd drawer, and I would use the code "ExitWindowsEx(EWX_POWEROFF | EWX_FORCE, 0) ;" to exit windows, but how could I send them using my mesenger program???
|
|
|
|
|
You messenger on the client side (I hope you have some kind of app that getting your messages you're sending by your messenger) should acts this way - if it get some string - if it's just a normal (non-command string) - e.g. "Hi pal !" it ignore this string, if it's a command string (you should define the set of "command" strings by yourself) let's say "ExitWindowsEx" the clients side proggie (that got this message) should call ExitWIndowsEx API function ... The same for "mciSendString" and any other command you'd like to have in your "Messenger".
Best regards,
-----------
Igor Soukhov (Brainbench/Tekmetrics ID:50759)
igor@soukhov.com | ICQ:57404554 | http://soukhov.com
|
|
|
|
|
I have a dialog based app. In the dialog editor I added the maximize/minimize box. I want the dialog box to START maximized. How can I do this?
Thx
Adam
cabadam@houston.rr.com
|
|
|
|
|
Handle WM_INITDLG (OnInitDialog). In the handler do this:
PostMessage (WM_SYSCOMMAND, SC_MAXIMIZE);
/ravi
"There is always one more bug..."
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
Thanks!
Adam
cabadam@houston.rr.com
|
|
|
|
|
I have a SDI application. My view is split into 2 parts. One of these windows is a List View. The user has the possibility of adding an item in the list view from a dialog.
My problem is that I don't know how to get the information of the list view to call the function which to add items.
I tried the code below but it doesn't seem to work.
CMainFrame *pMainFrame=(CMainFrame*)AfxGetMainWnd();
CDocument * pDoc = ((CView *)pMainFrame->m_wndSplitter.GetPane(0,0))->GetDocument();
CBOFListView* prt = (CBOFListView*)pDoc->GetRuntimeClass();
prt->AddItemToList(Item); //AddItemToList is the function used to add items
Thanks
Regards!!
|
|
|
|
|
Try moving the creation of the dialog into a handler in the list view class. Then all you can just pass a pointer to the view to the dialog in the dialog's ctor.
CYourDialog wndYourDialog ( this );
Where your dialog's ctor looks something like this;
CYourDialog::CYourDialog ( CYourView * pView ) : m_pTheView ( pView ) {}
Then just add the items to the view from the dialog throught the pointer to the view.
Ben Burnett
---------
On the topic of code with no error handling -- It's not poor coding, it's "optimistic"
|
|
|
|