|
Hi ppl.
I have this c++ class and i want to make it available to my vb app.
I need a good COM tutorial. (Net is full of CRAP).
All methods in my class are static.
Thx.
|
|
|
|
|
How can I get the dimension of the secondary display in windows xp?
GetSystemMetrics(SM_CXSCREEN) and GetSystemMetrics(SM_CYSCREEN) give me the primary screen dimension, but there is no way I can get the secondary display with GetSystemMetrics.
I can get all the virtual display dimension with SM_CXVIRTUALSCREEN and SM_CYVIRTUALSCREEN parameters, but this do not solve my problem.
Any tips?
Regards
Bernardo Faria
|
|
|
|
|
Hi
What is correct procedure for sending F5 key or left arrow key?
SendMesage(hwnd,WM_CHAR,?,?) or SendMesage(hwnd,WM_KEYDOWN,?,?)
Tomaz Rotovnik
|
|
|
|
|
Tomaz Rotovnik wrote:
What is correct procedure for sending F5 key or left arrow key?
None of these actually. Use keybd_event WIN32 API function instead. And if you are using Windows 98 or later, use SendInput for this purpose.
Gurmeet S. Kochar
If you believe in God, it's because of the Devil
|
|
|
|
|
|
I have a control I created from a CWnd that contains an edit control and a button.
What I am trying to do is allow a user viewing a screen with this control and other controls to tab through the controls. When the custom control containing the edit control and the button gets focus I want the focus to go to the edit first and then the button when tab is pressed again.
I can make it give the edit control focus but when I hit tab again my custom control loses focus and the button does not get focus.
Any suggestions or examples would be appreciated.
|
|
|
|
|
Does the button follow the edit control in the z-order?
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
Yes, it does.
Thank you for your response. I did a little more research and found the answer to my riddle. I used PreTranslateMessage() to capture the tab button being pressed and then I set focus to the child controls of my control accordingly.
|
|
|
|
|
Hi,
I recently started learning pure C++ and want to know what does "rhs" mean?
For example:
class MyClass
{
public:
MyClass& operator=(const MyClass& rhs);
};
I've investigated that "rhs" is frequently-used in operator overloaders in C++ classes. What is "rhs"? May I use another word (for example, "dog") instead "rhs"?
Sorry for stupid question.
Yours sincerely,
Alex Bash
|
|
|
|
|
rhs = Right Hand Side. And yes, you can use anything you want, but rhs is normally used because it does a good job of describing the fact that the parameter will be on the right hand side of the = sign.
Tim
|
|
|
|
|
hi,
"rhs" is just the name of the input parameter, you can also use "cat" if you want, but only if you like cats
Have a nice day!
hph
|
|
|
|
|
Hi !
I need to design a class that will encapsulate an ActiveX object (a chart control). I want to put these files (the .h and the .cpp files) in a library common to all of my projects so I can reuse this class.
The problem is that the files for the ActiveX object need to be in the project directory (I use Add To Project->Components and Control to add the ActiveX to my project).
Is there a macro that I can use like the following way:
#include "CURRENT_PROJECT_DIRECTORY\CChart.h"
in order to access the current project directory from a file within my library ??
The files for the ActiveX cannot be copied in the library. Any idea ??
|
|
|
|
|
Hello,
can someone tell me the meaning of the SYNCHRONIZE flag which can be used in OpenProcess ?
Thanks in advance!
|
|
|
|
|
This flag allows you to use the process handle in any of the wait functions to wait for the process to terminate. BTW, it is available in Windows NT/2000 or later only.
Gurmeet S. Kochar
If you believe in God, it's because of the Devil
|
|
|
|
|
Hi there
I am in need for the following information.
1. Any specific link where i can find info for writing Device-Drivers on Win NT.
2. Link where PCI bus access on Win NT is explained.
thanks in advance...
Bhaskar...
___________________________
When a thing is new, people say, "It's not true." Later, when its truth becomes obvious, people say, "It's not important." Finally, when its importance cannot be denied, people say, "Well, it's not new."
|
|
|
|
|
Hey there everyone,
I am a new member of the forum and relatively new to MFC. What I like to know how to create a graphical background and button.
If anyone can gave a specific example or link that will help, it will be very apperciated.
Thanks,
|
|
|
|
|
See if either of these help:
http://www.voidnish.com/articles/ShowArticle.aspx?code=bmpdlg01
http://www.flounder.com/bitmapbutton.htm
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
Hello all!
I have a project designed with the MFC document/view architecture. In the App idle time I read some data from a data source (I call a function of my doc class). This data will be displayed in a chart.
But I need also to make some computation on this data but I want to make this in a separate thread (the computation take some times and it cannot stop the reading of the data).
When I start the new Thread, I pass a pointer to my document so it can access data and the data will be stored in a buffer (FIFO buffer).
I was wondering if this is safe to do such a thing ?
Something like that:
BOOL CMyAppDoc::idle()
{
pFIFOBuffer->AddData(Data);
}
And in the thread function:
pMyDoc->ComputeData();
void CMyAppDoc::ComputeData()
{
while (TRUE)
if (pFIFOBuffer->GetData(Data))
ProcessData(Data);
}
Thanks
|
|
|
|
|
Some tips:
You must use code to protect multiple multithreading access to any shared data, like critical sections:
CRITICAL_SECTION cs;
InitializeCriticalSection( &cs );
...
EnterCriticalSection( & cs );
shared data access
LeaveCriticalSection( & cs );
You can also use Event primitives to signal end processing, like: CreateEvent, SetEvent, ResetEvent and WaitForSingleObject.
Good luck
GuimaSun
www.nexsun.com.br
|
|
|
|
|
Thanks !
Yes I think I will use the critical section, that's easy to use and fit perfectly with my needs.
Thanks
|
|
|
|
|
Hi,
I want to put in a site links that would start my application. Something like yahoo has in the profile pages:
ymsgr:sendIM?yahoouser
I know how to make a handle that will send the call to my app using something like myapp:command?parameter but what do I have to do in my app to catch that command and get the parameter?
Thanks
-----
We are what we repeatedly do. Excellence, then, is not an act, but a habit.
|
|
|
|
|
Hi
I would like to palce a check mark for menu item, if user clicks a menu item. I would like to do this from CMainFrm class.Can u please give me an idea?
Thanks
JP
|
|
|
|
|
You have to have a function that would execute the code when the users selects the menu item.
Let's say it's
ON_COMMAND(ID_YOURMENUITEM, TestFn)
Maybe you want to use a global variable that will tell you the state of that item.
bool testVar;
void TestFn() {
CMenu *m_MainMenu;
// let's say you have your menu in m_MainMenu
if (testVar) {
testVar = false;
m_MainMenu->GetSubMenu(1)->GetSubMenu(x)->CheckMenuItem(n, MF_BYPOSITION | MF_UNCHECKED);
} else {
testVar = true;
m_MainMenu->GetSubMenu(1)->GetSubMenu(x)->CheckMenuItem(n, MF_BYPOSITION | MF_CHECKED);
}
}
where n is the position of your item in the menu
-----
We are what we repeatedly do. Excellence, then, is not an act, but a habit.
|
|
|
|
|
Hey
In above example, m_MainMenu is unreferenced..so that code is not working. How to attach my Mainmeu to this?
Thanks
JP
|
|
|
|
|
I told you that m_MainMenu is your menu. You will have to replace it with your variable.
If it's the apps menu then you have to do something like this
m_MainMenu = GetMenu();
-----
We are what we repeatedly do. Excellence, then, is not an act, but a habit.
|
|
|
|