|
Hi Larsson :
I could not understand your meaning .But if you want to get the char when you click a certain key of keyboard ,you can use the message map to hook the key down message.
The example is in the following :
// you should ooverride the "PreTranslateMessage"
BOOL CMyClientDlg::PreTranslateMessage(MSG* pMsg)
{
// TODO: Add your specialized code here and/or call the base class
switch(pMsg->message)
{
case WM_KEYDOWN :
switch(pMsg->wParam)
{
case 'A': //add code here to get the char A break;
case 'B': //add code here to get the char B break;
case 'B': //add code here to get the char C break;
}
break;
case WM_KEYUP:
switch(pMsg->wParam)
{
case 'A': //add code here to get the char A break;
case 'B': //add code here to get the char B break;
case 'B': //add code here to get the char C break;
} }
break;
}
return CDialog::PreTranslateMessage(pMsg);
}
AntonlioX
|
|
|
|
|
how do you display the set password dialog for a given user via the command line or C++?
(control userpasswords, control userpasswords2 - doesn't go to a specific user)
|
|
|
|
|
I need to automatically add my snapin to compmgmt.msc using C++.
|
|
|
|
|
Using DirectShow I can display the property page, but I don't know how to actually change the values shown in program code.
|
|
|
|
|
For the standard video properties such as brightness,
contrast, saturation, etc you need to obtain a pointer
to the IAMVideoProcAmp interface ( Here[^] )
on your video capture filter and use the Set() / Get()
methods exposed on it.
e.g. (without error checking or clean-up)
Given a valid pointer to your IBaseFilter video capture
filter, m_pVideoCapture;
HRESULT hr;
IAMVideoProcAmp *m_pIVideoProcAmp;
hr = m_pVideoCapture->QueryInterface(IID_IAMVideoProcAmp, (void **)&m_pIVideoProcAmp);
m_pIVideoProcAmp->Set(VideoProcAmp_Brightness, m_nBrightnessValue, 0l);
"VideoProcAmp_Brightness" is one of the properties in the
VideoProcAmpProperty Enumeration :
( here[^] )
You will also need to use the GetRange() method
on the IAMVideoProcAmp interface to find the valid
range of values for each property.
Steve T
|
|
|
|
|
how do you tell if fast user switching is enabled in C++ code?
|
|
|
|
|
What do you want to do?
8bc7c0ec02c0e404c0cc0680f7018827ebee
|
|
|
|
|
During program installation I need to choose the install type depending on if the user is using the classic Gina interface or the fast user switching welcome screen for login.
|
|
|
|
|
This is a dynamic setting though. For example I could install your program, then join a domain on my Windows XP Pro machine. So you may want to detect at runtime if it is enabled when your gina is loaded.
LogonUI[^]
One way to tell would just be to find out if LogonUI is running or when it is run. LogonUI is the application that displays the full screen logon dialog, winlogon I believe should still be displaying the old dialog in Windows XP Pro when FUS is disabled.
The other thing to check is to make sure that Terminal Services/FUS Service is running, of course TS can be running even when FUS is disabled. So if you don't care about that part and are more worried about the graphical look then logonui is probably what you would want to check.
You may want to verify this but in any case I would suggest a dynamic check since the state of using FUS or not can change.
8bc7c0ec02c0e404c0cc0680f7018827ebee
|
|
|
|
|
This article[^] on the MSDN talks about the conditions under which fast user switching is available. It sounds like you could detect those conditions, and then assume that fast user switching is enabled.
If your application needs to know that users have changed, it's a lot simpler. Use WTSRegisterSessionNotification [^] to cause a window in your application to receive a message when the user has changed sessions.
Software Zen: delete this;
|
|
|
|
|
I need to generate a program database file containing my app's symbols when building in Release mode. I've modified the project settings to do this (/Zi ). However, I don't see the .pdb file when I build the app in Release mode. (It is being generated in Debug mode, as expected).
I know I've done this before but don't remember how I got it to work. Any idea what I'm missing?
Thanks!
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
1 Disable optimization
2 In the Link tab, select "Generate debug info"
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
Ravi Bhavnani wrote:
1 Disable optimization
2 In the Link tab, select "Generate debug info"
In 'Release mode'??
|
|
|
|
|
Yes, this is necessary in order to create a log file containing a stack trace in the event of a crash. I'm using PJN's CExceptionLogger[^] class.
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
You don't need to disable optimizations. Setting Program Database (/Zi) for the compiler and "generate debug info" for the linker, will do.
--
jlr
http://jlamas.blogspot.com/[^]
|
|
|
|
|
you have debug infos in release mode ?
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
|
toxcct wrote:
you have debug infos in release mode ?
Yes, you can have debug info, even in release mode.
--
jlr
http://jlamas.blogspot.com/[^]
|
|
|
|
|
no need to post when ravi already told me that 8 hours ago, especially if you don't provide much information...
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
Jose Lamas Rios wrote:
You don't need to disable optimizations.
You need to disable optimization in order to make the exception logger generate accurate line numbers into your source code.
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
hi!
can anybody tell me how can i crate chjeckbox at run time
i have coded this but give me error
<br />
CButton *b1;<br />
CRect rect;<br />
int no,i;<br />
no=1;<br />
i=0;<br />
b1=new CButton; <br />
rect.SetRect(i+20,20,400,i+20);<br />
b1.Create(name,WS_CHILD | WS_VISIBLE | BS_CHECKBOX | BS_AUTOCHECKBOX,rect,&m_Stat,no);<br />
no++;<br />
i+=10;
|
|
|
|
|
What was the error? Kind of makes it hard to narrow down to the problem without a little help.
That said.... b1.Create should be b1->Create
HTH
Brad
|
|
|
|
|
softtec wrote:
i have coded this but give me error
Error? What error?
softtec wrote:
CButton *b1;
b1=new CButton;
Are you storing this b1 pointer somewhere else so as to delete it when it's no longer needed?
softtec wrote:
int no,i;
no=1;
i=0;
rect.SetRect(i+20,20,400,i+20);
b1.Create(name,WS_CHILD | WS_VISIBLE | BS_CHECKBOX | BS_AUTOCHECKBOX,rect,&m_Stat,no);
no++;
i+=10;
You are setting rect as left=i+20, top=20, right=400, bottom=i+20.
Assuming that's inside some loop, in the first iteration (when i==0), that means width=380 (i.e.: 400-20) and height=0 (i.e.: 20-20). In the second iteration (i==10), that means width=370 (i.e.: 400-30) and height=10 (i.e.: 30-20). In each iteration, the width is 10 pixels less (starting from 380), and the height is 10 pixels more (starting from 0).
--
jlr
http://jlamas.blogspot.com/[^]
|
|
|
|
|
Variable b1 cant be a local variable .
This belaw sample work successful .
CButton *b1;
void Create()
{
b1=new CButton;
int no,i;
no=1;
i=0;
rect.SetRect(i+20,20,400,i+20);
b1.Create(name,WS_CHILD | WS_VISIBLE | BS_CHECKBOX | BS_AUTOCHECKBOX,rect,&m_Stat,no);
no++;
i+=10;
}
or
void Create()
{
static CButton *b1;
b1=new CButton;
int no,i;
no=1;
i=0;
rect.SetRect(i+20,20,400,i+20);
b1.Create(name,WS_CHILD | WS_VISIBLE | BS_CHECKBOX | BS_AUTOCHECKBOX,rect,&m_Stat,no);
no++;
i+=10;
}
|
|
|
|
|
Hello All!
I am working on image processing and using the library CImg. Constructor of CImg is used to load the image file (.bmp etc)...
Problem is that when the destructor of CImg Object is called, it doesnt release the full memory.
e.g if i load an image of 225kb...CImg creates an object of 20kb and release 20 kb when destructor is called. 220kb are left unreferenced in the memory.
This is causing hell of problem as i want to process 10-15 images per second.
Plz help me in this regard.
Regards
Mubashir
|
|
|
|