|
baerten wrote: if(msg->wParam == VK_F4 && GetKeyState(VK_LMENU)<0)
You want it to work only if the Left Alt is pressed? I would rather suggest VK_MENU instead of VK_LMENU . Moreover, I doubt if this would ever work!
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->ßRÅhmmÃ<-·´¯`·.
|
|
|
|
|
Hi,
Its working. Thanks for ur reply
|
|
|
|
|
Handle WM_CLOSE and place the following code in it:
if(GetKeyState(VK_MENU)<0 && GetKeyState(VK_F4)<0)
{
AfxMessageBox("Alt and F4 keys are down!");
}
[I am assuming that you're working on a dialog based app and using MFC. Do reply if there's something different]
|
|
|
|
|
Hello everyone,
If I am developing a native unmanaged COM using Visual Studio 2005 C++, is it a mandatory to register type lib into HKEY_CLASSES_ROOT\TypeLib?
I have already registered related entries into HKEY_CLASSES_ROOT\CLSID\<co clas="" id="">, HKEY_CLASSES_ROOT\Interface\<interface id="" of="" co="" class="" exposed=""> and HKEY_CLASSES_ROOT\<co class="" name="">.
What is the function of the entry under HKEY_CLASSES_ROOT\TypeLib during COM object discovery and creation process?
thanks in advance,
George
|
|
|
|
|
Hello all,
I am getting error message:
Unhandled exception:Stack overflow.It is due to the declaration of too large array sizes.
But how can i overcame that problem
The code presented here is given below:
FILE *fp1,*fp2,*fp_write,*fpw,*fp_col;
int width,height;
int buffer,buffer1,buffer3;
int k=0,p=0;
unsigned int blueValue=0,redValue=0,greenValue=0;
unsigned int grayValue=0;
unsigned char *pChar;
unsigned char someChar;
long int iHist[256];
float hist[256];
long int total_pixels=0;
int col[257499];
int C[561][459];
int m=0;
fp1=fopen("D:\\Pictures\\mod.bmp","rb");
if(fp1==NULL)
{
printf("file doesn't open");
return;
}
fseek(fp1,1078,SEEK_SET);
k=0;
while(!feof(fp1))
{
fread(&buffer,1,1,fp1);
col[k]=buffer;
k++;
}
int i=0;
int j=0;
k=0,m=0;
for(m=0;m<258878;m++)
{
C[i][j]=col[k];
j++;
k=k+561;
if((j%459==0) &(j!=0))
{
i=i+1;
k=i;
j=0;
}
if(i>561)
break;
m++;
}
Regards
|
|
|
|
|
your loop seems to exceed the array boundarys.
any way,
debug it and see.
how ever arrays of that size are not suggested.
please tell me your idea behind the algo, such that, i can suggest you something.
|
|
|
|
|
Probally too big static variables.
take a look at this thread (yesterday)
stack vs heap[^]
Russell
|
|
|
|
|
Maynka wrote: int col[257499];
int C[561][459];
In addition to Russell's reply...
These too arrays are WAY to big for a typical stack: 2,059,992 bytes!!
You'll probably want to allocate thes on the heap
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Hi,
Thanks for your reply.How can i allocate variables on heap in VC++.
Regards,
Mayank
|
|
|
|
|
You can use the new operator...
See this[^] thread for more info.
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Hi,
I'm currently trying to implement a pan function for panning images which are displayed in a picture control area (drawing with GDI+).
I've managed to change the mouse cursor, it should be a hand when the cursor is over the picture control and an arrow everywhere else. A part of that seems to work. I check if the mouse position is inside the area of the picture control but somehow the area "thinks" it's startpoint (upper left) is located @ x: 0 y: 0; in fact it is placed somewhere in the middle of the dialog box.
Here is the snippet:
void CTrackAndTraceDlg::OnMouseMove(UINT nFlags, CPoint point)
{
HCURSOR hcur = NULL;
CRect rc;
m_pictureControl.GetClientRect(&rc);
rc.NormalizeRect();
POINT MousePosition = point;
BOOL isOnPictureControl = PtInRect(&rc, MousePosition);
if(isOnPictureControl && m_bPicLoaded && hcur == NULL)
{
hcur = LoadCursor(AfxGetApp()->m_hInstance,(LPCTSTR)IDC_CUR_PAN);
SetCursor(hcur);
}
else
{
SetCursor(AfxGetApp()->LoadStandardCursor(IDC_ARROW));
hcur = NULL;
}
CDialog::OnMouseMove(nFlags, point);
}
As you see I get the rectangle from the m_pictureControl (which is a var for the Picture Control on the dialog). But why it gives back the wrong x,y -> the rc.Width and rc.Height are correct.
Any ideas?
Thx, Shi
|
|
|
|
|
can u just put your query into different words such that, they are more cleaar to understand?
|
|
|
|
|
in short:
- I'm using a Picture Control on my Dialog
- It's placed in the middle of the Dialog
- I'm getting the position and dimension of the Picture Control with "CRect rc;" AND "m_pictureControl.GetClientRect(&rc);"
- When I Debug I see that the position of the "rc" is TOP: 0 LEFT: 0 -> Why that, I can clearly see it's not on that Postion of the Dialog.
-> So while this gives me back the "wrong" information about the location, I cannot properly use my pan function (draging image to move it).
Hope that made it a bit clearer
Shi
|
|
|
|
|
that 0,0 you are seeing is that of the control with respect to itself not with respect to the dialog.
but my doubt is how you cn write your logic to pan that image using the picture control.
how ever,
i have my own Active X control, which can take a large bitmap and has the feature of panning.
|
|
|
|
|
can any body tell me where to get msi.lib
thanks
himanshu p.taunk
|
|
|
|
|
|
I have generated this using my version of atlmime.h:
Date: Mon, 3 Sep 2007 14:03:05 +0800
Subject: TestCase1
X-Priority: 3
From: tdelavin <tdelavin@redmaptest.net>
To: User1 <user1@redmaptest.net>
CC: User2 <user2@redmaptest.net>
Message-ID: <ED831DF63867FA4798271894F09D74343C6D1CC461@winsvrpdc.redmaptest.net>
MIME-Version: 1.0
Content-Type: multipart/mixed;
boundary="------=_Next_Part_0021353203.467"
--------=_Next_Part_0021353203.467
Content-Type: multipart/related;
boundary="------=_Next_Part_0021353687.334"
--------=_Next_Part_0021353687.334
Content-Type: text/html;
charset="Windows-1252"
Content-Transfer-Encoding: 8bit
<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40">
content removed
--------=_Next_Part_0021353687.334
Content-Type: application/octet-stream;
charset="Windows-1252"
name="RE URGENT follow up required FW Still open tickets - 15910 16035 15686.msg"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
filename="RE URGENT follow up required FW Still open tickets - 15910 16035 15686.msg"
0M8R4KGxGuEAAAAAAAAAAAAAAAAAAAAAPgADAP7/CQAGAAAAAAAAAAAAAAACAAAAAAAAANAEAAAA
EAAAEQAAAAIAAAD+
content minimized
--------=_Next_Part_0021353687.334
Content-Type: image/jpeg;
charset="Windows-1252"
name="image003.jpg"
Content-Transfer-Encoding: base64
Content-Disposition: inline;
filename="image003.jpg"
Content-ID:<image003.jpg@01C7D464.924CE700>
/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAoHBwgHBgoICAgLCgoLDhgQDg0NDh0VFhEYIx8lJCIf
IiEmKzcvJik0KSEiMEExNDk7Pj4+JS5ESUM8SDc9Pjv/2wBDAQoLCw4NDhwQEBw7KCIoOzs7Ozs7
content minimized
--------=_Next_Part_0021353687.334
Content-Type: image/gif;
charset="Windows-1252"
name="image004.gif"
Content-Transfer-Encoding: base64
Content-Disposition: inline;
filename="image004.gif"
Content-ID:<image004.gif@01C7D464.924CE700>
R0lGODlhfAA0AHcAMSH/C01TT0ZGSUNFOS4wDQAAAAFzUkdCAK7OHOkAIf8LTVNPRkZJQ0U5LjAX
AAAAC21zT1BNU09GRklDRTkuMEI8pPUAIf8LTVNPRkZJQ0U5LjAVAAAACXBIWXMAAA7DAAAOwwHH
content minimized
--------=_Next_Part_0021353203.467--
Thanks again
|
|
|
|
|
I'm a fourth year student and I've a project about PDA programming like skype.
I decide to implement with c++ and I have to use SIP Protocol to create session between endpoints
so that's a problem>>> I don't know what Library I should use (I can't find any library ). I found RTC(Real Time Communication) of Microsoft but I'm not sure that it's can use for PDA
or anyone who can give me an example code about register to SIP server or any book about SIP programming.
please help me...T-T
wimut
|
|
|
|
|
Hello
Assuming my projects workspace is present in the path "C:\myfolder\myproject" as myproject.dsw, how do we include the paths for a .h file in the following scenarios,
1. Assume you have a file myproject.cpp at "C:\myfolder\myproject" and you want to include a .h file present in "C:\myfolder" and another .h file present in "C:\myfolder\myproject\library".
2. Assume you have a file myproject.cpp at "C:\myfolder" and you want to include a .h file present in "C:\myfolder\myproject" and another .h file present in "C:\myfolder\myproject\library".
3. Assume you have a file myproject.cpp at "C:\myfolder\myproject\library" and you want to include a .h file present in "C:\myfolder" and another .h file present in "C:\myfolder\myproject".
Thanx
|
|
|
|
|
know one logic i.e., "." refers to the current directory, and ".." refers to the parent directory.
so using above, you can use something like,
#include "..\another.h" or ".\library\something.h"
definately this will work.
|
|
|
|
|
In "Project properties" - "C/C++" - "General" - "Additional Include Directories" add ".." as the first entry.
Now, the cases are
1. #include "file1.h" and #include "library/file1.h"
2. #include "myproject/file3.h" and #include "myproject/library/file4.h"
3. Here, instead of ".." a name from the MACROS would be appropriate" $(InputDir) prossibly.
Then #include "myproject/file5.h" and #include "myproject/library/file6.h"
Though I speak with the tongues of men and of angels, and have not money, I am become as a sounding brass, or a tinkling cymbal. George Orwell, "Keep the Aspidistra Flying", Opening words
|
|
|
|
|
Is there any preprocessor directive to set /Gz compiler option
|
|
|
|
|
I'm looking for good Gantt Chart library. Suggest me..
Thank you.
|
|
|
|
|
if you mean an active X control, then spell out your requirements and we shall develop one such control.
|
|
|
|
|
Your kindness is heartwarming
codito ergo sum
|
|
|
|