|
hi,
I am facing a problem in making arrow keys working for cpropertysheet in MFC in VC++ for help button only the tab key works there. what is the reason for arrow key being inactive. and how to resolve this problem???
Kartik
|
|
|
|
|
Is ur parent window is an activex control. If yes, then it will not work as expected. The problem is the ActiveX control doesn't own the message pump. The message pump is owned by the container application. Therefore, all the keystroke messages are taken by the container application and not dispatched to the modeless dialog box or propertysheet window.
Install a Windows WH_GETMESSAGE hook for the modeless dialog box/propertysheet derived class to allow it to intercept keystrokes and handle accelerators.
Bye
Cool Ju
|
|
|
|
|
hi ju,
my application is not an activeX control....
so how can i make the arrow key move on the help button...
thanks in advance....
|
|
|
|
|
Hi guys,
I am sick of GetPixel() . It is terribly slow.
Any alternative...
Owner Drawn
--Nothing special
|
|
|
|
|
use DIB-Sections and write your own GetPixel replacement which accesses the bitmap-bits directly.
James
http://www.catch22.net
|
|
|
|
|
Hi,
In my program, there is a worker thread. The main thread must be blocked when the worker thread is running.
But I can't use WaitForSingleObject() because the worker thread will send winodws messages to main thread. So message loop is neccessary.
Also when the worker thread is terminated the main thread should continue...
What will be the best solution?
Thank you.
- NS -
|
|
|
|
|
I feel you will have to disable all the controls which you dont want to generate any events on the user interaction, while your worker thread is processing. After the work is done send a message from the workerthread and from that handler enable all those disabled controls.
suhredayan
|
|
|
|
|
Thank you for the replay.
I can solve it by using MsgWaitForMultipleObjects() API.
- NS -
|
|
|
|
|
Why would you want to use a worker thread if you main thread just sits idle while the worker runs? To me it sounds like you could just as well use the main thread to do the worker's job.
Cheers
Steen.
"To claim that computer games influence children is ridiculous. If Pacman had influenced children born in the 80'ies we would see a lot of youngsters running around in dark rooms eating pills while listening to monotonous music"
|
|
|
|
|
Because I use multiple desktops in my program. I have to show a message box in another desktop. So I have to create a thread and assign the desktop by SetDesktopThread() API.
- NS -
|
|
|
|
|
Oh, I see.
Cheers
Steen.
"To claim that computer games influence children is ridiculous. If Pacman had influenced children born in the 80'ies we would see a lot of youngsters running around in dark rooms eating pills while listening to monotonous music"
|
|
|
|
|
Hi all
I am working on a backup tool, here most of the work has been finished, now I have been stucked in a problem which is as follows:
While taking backup of files, want to make a file with any extetension( like .stl or .bkf etc. ), now after taking backup when user open this file( like main.STL) then my application should be opend.
Also this time when application is opened then it should contain the description of all the activities that has been taken for backup of that very task.
I hope my problem would be clear to you. better if geve some code snippets.
(Infact when files with unknown extension is opened then windows dialog for "Choose any program" is prompted)
Please help me.
Thanks.
|
|
|
|
|
|
One more thing..
How can I bring my application under the list of "Open with -> choose program " list of apllications, as there are many application in that list ( e.g. MS Word, notepad, WinZip etc.).
Please reply.
Thanks
|
|
|
|
|
Did you try restarting the machine after you created the regisry entries specified in the earlier article?
If it still doesn't work after restarting maybe you should follow the instructions in the following article
http://www.winguides.com/registry/display.php/1135/[^]
|
|
|
|
|
Hi,
I have a task, where i need to traverse the items of a tree by pressing the ctrl key with up arrow and down arrow and on clicking ctrl+space bar i shall select the items.
I could select the first item in a tree with Ctrl+left mouse click.The Functionality for selecting the items with ctrl+mouse has already been implemented.
when I press Ctrl+down/up arrow i want the item to be focussed(the thin border that appears) but not selected and it should be selected only when i press ctrl+space bar.
And upon on pressing the the ctrl+down arrow more than two times and selecting another item with ctrl+spacebar , is there any function with which i can get the first selected item so that i can store their information .
Thanks
|
|
|
|
|
I have code like this:
class A
{
};
class B:public A
{
public:
CString m_b;
};
class C
{
A p_A ;
C(){p_A = new B();};
~C(){delete p_A;};
void fun()
{
AfxMessageBox(p_A->m_b);
};
}
how can I access the members of B from the pointer of A?
Thank you very much!!!
-------------------
I am learning C++ and English
|
|
|
|
|
One problem with your code is the statement
p_A = new B(); is incorrect since p_A is not declared as a pointer variable.
So p_A should be declared as A * p_A
Then you can use type casting to change the object of type A to a object of B before accessing the member variable m_b
So the correct version of the code is as follows
class A<br />
{<br />
};<br />
class B:public A<br />
{<br />
public:<br />
CString m_b;<br />
B(){<br />
}<br />
<br />
};<br />
<br />
class C<br />
{<br />
public :<br />
A* p_A ;
C(){<br />
p_A = new B();<br />
}<br />
~C(){<br />
delete p_A;<br />
}<br />
<br />
void fun()<br />
{<br />
AfxMessageBox(((B*)p_A)->m_b);
}<br />
};
|
|
|
|
|
the ending cast you make in the message box is not necessary...
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
You may want to reflect on that statement a bit.
[EDIT]
toxcct : the ending cast you make in the message box is not necessary...
I don't know why this was voted 1.
I was trying to (politely) point out that this is incorrect.
You do need the cast.
[/EDIT]
...cmk
Save the whales - collect the whole set
-- modified at 2:41 Wednesday 16th November, 2005
|
|
|
|
|
hello,
how do i copy a selected part of a view to another view using mfc....(if i use a mouse to select a part of view using a mouse the selcted part should be displayed on another view (inside a dialog box))
yog
|
|
|
|
|
Hi,
I'm using a CDialogBar in my App, but i have a problem using it (CDialogBar) :
when i add a button to my DialogBar Resoure.
When i run my app, buttons on my CDialogBar always apear disabled (I'm sure that i have not change the state Visible or Disable).
when i debug to see if they are disabled or not , i found that they are not disabled
BOOL b = GetDlgItem(IDC_MY_BUTTON)->IsWindowEnabled();
result (b = TRUE) but visualy button is Disabled !!!!!!!!!!!!
this happen just with buttons.
INew.
thanks a lot.
inew
|
|
|
|
|
I think "enabled" means it's visible, not that it is interactable with the user. When I want to hide controls, I use their EnableWindow() method to make them invisible.
|
|
|
|
|
|
Hi every one,
I'm a new commer. I'm doing a project about the fingerprint system. I have a sensor ( MBF200 ) to capture the fingerprint image and send it to my PC via COMPort. The data which is sent from sensor is a matrix of 256 rows and 300 columns, in which each elements is one byte ( gray scale value ) with a range from 0 to 255. This sensor only can take a gray image ( not a color Image ).
Now, I want to write a program for receiving that data, save that image in BMP format ( *.bmp ) and show it on the PC screen. I'm using Visual C++ lanuage and the MSCOmm control for accessing to Comport. My operating system is microsoft Windows 98 ( Second edition ). How can I do that ? Please help me !
Thank you.
|
|
|
|