|
If its an windows application you could get the window handle with
FindWindow and than send the wm_quit message with SendMessage
|
|
|
|
|
<<< In the name of GOD >>>
Hi all,
First, i must say i didn't work with WinNT ...
I wanna know what is different between below ways to connecting to the database in server:
1- Using of file path:
\\\\Servername\\directory\\file.mdb
2- Using of connection string:
DBQ = ... SERVER = ... and ...
Is any different ?
My second question is about DSN ...
I know data source in server can be DSN file or MDB file ... So why i must use DSN ?
My Third question is about CDaoWorkspace ...
Please explain to me what is that ...
Is that for multiple access to database in server ?
In last please explain about WinNT operation system ...
Please explain about all of i need for learning database programming in connection between user and server(client and server) ...
My month article: Game programming by DirectX by Lan Mader.
Please visit in: www.geocities.com/hadi_rezaie/index.html
Hadi Rezaie
|
|
|
|
|
Any code to split and/or combine channels in a bitmap?
Best regards,
Paul.
Paul Selormey, Bsc (Elect Eng), MSc (Mobile Communication) is currently Windows open source developer in Japan, and open for programming contract anywhere!
|
|
|
|
|
If you use a DIBSection wrapper like the ones on this site, or the one in Paintlib then you can step through the bits in order to combine channels or split them into three seperate bitmaps. If you download paintlib, I wrote a colour filter that can be used to isolate a channel, I'd be happy to send it on to you.
LMK if my explanation makes no sense and I'll whip some code up to demonstrate. BTW, if you don't realse, Windows bitmaps are BGR internally.
Oh, if you want some code, LMK if I'm allowed to use GDI + ;0)
Christian
As I learn the innermost secrets of the around me, they reward me in many ways to keep quiet.
Men with pierced ears are better prepared for marriage. They've experienced pain and bought Jewellery.
|
|
|
|
|
Thanks so much.
I will take a look at the DIBSection wrapper. I currently have a library that reads various image formats (many are not common to everyday user) and provides the channels. So the main requirement is to build the bitmaps from the channels and render them. Paintlib will therefore be overkill.
I have seen one channel splitter in Feng Yuan, but it has some limitations he explained and promised to update but never did
Any code will be highly appreciated, of course in the GDI+ domain
Best regards,
Paul.
Paul Selormey, Bsc (Elect Eng), MSc (Mobile Communication) is currently Windows open source developer in Japan, and open for programming contract anywhere!
|
|
|
|
|
I've spent the lions share of my work day buying and playing with a cordless, ball-less mouse, so I should proably do some work right now. I'll whip something up tonight though. What format do the channels come in from your existing library ? Do you want to see them in colour, or black and white ?
Christian
As I learn the innermost secrets of the around me, they reward me in many ways to keep quiet.
Men with pierced ears are better prepared for marriage. They've experienced pain and bought Jewellery.
|
|
|
|
|
Thanks for the support. There is not special format, an array of bytes (void* style) for the R, G and B-better still all the channels in image. Color, yes color, color...
I wish you all the best in this effort-thanks.
Best regards,
Paul.
Paul Selormey, Bsc (Elect Eng), MSc (Mobile Communication) is currently Windows open source developer in Japan, and open for programming contract anywhere!
|
|
|
|
|
you might want to take a look at ImgSource. It's a general purpose 2d image processing library. It prefers dealing with RGB images (as opposed to DIBs). It has many many functions for splitting, combining, overlay, rotation, resizing, sharpening, etc.. A whole lot of stuff..
-c
------------------------------
Smaller Animals Software, Inc.
http://www.smalleranimals.com
|
|
|
|
|
Thanks for the information. I have just looked at the ImgSource. It sounds very interesting. However, it has more features that I really need. All that will suffice for my work is
@ Generate HBITMAPs from RGB buffers
and may be
@ Generate DIBs from RGB or 8-bit images
Any other feature required could be obtained from the GDI+. Unfortunately, with these I cannot justify the cost ($75 + $50 every 6 months if you need the source) of the ImgSource to my boss. ImgSource is worth the cost, but we will use only 5% of it, if not less.
Best regards,
Paul.
Paul Selormey, Bsc (Elect Eng), MSc (Mobile Communication) is currently Windows open source developer in Japan, and open for programming contract anywhere!
|
|
|
|
|
I'm sorry to say we went out for dinner last night. I've put something together quickly, I hope it illustrates the point, if not LMK.
Bitmap bitmap(width, height, PixelFormat32bppARGB);
BitmapData data;
bitmap->LockBits(Rect(0, 0, width, height),
ImageLockModeWrite | ImageLockModeRead, PixelFormat32bppARGB, &data);
unsigned char * bits = (unsigned char*)data.Scan0;
for (unsigned int y = 0; y < data.Height; y++)
{
for (unsigned int x = 0; x < data.Width * 3; x+=3)
{
memset(bits[0], 0, 4);
if (we want the red mask)
bits[1] = source[2];
if(we want the green mask)
bits[2] = source[1];
if (we want the blue mask)
bits[3] = source[0];
if (we want the greyscale alpha mask)
bits[0] = source[3];
bits += 4;
source += 4;
}
bits += data.Stride - data.Width*4;
}
bitmap->UnlockBits(&data);
If this is confusing, broken, or not what you needed please LMK.
Christian
As I learn the innermost secrets of the around me, they reward me in many ways to keep quiet.
Men with pierced ears are better prepared for marriage. They've experienced pain and bought Jewellery.
|
|
|
|
|
|
How to get file status?
being read
being write
being opened
closed
Thanks
|
|
|
|
|
You can use CFile::GetStatus()
/Per
|
|
|
|
|
Thanks very much for your reply.
I think the funtion CFile::GetStatus() can only get the static status of a file, for example, the access mode of a file. But I want to get a dynamic status of a file, for example, the status of being read.
Do you have better methods.
Thanks for helping me.
Maer.
|
|
|
|
|
I'm not sure what you mean by 'being read'. If you mean 'is the file being read from right now' I don't know but if you mean 'when was the file last accessed' I think you can use GetStatus().
/Per
|
|
|
|
|
Thanks for your reply.
I find the "GetStatus" function works well. It really resolves a part of my trouble.
What I mean is "the file being read from right now", I have find a better method to resolve the problem. That is, to set a status bit to show the status.
My project often reads and writes a lot of datas. It often takes a lot of time to do that task. To be more efficient, I want to check out the status of the file to give notifications to other threads waiting for reading/writing in the same file.
Thanks again.
Maer.
|
|
|
|
|
Hi
If you use CreateFile() to open the files it's possible to set some extra options for access e.g.
|
|
|
|
|
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.
|
|
|
|
|
In the ActiveX programming, when a property of a control is using the Set/Get mode, there is a statement in the "Set" function like this "SetModifiedFlag".
My Question is:
What operations the statement will result? Should the property that already changed reloads immediately? Or should the property that already changed reloads later? When will the changed property reload? What is the relation between the statement "SetModifiedFlag" and the reloading of the changed property?
Thanks
|
|
|
|
|
Basically, SetModifiedFlag is like setting a "dirty" flag. When the control is destroyed, the control will attempt to save its properties since some of them have been modified. Try changing some properties of your control in the ActiveX Test Container and then closing the container without saving. You'll get a prompt asking if you wish to save changes because the properties have set the modified flag.
Thus, you only really need to call SetModifiedFlag on persistent properties, as any other properties will not be saved.
Hope this helps.
------------------------
Derek Waters
derek@lj-oz.com
|
|
|
|
|
Mr. Waters:
Thanks again for answering my question.
Your explanation is very clear and I have understood the function of the "SetModifiedFlag".
Thanks.
Maer.
|
|
|
|
|
In the ActiveX programming, when a property of a control is using the Set/Get mode, there is a statement in the "Set" function like this "SetModifiedFlag".
My Question is:
What operations the statement will result? Should the property that already changed reloads immediately? Or should the property that already changed reloads later? When will the changed property reload? What is the relation between the statement "SetModifiedFlag" and the reloading of the changed property?
Thanks
|
|
|
|
|
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.
|
|
|
|
|
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.
|
|
|
|
|
A Simple Question About ActiveX on Internet:
When we embed an ActiveX Control in a Html Web, we often use the term "CLASSID" and "CODEBASE". But what is the relationship between the two terms? Under what circumstance should we use "CLASSID" and do not use "CODEBASE" at the same time? Under what circumstance should we use "CODEBASE" and do not use "CLASSID" at the same time? Under what circumstance should we use both "CODEBASE" and "CLASSID"?
When should we assign a local address to the "CODEBASE"? When should we assign a WWW address to the "CODEBASE"?
Thanks.
|
|
|
|