|
I don't suppose there is a VS 6.0 version of Easy Installer. If, not is there anyway I can change something to get it into the VS 6.0 IDE?
A C++ programming language novice, but striving to learn
|
|
|
|
|
Hi all,
I need do open a "please wait" window in order to keep blocked my MFC application (i mean that the user can do nothing) until a time-expensive routine ends. Then i need to close this "please wait" window.
I need a modal dialog i suppose.
How can i do that ?
Should i launch the time-expensive routine from the modal dialog ?
Thanx in advance,
Desmo16.
|
|
|
|
|
All you need to do is create a new dialog window, open it before runnning your expensive routine and close it after. In my opinion, having a "please wait" and forcing your user to sit there twiddling there thumbs is bad programming. Why not use a thread instead?
|
|
|
|
|
yes and no, if you create a Modal dialog, your long task will not be done unless you make it part of the dialog itself.
waldermort wrote: and forcing your user to sit there twiddling there thumbs is bad programming. Why not use a thread instead?
There are some tasks in some software that will ALWAYS make a user wait, whether it's in a different thread or not.
|
|
|
|
|
Because the user knows he has to wait so long and he wants the results that can be shown only AFTER the computation in the routine.
( The routine i'm talkin' about is a multi-objective genetic algorithm that finds a pareto-front of
solution after searching the causative bodies of seismic/volcanic effetcs)
|
|
|
|
|
Desmo16 wrote: The routine i'm talkin' about is a multi-objective genetic algorithm that finds a pareto-front of
solution after searching the causative bodies of seismic/volcanic effetcs
Ohhh this is gonna be my new sig...
~RaGE();
I think words like 'destiny' are a way of trying to find order where none exists. - Christian Graus
|
|
|
|
|
See here.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
I think you can see an example on http://www.codersource.net/ about this object but i cant remember its name.
|
|
|
|
|
I have two addins installed in my Outlook 2003, both have their specific functionality, I would like to integrate the functionality of both thru global mouse hooks, here is my senerio
1) Lets say there is a button "abc" on toolbar "A" in outlook mail composing window
2) and there is a button "xyz" on toolbar "X" in the same mail composing window
3) on click of button "abc", I would like to generate click of button "xyz" first
4) and then resume back to the process of button "abc"
I am thinking of developing application using VC++ and creating global mouse hooks (may be there is some better approach), I know I can capture the mouse click but my questions are
1) how do I know that the click that was captured is for "abc" button....I think I'll have to determine if the click was for OUTLOOK main window and then determine which mail composing window the click was for, and then finally determine which toolbar/button was it for........but how do I do this all ? any ideas/pointers/suggestions
2) Once I know that the click was for button "abc" now second step is, how do I push a new click event in the windows queue for button "xyz" in toolbar "X"
Also one thing to note is, there may be multiple mail composing windows open but we got to work on the active one only which initiated the click event in question.
Thanks in advance.
|
|
|
|
|
In my opinion, mouse hooks won't help you in this scenario. Write a COM addin or use VBA. It will be much simpler.
Obstacles are those frightful things you see when you take your eyes off your goal.
|
|
|
|
|
Hi,
does anyone know how I can convert a IntPtr of a HWND object to the data type HANDLE ??
I want to register the window Form1 to receive PnP Messages from a USB API from cypress:
USBDevice = new CCyUSBDevice(Form1->Handle);
CCyUSBDevice expects HANDLE, but I get only IntPtr from my Form1....
Please help me!
maggi01
|
|
|
|
|
HWND s and HANDLE s are distinct objects: there is no meaningful conversion between them.
Steve
|
|
|
|
|
Actually my code goes like this:
<br />
namespace Test_Application<br />
{<br />
using namespace System;<br />
using namespace System::ComponentModel;<br />
using namespace System::Collections;<br />
using namespace System::Windows::Forms;<br />
using namespace System::Data;<br />
using namespace System::Drawing;<br />
using namespace System::IO;<br />
<br />
public __gc class Form1 : public System::Windows::Forms::Form<br />
{<br />
public:<br />
static CCyUSBDevice *USBDevice = new CCyUSBDevice(EnumWindows((HANDLE)this::Form1::Handle));<br />
.<br />
.<br />
.<br />
How do you propose to deliver a handle of my "Test_Application" to the CCyUSBDevice constructor... which expects datatype HANDLE !?
thanx for your answer,
maggi01
|
|
|
|
|
This forum is for C++/MFC, I believe there is a managed C++ forum where you might have more luck getting an answer. Assuming HWND s and HANDLE s have the same meaning in the two environments then, as I said, there is no meaningful conversion between the two. That said, I don't know much about managed C++.
Steve
|
|
|
|
|
hi all i m using the winsock api's for client server communication that works on the blocking mode not asyncronous.
but i m not successfully able to receive the strings it works with one receive call not the multiple calls,with multiple calls it brings wrong data.
Tasleem Arif
|
|
|
|
|
Using the TCP protocol, packet boundaries are not preserved. That is, the number of calls, and number of bytes passed in a call, to send() is not mirrored in recv(). Instead, recv() gives you as many bytes as are currently buffered.
See the Winsock Programmer's FAQ article How to use TCP effectively[^].
|
|
|
|
|
in PE file format why import,export table is in data directory?
I mean in Section table there is a header about .idata(import table) or .edata.But they are already defined in data directory.
So
What are the differences between data directory and section table.Why do we use data directory?
|
|
|
|
|
The sections names and their contents are only convention. Borland compilers use different names for example. You can also instruct the linker to merge sections. Code that relies on section names to find such things as the import and export table is wrong; that's what the data directory is for, it's like a table of contents.
Steve
|
|
|
|
|
ok
Thank you.I want to ask one more question
What are the meanings of or what are the differnces between
VOffset
VSize
ROffset
RSize
RVA
VA
I need clear definitions.I am very confused about these.
|
|
|
|
|
It's not clear exactly what you're referring to but I assume it's the IMAGE_SECTION_HEADER structure. This is what it looks like (from "winnt.h"):
typedef struct _IMAGE_SECTION_HEADER {
BYTE Name[IMAGE_SIZEOF_SHORT_NAME];
union {
DWORD PhysicalAddress;
DWORD VirtualSize;
} Misc;
DWORD VirtualAddress;
DWORD SizeOfRawData;
DWORD PointerToRawData;
DWORD PointerToRelocations;
DWORD PointerToLinenumbers;
WORD NumberOfRelocations;
WORD NumberOfLinenumbers;
DWORD Characteristics;
} IMAGE_SECTION_HEADER, *PIMAGE_SECTION_HEADER;
The VirtualAddress is the RVA of where this section belongs when loaded into memory. RVA stands for Relative Virtual Address. It's of offset from the base address of the DLL to where the section is loaded. An absolute address can't be used as the DLL is not guaranteed to be loaded at a fixed location. The VirtualSize is how much memory is allocated for the section. This can be bigger then the actual size of the data in the section.
See here[^] for more details.
Steve
|
|
|
|
|
I'm converting my base 64 encoder/decoder class to be more unicode friendly, though I have a few questions.
1. Does each base64 character only occupy half of a wchar_t (ie the same as ascii characters)?
2. When reading a file to be encoded, should it be opened as wchar_t array (wfopen) or as a byte array (fopen)?
3. How can a 3rd party decoder tell if the origional was unicode or ascii?
The encodeing is not a problem, but I need to be certain 3rd party decoders can correctly decode the string into it's origional form.
|
|
|
|
|
waldermort wrote: 3. How can a 3rd party decoder tell if the origional was unicode or ascii?
If mu memory serves me right, unicode files starts with two special characters. They are (hex) FF and FE.
The sequence can be FFFE or FEFF, depending on endianess of the creating CPU.
Alcohol. The cause of, and the solution to, all of life's problems - Homer Simpson
|
|
|
|
|
1. Seeing as it is "your" library, I would hope that you were fully aware how base-64 works?
2. depends on if the filename is in Unicode or not. Completely independent of the file-content.
3. It can't reliably.
|
|
|
|
|
hi , i got problem with opengl why i cannot display cube and triangle in my comp... is there any code wrong below if u know plz inform me thanks
#include<gl glut.h="">
float rtri; // Angle For The Triangle
float rquad; // Angle For The Quad
int InitGL(GLvoid)
{
glShadeModel(GL_SMOOTH);
glClearColor(0.0f, 0.0f, 0.0f, 0.5f);
glClearDepth(1.0f);
glEnable(GL_DEPTH_TEST);
glDepthFunc(GL_LEQUAL);
glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST);
}
void display (GLvoid)
{
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
glLoadIdentity();
glPushMatrix();
glTranslatef(-1.5f,0.0f,-6.0f);
glRotatef(rtri,0.0f,1.0f,0.0f);
glBegin(GL_TRIANGLES);
glColor3f(1.0f,0.0f,0.0f);
glVertex3f( 0.0f, 1.0f, 0.0f);
glColor3f(0.0f,1.0f,0.0f);
glVertex3f(-1.0f,-1.0f, 1.0f);
glColor3f(0.0f,0.0f,1.0f);
glVertex3f( 1.0f,-1.0f, 1.0f);
glColor3f(1.0f,0.0f,0.0f);
glVertex3f( 0.0f, 1.0f, 0.0f);
glColor3f(0.0f,0.0f,1.0f);
glVertex3f( 1.0f,-1.0f, 1.0f);
glColor3f(0.0f,1.0f,0.0f);
glVertex3f( 1.0f,-1.0f, -1.0f);
glColor3f(1.0f,0.0f,0.0f);
glVertex3f( 0.0f, 1.0f, 0.0f);
glColor3f(0.0f,1.0f,0.0f);
glVertex3f( 1.0f,-1.0f, -1.0f);
glColor3f(0.0f,0.0f,1.0f);
glVertex3f(-1.0f,-1.0f, -1.0f);
glColor3f(1.0f,0.0f,0.0f);
glVertex3f( 0.0f, 1.0f, 0.0f);
glColor3f(0.0f,0.0f,1.0f);
glVertex3f(-1.0f,-1.0f,-1.0f);
glColor3f(0.0f,1.0f,0.0f);
glVertex3f(-1.0f,-1.0f, 1.0f);
glEnd();
glLoadIdentity();
glTranslatef(1.5f,0.0f,-7.0f);
glRotatef(rquad,1.0f,1.0f,1.0f);
glBegin(GL_QUADS);
glColor3f(0.0f,1.0f,0.0f);
glVertex3f( 1.0f, 1.0f,-1.0f);
glVertex3f(-1.0f, 1.0f,-1.0f);
glVertex3f(-1.0f, 1.0f, 1.0f);
glVertex3f( 1.0f, 1.0f, 1.0f);
glColor3f(1.0f,0.5f,0.0f);
glVertex3f( 1.0f,-1.0f, 1.0f);
glVertex3f(-1.0f,-1.0f, 1.0f);
glVertex3f(-1.0f,-1.0f,-1.0f);
glVertex3f( 1.0f,-1.0f,-1.0f);
glColor3f(1.0f,0.0f,0.0f);
glVertex3f( 1.0f, 1.0f, 1.0f);
glVertex3f(-1.0f, 1.0f, 1.0f);
glVertex3f(-1.0f,-1.0f, 1.0f);
glVertex3f( 1.0f,-1.0f, 1.0f);
glColor3f(1.0f,1.0f,0.0f);
glVertex3f( 1.0f,-1.0f,-1.0f);
glVertex3f(-1.0f,-1.0f,-1.0f);
glVertex3f(-1.0f, 1.0f,-1.0f);
glVertex3f( 1.0f, 1.0f,-1.0f);
glColor3f(0.0f,0.0f,1.0f);
glVertex3f(-1.0f, 1.0f, 1.0f);
glVertex3f(-1.0f, 1.0f,-1.0f);
glVertex3f(-1.0f,-1.0f,-1.0f);
glVertex3f(-1.0f,-1.0f, 1.0f);
glColor3f(1.0f,0.0f,1.0f);
glVertex3f( 1.0f, 1.0f,-1.0f);
glVertex3f( 1.0f, 1.0f, 1.0f);
glVertex3f( 1.0f,-1.0f, 1.0f);
glVertex3f( 1.0f,-1.0f,-1.0f);
glEnd();
glPopMatrix();
rtri+=0.2f;
rquad-=0.15f;
glutSwapBuffers ( );
}
void keyboard ( unsigned char key, int x, int y )
{
switch ( key ) {
case 27: // When Escape Is Pressed...
exit ( 0 ); // Exit The Program
break;
default:
break;
}
}
int main(int argc, char** argv)
{
glutInit(&argc,argv);
glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGB);
glutInitWindowSize(500,500);
glutInitWindowPosition(100,100);
glutCreateWindow("simple");
glutFullScreen ( );
glutKeyboardFunc ( keyboard );
InitGL ();
glutDisplayFunc(display);
glutMainLoop();
}
|
|
|
|
|
You haven't set the camera perspective
Your frustum seems to extend only from -1 to 1 . your translation at the beginning (glTranslatef(-1.5f,0.0f,-6.0f);) takes you object beyond the far plane.
try setting the camera parameters or change you glTranslatef line
I hope this helps
"It was when I found out I could make mistakes that I knew I was on to something."
-Ornette Coleman
"Philosophy is a study that lets us be unhappy more intelligently."
-Anon.
|
|
|
|
|