|
I am working on an application that have to retrive something after the javascript timer timesout... like there in rapidshare you have a js timer, when it times out you are shown the link...
Now the problem is
I have used WININET to do http work
send a url to server
retrive the response
I found that the javascript part, which when i saw page source in browser was something like
<html>.....
.......
...</html>
<script>..... JS Part
</script>
Now in the reponse em getting, there is no script part, but there is other js parts. i have tried changing the USER - AGENT .. Plz reply, no MFC, just winapi please..
|
|
|
|
|
The HTML you got back, is that the right one you were expecting?
-Suhredayan
|
|
|
|
|
ok I am done with that,I was actually working on a web crawler, actually a file crawler. I tricked out some php dlls and loaded it in my Win32 app and used it to retrive source and it is working pretty cool.
|
|
|
|
|
I have a MFC SDI app which has a single view with a bunch of controls.
As an enhancement, there is a suggestion to add splitter pane to divide the existing view into 2 horizontal parts so that user can adjust panes to view according to their requirement.
So, my splitter would be of 2 rows and 1 col. But problem which I am facing is - all implementation which I have seen till now for CSplitterWnd create a new Wnd or View or store each "pane" in the view. But in my case, there's a single view which has already been created(and there's already huge business logic written in Child View class) and it would be a pain to actually partition that view into 2 views and then add the relevant code.
Is there any way I can use same view to add a horizontal static splitter with 2 panes so that 2 panes will actually contain diff controls but part of just 1 view file.
Thanks
Amit
|
|
|
|
|
This is how the splitter works.
First there is a view.
You create a splitter in that view.
Now you have to create 2 views, one for each pane.
The initial parent view now only hosts the splitter and does nothing more.
In your case, after you create the splitter, create two instances of the Child View class, one in each pane.
|
|
|
|
|
Dear all,
I might ask for help regarding this issue in the list, because I´m pretty sure someone dealt with this in the past. I´ve searched in this forum. There is one similar question, but the solution involves MFC (which does not apply for me)
I have coded an application for Visual C++ Express. It basically consists on a VC++ Form and a OpenCV windows displaying video. At some point I recollect the information from the OpenCV Video Window, and I reflect it on the VC++ Form.
After finishing the first draft of the application, I was considering improving the interface. The first natural step will be to integrate both OpenCV Window and VC++ Form. I´ve checking the code for cvNamedWindow, and it uses Win32 API (as expected). I´ve looking on the internet, and most of the solutions came by using MFC (which I do not use) or moving to .NET (so late).
Does anyone of you have faced this problem? Does anyone has solutions or guidances?
Best,
Kikoso
|
|
|
|
|
So are you trying to place the OpenCV window as a child in the Form?
How this is done with Window Media Player is that WMP has an activex control which can be placed in a form and instantiated. The activex exposes some methods that can be used to control the video that is played.
Check if OpenCV has such an activex control.
If not you should check the OpenCV documentation on how this can be done.
If it is possible then I'm sure it is documented.
|
|
|
|
|
Hello Superman, and thank you for your response.
OpenCV has not such an ActiveX. Just provide the basics image analyzing algorithms, and a basic Windows system based on Win32 API.
After some days checking for it on the internet I have not found a response. There are some clues using MFC, but using just the standard Forms of Visual C++ doesn´t seem possible (or at least obvious).
Nevermind, thank you for your interest. If a get a solution I will share it here (and if anybody has more clues, I´ll be pleased of hear them)
Cheers,
Kikoso
|
|
|
|
|
Found a solution (and a new problem) to this. I just post the solution in case anyone check it in the future
I basically transform the IplImage into Bitmap, and then paint it over a Form element.
void IplImageToTBitmap (IplImage* image){
System::Drawing::Bitmap^ bitmap = gcnew Bitmap(image->height,image->width * image->nChannels,System::Drawing::Imaging::PixelFormat::Format24bppRgb);
int numberOfLines= image->height;
int numberOfColums= image->width ;//* image->nChannels;
int step= image->widthStep;
unsigned char* data=reinterpret_cast<unsigned char*>(image->imageData);
for(int i=0; i<numberOfLines; i++){
for(int j=0; j<numberOfColums; j+= image->nChannels){
bitmap->SetPixel(j/3,i,Color::FromArgb(data[j],data[j+1],data[j+2]));
}
data+= step;
}
this->panel2->BackgroundImage = bitmap;
}
Using the sentence this->panel2->BackgroundImage = bitmap; I manage to write the image to a Panel Object (and definitely every object able to support bitmaps).
Now I´m trying to work just with the frames from OpenCV not displaying the video (that means, commenting the line cvNamedWindow( "video", 1 );) Nevertheless, the program gets frozen and I´m not able to use it. I´m thinking about doing some stuff with Threads (using a Thread for OpenCV and a different one for the GUI), but any advice will be welcome
Regards
|
|
|
|
|
Hi all,
I have declared CComboBox m_comboBox; in MainFrame class
Using it, I have created a combobox on toolbar. But I can't access it from Doc class. I want to write something in combobox after some calculation(by Clicking in another button).
Pls help anyone.
Thanks
|
|
|
|
|
Assuming the CComboBox is a public variable, you can get at it something like this:
CMyApp* app = (CMyApp*)AfxGetApp();
CMainFrame* frame = (CMainFrame*)app->m_pMainWnd;
and then
int selected_item = frame->m_comboBox.GetCurSel();
|
|
|
|
|
LunaticFringe wrote: CMyApp* app = (CMyApp*)AfxGetApp();
CMainFrame* frame = (CMainFrame*)app->m_pMainWnd;
You could also do this -
CMainFrame* frame = (CMainFrame*)AfxGetMainWnd();
|
|
|
|
|
Yup.
|
|
|
|
|
Hi ,
Can you please provide a solution for this issue.
I have developed an exe in VS2005 (WIN2003) and i installed the same exe into another machine (WIN2003- having VS2005 as well),
its not running & throwing some errors in EVENT-VIEWER like'
"Generate Activation Context failed for c:\WINDOWS\system32\infocardapi.dll. Reference error message: The referenced assembly is not installed on your system."
"Resolve Partial Assembly failed for Microsoft.VC80.CRT. Reference error message: The referenced assembly is not installed on your system."
"Dependent Assembly Microsoft.VC80.CRT could not be found and Last Error was The referenced assembly is not installed on your system."
As part of my intstallation in remote machine, have installed Microsoft.VC80.CRT.manifest, msvcm80.dll,msvcp80.dll,msvcr80.dll .
But while doing comparision , have found.
inside
C:\Program Files\SampleApp\Microsoft.VC80.CRT.manifest - (2KB)
C:\Program Files\App\msvcm80.dll - (468 KB) version 8.0.50727.4053
C:\Program Files\App\msvcp80.dll - (542KB) version 8.0.50727.4053
C:\Program Files\App\msvcr80.dll - (618KB) version 8.0.50727.4053
but inside my VS
C:\Program Files\Microsoft Visual Studio 8\VC\redist\x86\Microsoft.VC80.CRT\Microsoft.VC80.CRT.manifest - (1KB)
C:\Program Files\Microsoft Visual Studio 8\VC\redist\x86\msvcm80.dll (468KB) version - 8.0.50727.42
C:\Program Files\Microsoft Visual Studio 8\VC\redist\x86\msvcp80.dll ( 536KB) version 8.0.50727.42
C:\Program Files\Microsoft Visual Studio 8\VC\redist\x86msvcr80.dll ( 612KB) version 8.0.50727.42
Is this version may be the problem ?.
Please throw some light on this issue & ur help much appreciated.
Regds,
Jani MS
|
|
|
|
|
What about the 'infocardapi.dll' cited in the first error message? Does it exist on the target machine?
|
|
|
|
|
Yes, its existing in windows/system32 folder.
Regds
jain_MS
|
|
|
|
|
You may be right about library versions, then - you may have linked against a different version from those present on the target machine.
You said the target machine had VS installed on it. Does it have the same service packs and updates installed as your dev box?
[edit]
Check out Covean's response below - he sounds as if he has a better handle on this.
[/edit]
modified on Tuesday, November 10, 2009 9:50 AM
|
|
|
|
|
Yes , my both Dev & remote machine have same service packs.
Actually from dev box, while compiling my executables from Dev box, i have made some changes in my project properties, Manifest Tool->Input & Output -> Embed Manifest =NO(i set it as NO, before it was YES).
Now that Error is not occuring , but now i am getting new error
<b>Could not start the App.exe service on Local computer.
Error 1053: The service did not respond to the start or control request in a timely fashion.</b>
Please let me know ur comments on this.
Your help much appreciated
Regds
Jain_MS
|
|
|
|
|
This problem often occurs if you try to use an 32 bit dll in an 64 bit app or the other way around.
So make sure your app and the dll runs both in 32 or 64 bit environment.
The second reason for this can be, that the infocardapi.dll itself references a dll that is not installed on the machine.
At last: Do not copy dlls like msvcm80.dll instead install the microsoft redistributable package for
your type of machine like this.
Greetings
Covean
|
|
|
|
|
Thanks for ur reply,
My both dev & remote machine as 32 bit version .
Actually from dev box, while compiling my executables from Dev box, i have made some changes in my project properties, Manifest Tool->Input & Output -> Embed Manifest =NO(i set it as NO, before it was YES).
Now that Error is not occuring , but now i am getting new error
Could not start the App.exe service on Local computer.
Error 1053: The service did not respond to the start or control request in a timely fashion.
Please let me know ur comments on this.
Your help much appreciated
Regds
Jain_MS
|
|
|
|
|
Have you developed a service application?
This sounds like an error in your start or control function of your service, that doesn't
respond in 30 seconds (if you didn't request more time).
Greetings
Covean
|
|
|
|
|
is there any way to request the service to wait more than 30 seconds..
Otherthan doing changes in my program?...
Your help much appreciated.
Regds
Jain_MS
|
|
|
|
|
No I do not know a way.
I think you have to use SetServiceStatus with SERVICE_START_PENDING and dwCheckPoint, dwWaitHint
having valid values. And do this every time you need more time for startup by increasing dwCheckPoint.
Greetings
Covean
|
|
|
|
|
just quick read your problem, maybe you having express edition, you need to get release edition of VC++ or get latest .NET framework update and MSVC++ 2008 redistributable update, I experienced same, did that.
|
|
|
|
|
Hi,
we have cutomized TreeView control. If we embed this tree view control on a window , then applicaiton is crashing in Vista OS,Win2008 32bit/64bit. When the same tree view control is embeded on a window on Win2003 OS then application is not crashing. This looks to be OS specific issue.
I had attached Debug Diagnostics with the applicaiton. The below is call stack generated by debug diagnostics.
ntdll!RtlDeactivateActivationContext+14e 002d07c8 18850022 0012c2c4
kernel32!DeactivateActCtx+31 00000000 18850022 0214cce8
dmocx!CTVCtrl::OnDraw+28 0012c308 0012c2f8 0012c2e8
mfc42u!COleControl::OnPaint+11f 00000000 00b5ad05 00000000
mfc42u!CWnd::OnWndMsg+43c 0000000f 00000000 6ce3cdf0
mfc42u!CWnd::WindowProc+2e 0000000f 00000000 00000000
mfc42u!COleControl::WindowProc+12f 0000000f 00000000 00000000
mfc42u!AfxCallWndProc+b5 0214cce8 00000000 0000000f
mfc42u!AfxWndProc+3e 001102d8 0000000f 00000000
dmocx!AfxWndProcDllStatic+2e 001102d8 0000000f 00000000
user32!InternalCallWinProc+23 73c33094 001102d8 0000000f
user32!UserCallWinProcCheckWow+14b 0035c8bc 73c33094 001102d8
user32!DispatchClientMessage+da 01346e48 0000000f 00000000
user32!__fnDWORD+24 0012c648 00000018 0012c6c4
ntdll!KiUserCallbackDispatcher+2e 76c14566 00160542 00000060
user32!NtUserCallHwndLock+c 00160542 00000060 0012c690
user32!UpdateWindow+32 00160542 0214aaec 00000000
ocxgot!ocxMethod+486e 002602ac 0012c6b0 00000000
ocxgot!ocxMethod+7ee9 0000005a 0000003c 000000d2
ocxgot!ocxMethod+7514 0214aad8 190106a0 0000005a
ocxgot!WWDLLDrawRuntime+7c 0214aad8 190106a0 0000005a
view!PasswordEdit+248a 190106a0 0000005a 0000003c
Any help would be appreciated.
Thanks in advance.
|
|
|
|