|
toxcct wrote:
: i'm really really really sorry for series II && III ; i'm ending my classes in one week, and i have to prepared hard my next job
No Problem Buddy, I will Manage
"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
|
|
|
|
|
please look into the below code equivalent to then pvevious one after removing all the redundant lines. please let meknow about: given any window how to obtain information of all the data present in the window.
please suggest me a method or any example code to do the following
requirement is as below:
input: window
Output:
details of various items present in the window and their content as far as possible.
Maincallingfunction()
{
WND * wndparent,*wndchild1,*wndchild2;
wndparent = Findwindow("WindowName");
cwndchild1= wndparent->GetTopWindow();
while(wncdhild1!= NULL)
{
GetWindowContent(wndchild,wndparent);
wndchild2= wndchild1->GetTopWindow();
while(wncdhild2!= NULL)
{
GetWindowContent(wndchild,wndparent);
wndchild2= wndchild2->GetNextWindow()
}
wndchild1= wndchild1->GetNextWindow();
}
}
void GetWindowContent(CWnd *WndActiveChild ,CWnd *WndParent)
{
CWnd * WndActiveChildRead;
CEdit *WndEdit;
LPTSTR EditText;
COleDataObject ClipObj;
tagSTGMEDIUM *strVar;
LPCTSTR lpctFormat;
int ControlID,WinCount = 0;
CString rString,temprString,text;
// code starting from here
WndActiveChild->SetForegroundWindow();
WndActiveChild->SetFocus();
ControlID = WndActiveChild->GetDlgCtrlID();
WndActiveChild->GetWindowText(rString);
AfxMessageBox(rString);
}
-- modified at 7:13 Wednesday 14th September, 2005
|
|
|
|
|
teja_tejaswi wrote:
WND * wndparent,*wndchild1,*wndchild2;
wndparent = Findwindow("WindowName");
cwndchild1= wndparent->GetTopWindow();
If you trying to retrieve content from Window/Edit box thats belong to some other process... then GetWindowText(..) api will not work..
You have to use WM_GETTEXT and WM_GETTEXTLENGTH message to reterive the text of that window.
"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
|
|
|
|
|
You cant read the edit box because it not in you process however do not fret
lResult = SendMessage(
// returns LRESULT in lResult
(HWND) hWndControl,
// handle to destination control
(UINT) WM_GETTEXT,
// message ID
(WPARAM) wParam,
// = (WPARAM) () wParam;
(LPARAM) lParam
// = (LPARAM) () lParam;
);
Look up further documentation on the web but this will take care of your problem.
|
|
|
|
|
ky_rerun wrote:
WM_GETTEXT,
Sorry if I sound Rude.., I believe same thing is mentioned by me around 15 hr prior to your post.... Please check other comments before posting..
"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
|
|
|
|
|
Hello,
At the moment Im writing on a code-comment macro that shall automatically generate comment-dummys for namespaces, classes, functions, etc., because I want to use my code with doxygen.
After matching with several problems Ive come to a problem I cannot solve myself.
Im using the CodeElements Interface to go through all elements and use the Comment-member of the CodeElement (eg. CodeClass) to set my comment-dummy.
In fact the problem is quite simple:
Visual Studio only assigns a comment to a CodeElement when it is looking like that:
// bla blub
// further blubb
but not if it looks like that
/* hrhr
*/
or that
//! codecomment
It wouldnt be any problem to make comments that are accepted by doxygen, but these comments are not assigned to the CodeElement and this way are not shown in the information-window that opens when you are goind to use the function in your source.
Is there a way to change this visual studio behaviour, so it would accept a comment like this as the comment assigned to the function?
/* void JustDoingSomething()
\brief does something
*/
void JustDoingSomething();
|
|
|
|
|
Hm, just forget about it - my visual studio now also shows the other comments - no idea why this wasnt the case before...
|
|
|
|
|
when linking my vc project on vc++6.0,i got a link error.
It says:
"strmbasd.lib(wxdebug.obj):error LNK2001:unresolved symbol_imp_strrchr"
so,how to settle this problem?
thanks!
All I do I do it for you!
|
|
|
|
|
Hi all
I have this application, when ever a failure condition is encountered, i display a message box and
post a quit message to the window and exit.
but the message box is displayed only if i press on the
ALT key, i tried to change the MessageBox style to MB_TopMOST|MB_SYSTEMMODAL nothing is working for me
i want the messagebox to be displayed in foreground.
MyCode:
MessageBox(AfxGetMainWnd()->GetSafeHwnd(),"Fatal Error!!!,Application will terminate","ERROR", MB_OK|MB_ICONERROR|MB_TOPMOST);//notworking
or
MessageBox(HWND_DESKTOP,"Fatal Error!!!,Application will terminate","ERROR",MB_OK|MB_ICONERROR|MB_TOPMOST);//NOT WORKING
or
AfxMessageBox(-as above__)// not working
please help, urgent...
regards
pradish
|
|
|
|
|
What is the conditions of displaying the message box?
From which function you display the message box?
Did you try with AfxMessageBox(...) instead?
|
|
|
|
|
Hi,
only a try
::MessageBox(NULL, "Your text", "Error", MB_OK | MB_ICONERROR| ... );
HTH
Frank
|
|
|
|
|
Frank K wrote:
::MessageBox(NULL, "Your text", "Error", MB_OK | MB_ICONERROR| ... );
Yeah, this can help, but ia m afraid this wouldn't take Focus!
"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
|
|
|
|
|
Respected all
I am david and very new to vc.
My query related to my previous 2 queries.
"I am displaying a Bitmap along with data on different poition of bitmap using dc.TextOut() function on a Dialog Window but when i select the 2nd bitmap from list box to display on that Dialog Window then the bitmap has been displayed but the data cant dispalyed and display an error message that a bug occurred.
I used
Invalidate()
and UpdateWindow() function but did not work.
So plz guide me .....
david
|
|
|
|
|
and what about - just a guess - calling OnPaint() ?
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
Hi friends
I want to create a windows service that has an array of digits in itself;
Then I want to develop an application to interact with this windows service
Now,What do I do in this application:
The application request from windows service to return a specific inedx of array.
Please help me immediately!
I want to do all these work in VisualC++ 6.0
-- modified at 3:05 Wednesday 14th September, 2005
|
|
|
|
|
define some intrface in windows service, that will act as out of proc COM server.
|
|
|
|
|
prasad_som wrote:
define some intrface in windows service, that will act as out of proc COM server.
Sorry if I sound rude , What if Service is win32/mfc based...?
"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
|
|
|
|
|
then whats problem? May be i didn't get your question.
|
|
|
|
|
prasad_som wrote:
y be i didn't get your question.
Actaully i want to say how will Win32/MFC based Project Expose Interface!!
"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
|
|
|
|
|
Mojtaba_Service wrote:
Now,What do I do in this application:
The application request from windows service to return a specific inedx of array
Interprocess communication would be only solution to your problem.....
here is link:-
Inter Process Communication[^]
"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
|
|
|
|
|
i want to chang the data of VT_DATE to the one of VT_BSTR with the VariantChangeType function, but only a part of the data is changed. for example,2005-12-20 0:00:00 is converted to 2005-12-20 of VT_BSTR, but 1899-12-30 21:30:00 is converted to 21:30:00 of VT_BSTR. both 2005-12-20 0:00:00 and 1899-12-30 21:30:00 are from sql server, and 2005-12-20 0:00:00 is smalldatetime; 1899-12-30 21:30:00 is datetime. how can i get the complete VT_BSTR data?
|
|
|
|
|
How do I lock a file pointer (FILE *) in MSVC? On Linux, this is achieved via flock(). In Visual Studio 2005, there's _lock_file() and _unlock_file(), but I can't fine any function in VS2003. So how can I implement file locking? I don't want to use LockFile(), as I already have all the functions implemented using stdio instead of windows file managment.
|
|
|
|
|
Use _fsopen() if you wan't to lock the entire file. It returns a FILE *, just as fopen().
-- modified at 6:03 Wednesday 14th September, 2005
|
|
|
|
|
Thanks for your reply, but I don't want to fclose the file afer each fread/fwrite. In fact, there will be multiple threads and processes trying to access the file, so each one needs to lock the file first.
|
|
|
|
|
Hello.
I understand your problem. Another way to do it is to use sopen() and lock(). But then you have to use handles instead of FILE *. But if that's not a big deal, check it out. lock() can lock regions of a file.
|
|
|
|