|
Can anybody help me to edit,update and delete Microsoft Acess database through ODBC.
I connected the database and i can acess the contents of database by using SQL queries.
|
|
|
|
|
Deepu Antony wrote: Can anybody help me to edit,update and delete Microsoft Acess database through ODBC.
See here.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Hello,
How can I stop the window to get merged with the main window when the maximize button is pressed?
The maximized button doesn't have the restore minimize button with window.
How can I get these buttons with the maximized window?
Regards,
Pritha
|
|
|
|
|
Hai..
one doubt..Urs is multiple document window (MDI) In mfc..or...?
Born to win...!
|
|
|
|
|
Hello,
Thanks for your reply.
Yes mine is MDI.
Prithaa
|
|
|
|
|
I guess you refer to the view that is attached with the document when you say window, and to the application frame when you say main window.
I access the different views of my document with the following
CMDIChildWnd* pMDIActive = MDIGetActive();
CDocument* pDoc = pMDIActive->GetActiveDocument();
CMyView* pMyView;
POSITION pos = pDoc->GetFirstViewPosition();
while (pos)
{ pMyView = (CMyView*) pDoc->GetNextView(pos);
if (pMyView ->IsKindOf(RUNTIME_CLASS(CMyView)))
{ CFrameWnd* pTempFrame = pMyView->GetParentFrame ();
pTempFrame->DestroyWindow ();
return;
}
}
return;
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
|
|
|
|
|
Thanks for the reply
What I want is to write code so that when my child window is maximized the child window should have a minimizebox,a maximize box(restore box) and the destroy box ?
When I maximize my child window the window does not have the retore box so that I can now restore the window back to original position?
The child window sort of merges with the main window (frame window) leaving no scope for accessing other child windows.
Regards
Thanks.
Prithaa
|
|
|
|
|
Then take a look to BOOL CChildFrame::PreCreateWindow(CREATESTRUCT& cs)
There is where you can change the aspect of the frames, setting styles, changing caption and so on...
when you maximize a child window and it has the right styles, the minimize and restore button, are upside, below the main frame max/min buttons
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
|
|
|
|
|
Hi,
I need to create a Local Machine User and set it my own privileges.
Any Suggetions or relevant Links would be helpful.
Thanks.
Today is a gift, that's why it is called the present.
|
|
|
|
|
If you refer to Registry... I tip not to use CRegKey, and use the "search comments" in forum, I asked about accesing the registry few days ago and the people solved my problem. To start you have a reference.
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
|
|
|
|
|
Can anybody help me in converting a 16 bit RGB (555)to 8 bit grayscale bmp.
I got 5 bits of red ,green and blue pixels.
Thanks in advance
|
|
|
|
|
Have a look at the following Christian Graus article, here at CP [^]. Porting the grayscale filter algo C# to C++ is straightforward.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
Thanks for helping me it is useful to me
|
|
|
|
|
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
In the 8 bit bmp a color table is used (of size 256 colors). So after you convert the color to gray (using the formula, Y = 0.3R + 0.59G + 0.11B) you have to keep it in a 256 element COLORREF array as a new color if it not added to the array yet. And the index of this array should be saved as the bitmap data. If the color idex is getting overflown ( > 255 ), then the index of a nearest existing color should be identified and the index should be used. For better result, when finding the nearest color, the occurance of that color should be considered. Means if 80% gray is coming 1 time and 81% is coming 20 times, then replacing the 80% to 81% is better. And dont forget to save the created color table also.
- NS -
|
|
|
|
|
Can u make it more clear please..
|
|
|
|
|
What could you do for this so far?
- NS -
|
|
|
|
|
i seperated red green and blue bits.Thus i have 5 bits of each.then i make it to 8 bit each by shifting them to the left by 3 bits.Then i used the
conversion formula .299*R+.587*G+.114*B .But lost of information is observed.
Is ther is any method to diectly converting it 8 bit grayscale
|
|
|
|
|
How do you expect to preserve data when converting RGB to
grayscale? It's not going to happen.
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Actually i converted 555 RGB to 888 RGB.Then i converted it to grayScale.Is there is any direct method to convert it to grayscale
|
|
|
|
|
Deepu Antony wrote: Is there is any direct method to convert it to grayscale
Not that I know of.
My point was, you're going to lose your RGB data (unless, of course,
you keep it separately).
You stated: "But lost of information is observed"
You can't get the RGB data back once you've converted it.
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
i convert 5 bit Green ,5 bit red ,5 bit blue to each 8 bit (24 bit RGB) by shifting it to left by three bits.while doing this loss of information is observed.I know only to convert 24 bit rgb to gray scale.
is there is any direct method to convert 16 bit RBG to 8 bit gray sale.
Can you help me please
|
|
|
|
|
Deepu Antony wrote: to each 8 bit (24 bit RGB) by shifting it to left by three bits.while doing this loss of information is observed.
There's no loss of information there. You only had 5 bits precision for each color
component to begin with. Widening to 8-bits you still have the same precision.
The image will appear the same on a 16,24,or 32-bitsperpixel display.
Deepu Antony wrote: s there is any direct method to convert 16 bit RBG to 8 bit gray sale.
The only way I know is the usual luminence formula
intensity = 0.2989*red + 0.5870*green + 0.1140*blue It yields an eye-pleasing grayscale representation of an RGB image but
no RGB data is preserved.
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Hi all,
I have a char buffer and a char*
Lets call it:
char buffer[1024];
char* point;
If I perform a strcpy() , and copy the value of the point into the buffer . If the value of the point changes there after, will the value of the buffer change too??
Many Thanks in advance
Regards,
The only programmers that are better that C programmers are those who code in 1's and 0's
Programm3r
My Blog: ^_^
|
|
|
|
|
No, because the pointers points to two different locations. Except if you do something like that:
char* point = &buffer[0];
But then of course, you don't need to use strcpy anymore. strcpy just copy bytes from one memory location to another, it is similar as memcpy (except that it works for null-terminated strings).
|
|
|
|