|
Typically the CFrameWnd -derived class owns the splitter window. It then gets created in the OnCreateClient() method.
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
Hi,
In the following code I have got window handler of desktop window. Using that handle I am changing position of the icons on the desktop window. But I am failed to read text of any item using ListView_GetItemText macro. Where is my problem?
LPTSTR buf;
HWND hWndProgman = ::FindWindow("Progman", NULL);
HWND hListView;
hListView = ::GetWindow(hWndProgman, GW_CHILD);
hListView = ::GetWindow(hListView, GW_CHILD);
POINT ptPos;
RECT rBounds;
int iOffset = 16384;
int nCount = ListView_GetItemCount(hListView);
ListView_GetOrigin(hListView, &ptPos);
ListView_GetViewRect(hListView, &rBounds);
for( int i = 0; i < nCount; i++ )
{
ListView_GetItemText(hListView, i, 0, buf, 100);
ListView_GetItemRect(hListView, i, &rBounds, LVIR_BOUNDS);
if( ListView_GetItemPosition(hListView, i, &ptPos) )
{
ListView_SetItemPosition(hListView, i, ptPos.x-iOffset, ptPos.y-iOffset);
}
}
Thanks in advance.
Shoma
|
|
|
|
|
It's possible that it's not working because the listview belongs to a different application. For example, GetWindowText() will fail to retrieve text from a window owned by a different application.
Steve S
|
|
|
|
|
In visual studio 7.1,
I have ols path not wprking, so I need a new one.
Is there a way to enter it?
Is it possible to set up new SS provider ?
Thanks.
|
|
|
|
|
You will probably find more people qualified and willing to answer your question in the forum devoted to VB.Net. Here you're more likely to encounter snide comments than helpful suggestions. The folks who hang out in the VB.Net forum are familiar with the language you're using and may well have run into the same problem you're experiencing.
Will Build Nuclear Missile For Food - No Target Too Small
|
|
|
|
|
:-DGood job! This is exactly where he should have looked for a mentor. But even though many of us would enjoy teaching someone new, we do not have the time. Your suggetions where very good!
I do not know about you but I like this person already, since they are not looking for someone to do their work for them but are looking for knowledge so they can do it there self.
Hey, maybe someone emailed him directly and he has his mentor now.
INTP
|
|
|
|
|
I am really gald that someone actually took interest in me. Actually I am try to do up a scheduler program which run on system tray. I will try and look up for the books first. If I got problem can i ask the kind soul in this forum.
C++ Programming
|
|
|
|
|
Hi All,
I have a problem in my embedded VC++ which is as follows:
There is a Read Thread created during WM_CREATE event, which is supposed to read data from the COM1 port as and when it receives data.I have created the thread in such a way that it is active right from the point of creation - hReadThread = CreateThread (NULL, 0, PortRead, 0, 0, &dwThreadId);
The problem is I dont know why the data is not read from COM1 though the read thread is active right from start.
It would be very helpful if you could kindly help em out.
Thanx
Deepa.
|
|
|
|
|
Hi,
Are you sure that COM1 was not opened before your thread has started?
Sincerely Yours,
RadioShark
|
|
|
|
|
Hi,
Actually I am reading from COM7 using a bluetooth gateway.I have opened COM7 before creating the read thread.
Regards,
Deepa.
|
|
|
|
|
Hi,
Investigate return code after attemp of opening the port. I think that you have to open COM7 in the same thread.
Sincerely Yours,
RadioShark
|
|
|
|
|
Why dont you just debug the read thread and see what happens?
/Magnus
- I don't necessarily agree with everything I say
|
|
|
|
|
Hi
I want to serialize a structure.How can i do it?
All the member variales of the structure are of type CString.
|
|
|
|
|
Hi,
It is better to convert the structure into a class. Then, use as the follows:
// example for CObject::Serialize
void CHuman::Serialize( CArchive& ar )
{
CObject::Serialize( ar );
if( ar.IsStoring() )
ar << m_sFirstName;
else
ar >> m_sFirstName;
}
Sincerely Yours,
RadioShark
|
|
|
|
|
If you want to use the MFC serialization mechanism, you must use class instead of structure, derive it from CObject and use the DECLARE_SERIAL and IMPLEMENT_SERIAL macros. The MFC serialization is powered by a bunch of runtime-type-information macros and routines, so it's almost impossible to implement it without CObject
Robert-Antonio
"Life is very hard, when you apply E-R model to it."
|
|
|
|
|
|
I want to create a valid domain name.
What is the rule for creating the domain name?
|
|
|
|
|
Hi,
Are you sure that your question is about Visual C++?
Sincerely Yours,
RadioShark
|
|
|
|
|
You might find these guidelines [^] helpful if you're referring to Internet domains. The term 'domain' is rather loosely defined, primarily because Microsoft uses the word for nearly everything, and it's difficult to tell just what you're asking about. If you follow these rules for domain naming, though, I doubt that you'll go wrong regardless of the application.
Will Build Nuclear Missile For Food - No Target Too Small
|
|
|
|
|
I use CDC:SetColorAdjustment to adjust the Image's brightness and colorfulness,but I can not work good, the function return is TRUE, but I can not see the changed,why?thanks for your help...wait....
I am Nizvoo Kensen.
like c/c++
|
|
|
|
|
Stupid thread.
MSN Messenger.
prakashnadar@msn.com
|
|
|
|
|
I'm pretty new to all this. I understand that I was supposed to have a few files. I downloaded the free borland C++ compiler. I have the text editor all setup. However I seem to be missing the .CFG files for the compiler to run on. It's installed at "C:\Borland\BCC55" I would be grateful for any assistance
Yay yayz and lalaz for all programmers n.n
|
|
|
|
|
Last time I setup Borland's compiler was for a friend. As I recall, the config files just contained the include and lib paths. There's a readme file in there somewhere explaining it.
|
|
|
|
|
Hi everybody.
Here is somebody desperate to know how to get the value of a pixel in an image and set the value to another pixel in another image.
Then I need to know how to access the RGB values of the images and manipulate them.
I need to know this quick. I'm desperate!
-Aartee
|
|
|
|
|
Hi,
Look at this (maybe it will be useful for you)
void CImageListFromBitmap::ReplaceBackgroundColor (CBitmap& ioBM)
{
// figure out how many pixels there are in the bitmap
BITMAP bmInfo;
VERIFY (ioBM.GetBitmap (&bmInfo));
// add support for additional bit depths here if you choose
VERIFY (bmInfo.bmBitsPixel == 24);
VERIFY (bmInfo.bmWidthBytes == (bmInfo.bmWidth * 3));
const UINT numPixels (bmInfo.bmHeight * bmInfo.bmWidth);
// get a pointer to the pixels
DIBSECTION ds;
VERIFY (ioBM.GetObject (sizeof (DIBSECTION), &ds) == sizeof (DIBSECTION));
RGBTRIPLE* pixels = reinterpret_cast<rgbtriple*>(ds.dsBm.bmBits);
VERIFY (pixels != NULL);
// get the user's preferred button color from the system
RGBTRIPLE userBackgroundColor = {
GetBValue (m_screenBackColor), GetGValue (m_screenBackColor), GetRValue (m_screenBackColor)};
BYTE imageBlue=GetBValue(m_imageBackColor);
BYTE imageGreen=GetGValue(m_imageBackColor);
BYTE imageRed=GetRValue(m_imageBackColor);
// search through the pixels, substituting the user's button
// color for any pixel that has the magic background color
for (UINT i = 0; i < numPixels; ++i)
{
if (pixels [i].rgbtBlue == imageBlue &&
pixels [i].rgbtGreen == imageGreen &&
pixels [i].rgbtRed == imageRed)
{
pixels [i] = userBackgroundColor;
}
}
}
Sincerely Yours,
RadioShark
|
|
|
|