|
If you are using IE8, you can uninstall it and try with IE7.
|
|
|
|
|
Hi,
I am trying to automate the clicking of context menu items.
How do i click the items after the context menu is poped up on mouse right click.
Please any one there, your help is greatly needed
|
|
|
|
|
Use mouse_event API [^]
Величие не Бога может быть недооценена.
|
|
|
|
|
Thanks fo rur help.
I have one more question. How to find the position of the menu items?
|
|
|
|
|
Hello everyone !
I forget it,but I vaguely remember the function like this :
int MessageBoxTimer(<br />
HWND hWnd, <br />
LPCTSTR lpText, <br />
LPCTSTR lpCaption, <br />
UINT uType<br />
UINT uElapse, <br />
);
I don't want use FindWindow to close it,, thanks for you help !
Best Reguards!
|
|
|
|
|
|
Hi, I'm trying to make an application in MDI MFC with multiple view classes for a single doctemplate. I would like to be able to display the new CRecordView class by clicking on it's name from a menu. I really at a loss of how to do this, anyones input would be greatly appreciated and some code showing the method would be a life saver.
Thanks
|
|
|
|
|
You can use CDocument::AddView[^] to add a new view to the existing document.
You have to create a new view class which is derived from CView and then add it to the view.
You can use the ShowWindow API to show and hide the views.
Look at the sample code in the documentation.
|
|
|
|
|
Hi All,
I'm porting some old code to run on Vista/7 and have run across some odd behaviour. The app in question is creating windows controls via the MFC call CreateEx to create a PushButton. While the button is created in the dialog, it has a strange artifact around it. Somtimes it's a distinct black border that fades away when the mouse is not near it, sometimes it has some grey dots surrounding it, and sometimes it looks like an extra line is being drawn on one side. It's almost as if part of the code thinks it's an older comctrl32 and parts a new comctrl32. I have ensured there is a manifest file with the linker directive to use common-controls 6, but to no avail.
Anyone seen this before or have a suggestion to try?
Thanks in advance!
Anthony
|
|
|
|
|
This sounds like the default button styles.
The black border denotes a default button and the grey dots indicate that the button has focus.
|
|
|
|
|
I think I wasn't clear enough... This is not "normal" behaviour. For example, the black "border" may only draw part of a side. The grey "dots" may have one side solid and another partially covered. Hovering a mouse over the control may see all sorts of interesting transitions. Solid black fading to grey dots, or suddenly clearing away to show the background window colour.
There is a conflict somewhere in the code (I wasn't clear that on XP this code works fine). MS suggested that my manifest file may be incorrect, but I have not been able to find anything wrong with it.
|
|
|
|
|
Create a program that allows the user to enter a password.
1-All vowels (A, E, I, O, and U) in the original password are replaced with the letter X.
2-All numbers in the original password are replaced with the letter Z.
3-All the characters in the original password are reversed.
My question is I'm getting two errors and honestly, I'm not sure how to fix them!
error C2109: subscript requires array or pointer type
error C2664: 'strcat' : cannot convert parameter 1 from 'int' to 'char *'
<br />
#include <string><br />
#include <iostream><br />
<br />
using std::cout;<br />
using std::cin;<br />
using std::endl;<br />
using std::string;<br />
<br />
int main(int argc,char *argv[], int rpass, int passwdlen, int passwd)<br />
{<br />
<br />
char *a,*b,c; <br />
int t,e; <br />
if (argc<2) return(0); <br />
a=argv[1]; <br />
b=a; <br />
e=strlen(b); <br />
for (t=0;t<=e;t++) <br />
{ <br />
c = *b; <br />
if (c>='A'&&c<='Z') c -= 'A'-'a'; <br />
if (c=='a'||c=='e'||c=='i'||c=='o'||c=='u') b++; <br />
else *a++ = *b++; <br />
} <br />
<br />
if( c >= '0' && c <= '9' )<br />
char repass[256];<br />
for (int i=passwdlen-1; i>=0; i--) strcat(rpass, passwd[i]);<br />
<br />
system("pause");<br />
return 0; <br />
}
|
|
|
|
|
Chris0812 wrote: if( c >= '0' && c <= '9' )
char repass[256];
for (int i=passwdlen-1; i>=0; i--) strcat(rpass, passwd[i]);
The if condition looks like it is creating repass if the condition is met and nothing more.
I believe the first parameter of strcat must be repass which is a character array and not rpass which is an integer passed in as parameter.
Chris0812 wrote: int main(int argc,char *argv[], int rpass, int passwdlen, int passwd)
I've never seen such a main function with so many parameters.
That wouldn't work.
main takes a max of 3 parameter - int main(int argc, char* argv[], char* envp[])
And to reverse a string you can use strrev .
Also you can use strtok to search for a token within a string like "aeiou" .
|
|
|
|
|
Honestly, I don't get it...this is my first programming class and it will be my last!
This is the hardest assignment so far.
|
|
|
|
|
Okay, now the only erroe I'm getting is C2065, undeclared identifer....
passwdlen, repass and passwd
|
|
|
|
|
So just declare them (like the other variables).
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
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
|
|
|
|