|
Look up GetWindow and GetNextWindow in MSDN.
|
|
|
|
|
CRect rect;
this->GetWindowRect(rect);
CWnd* pWnd = this->GetWindow(GW_CHILD);
CRect rcWnd;
while (pWnd) {
pWnd->GetWindowRect(rcWnd);
if (rcTest.IntersectRect(rect, rcWnd) && pWnd != this) {
}
pWnd = pWnd->GetWindow(GW_HWNDNEXT);
}
|
|
|
|
|
You can use EnumChildWindows ,too.
BOOL CALLBACK EnumChildProc(HWND hwndChild, LPARAM lParam)
{
TCHAR className[256] = {0};
GetClassName(hwndChild,className,256);
return TRUE;
}
EnumChildWindows(m_hWnd,EnumChildProc,0);
|
|
|
|
|
Hi Prasad,
Thank you very much for giving a valuble info. the problem get solved.
|
|
|
|
|
Uday Janaswamy wrote: I want to Know how many and what type of controls that are placed in a Dialog Box.
For example :-
i place a Button,CheckBox,listControl,ComboBox.... etc in a Dialog.
from code i want to Iterate all the Dialog Controls in the Dialog and Let me know what controls i have placed in the Dialog.
GetNextDlgTabItem
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
Presently I am using the telnet command to connect an IP address which then asks for an Username and then Password. This is all in CUI mode, i.e from the DOS prompt.
I want an GUI application which will telnet the IP in the background and open an authentication window which will ask for Username & password. When correct Username & Password are supplied, it will connect and show the connection Status.
If possible please help me out in this regard.
Rupak
|
|
|
|
|
Look up sockets/Winsock and RFC854[^] for good places to start.
Peace!
-=- James Please rate this message - let me know if I helped or not!<HR> If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! See DeleteFXPFiles
|
|
|
|
|
I've seen what looks to be an excellent article at
http://www.codeproject.com/system/serial.asp
and I shall look at the source code, but what I want to know is if anyone has done any work with RS232 in just simple data reads from scientific equipment, e.g a digital electrometer. If someone has any examples or can point me to some, that would be great. Not even sure I need it to be that clever, it might just be a case of button driven "read data item X" from a dialog, i.e. wouldn't need to be constantly reading/updating.
|
|
|
|
|
Read this[^] article to get started.
I've done quite a few serial communication applications. :->
My approach is similar to the one mentioned in the article above, but I use one thread for writing and one thread for reading with two queues for data to send and data received.
"It's supposed to be hard, otherwise anybody could do it!" - selfquote "High speed never compensates for wrong direction!" - unknown
|
|
|
|
|
Iam doing an application in VC++..
I want to know how the OS detects the memory drive inserted and loads the driver..
Can any one help me out for this..This is needed for my application...
Sample codes are more helpful..
Thanks in advance..
Regards
vijay
|
|
|
|
|
I beleive that the WM_DEVICECHANGE message is sent when a removable drive is inserted or removed.
Peace!
-=- James Please rate this message - let me know if I helped or not!<HR> If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! See DeleteFXPFiles
|
|
|
|
|
This is cool .
Press: 1500 to 2,200 messages in just 6 days? How's that possible sir?
Dr.Brad :Well,I just replied to everything Graus did and then argued with Negus for a bit.
|
|
|
|
|
I want to know by seeing what, the particular driver is loaded..
Like every USB device have VID & PID, will it check those or anything else..
In my appliaction i want to detect only the pendrives..
So by knowing how the OS detects , i thoought that it will be help full to me..
Can u help in this aspect..
Thanks in advance
Regards
vijay
|
|
|
|
|
I am calling GetColumnInfo() function to get column (datatype - Text) information from the opened rowset. But ColumnSize should be less than 255 but i am getting values like 1162690894.
What may be the problem?
|
|
|
|
|
Can you post relevent code ?
|
|
|
|
|
DBORDINAL* pulColumns;
DBCOLUMNINFO** ppColumnInfo;
LPOLESTR* ppStrings;
HRESULT h = SomeTable.GetColumnInfo(&pulColumns, &ppColumnInfo, &ppStrings);
SomeTable is of CTable.
ppColumnInfo[index].ulColumnSize returns 1162690894
It should be less than or equal to 255.
|
|
|
|
|
Ordinal wrote: DBORDINAL* pulColumns;
DBCOLUMNINFO** ppColumnInfo;
LPOLESTR* ppStrings;
HRESULT h = SomeTable.GetColumnInfo(&pulColumns, &ppColumnInfo, &ppStrings);
How this code is compiling ?
Shouldn't this be like this ?
UINT pulColumns;
DBCOLUMNINFO* ppColumnInfo = NULL;
LPOLESTR ppStrings = NULL;
HRESULT h = SomeTable.GetColumnInfo(&pulColumns, &ppColumnInfo, &ppStrings);
|
|
|
|
|
I am sorry. U r right.
Anyways what may be the problem?
|
|
|
|
|
From your original post
HRESULT h = SomeTable.GetColumnInfo(&pulColumns, &ppColumnInfo, &ppStrings);
SomeTable is of CTable.
ppColumnInfo[index].ulColumnSize returns 1162690894
Are you sure index value is less than no. of columns returned ?
You should have used this loop,
for (ULONG iCol=0; iCol < cCol; iCol++)
{
|
|
|
|
|
Hi all,
How would one go about achiving the following:
Lets say you use printf and you want to display a message with a counter, but the message must not repeat itself but the counter must. The same question for achiving this in a messagebox.
It it possible?
Thanx agian
Regards,
The only programmers that are better than C programmers are those who code in 1's and 0's.....
Programm3r
|
|
|
|
|
sorry, i don't really understand. can you provide a bit more detailed infos on your need ?
|
|
|
|
|
Sure,
Something like:
int x=0;
while (x<10)
{
printf("Value of x: %d",x);
with only x changing, the message must be static
(only displaying once and x changing)
x++;
}
Makes sense ?
The only programmers that are better than C programmers are those who code in 1's and 0's.....
Programm3r
|
|
|
|
|
you mean, all the text remains on the same line ?
use the escapment character '\b' to remove the last character (and then to overwrite it)
|
|
|
|
|
Thanx toxcct never heard of the escapment character '\b' before. But now I do ..
Thanx again.
Regards,
The only programmers that are better than C programmers are those who code in 1's and 0's.....
Programm3r
|
|
|
|
|
Programm3r wrote: ...never heard of the escapment character '\b' before.
Probably because it's called a backspace.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|