|
thanks for your reply.
I saw a nice article regarding this.
http://www.codeproject.com/gdi/custom_pattern_brush.asp
Once again thanks for ur reply
SaRath
|
|
|
|
|
Hi,
My Application is Dialoged based Application
My application will be launched by another application using ShellExecute().
As it will start running it will have no user interaction that means user will manualy not trigger any event like clicking on button or so.
My application will display only data in some listbox or in MultiEdit box countiniously. ( basicaly its purpose is to show data/results)
As the dialog will cross OnInitDialog then it will wait for user's interaction , but in my application user has no interaction.
Can I handle this all in OnInitDialog() before returning of this method. Is it a right approach
OR Is there any other way to handle it .
thanks
Regards.
|
|
|
|
|
zahid_ash wrote: As it will start running it will have no user interaction that means user will manualy not trigger any event like clicking on button or so.
I think this will solve by setting the Dialog Style as 'Disabled'
Knock out 't' from can't,
You can if you think you can
|
|
|
|
|
Would the setting to Disable will run the calculation menthods by itself,
I think I have to call them some where in the application,
Regards.
|
|
|
|
|
zahid_ash wrote: Would the setting to Disable will run the calculation menthods by itself
Have you tried that?
Knock out 't' from can't,
You can if you think you can
|
|
|
|
|
Yes I have tried, The disabled property not allows the user to interact with mouse.
but how can i run my caluclation methods now that will show result in the controls
Regards.
|
|
|
|
|
zahid_ash wrote: ut how can i run my caluclation methods now that will show result in the controls
Via Window Message!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
zahid_ash wrote: As the dialog will cross OnInitDialog then it will wait for user's interaction , but in my application user has no interaction.
Can I handle this all in OnInitDialog() before returning of this method. Is it a right approach
OR Is there any other way to handle it .
Very bad. A particular function is made for a purpose and let it be for that only.
What you can do is create a callback function for your application which will be a member function of this dialog. Whenever you wish to update call this function from the application that triggers this dialog.
Nibu thomas
Software Developer
Programming Tips[^]
|
|
|
|
|
What is the right way to right the callback ,
and how can I call it from that application , that application is written in Visual Basic 6.
Regards.
|
|
|
|
|
zahid_ash wrote: and how can I call it from that application , that application is written in Visual Basic 6.
A more appropriate place would be VB forums, since they would be knowing more on this subject.
Nibu thomas
Software Developer
Programming Tips[^]
|
|
|
|
|
zahid_ash wrote: My application will display only data in some listbox or in MultiEdit box countiniously
Sounds like you want something running on a timer. In OnInitDialog call SetTimer(), then do the updating of the list box in your OnTimer() handler.
Your dialog will not be displayed until after the OnInitDialog function has exited, so doing any of this processing there will not work.
You may be right
I may be crazy
-- Billy Joel --
Within you lies the power for good - Use it!
|
|
|
|
|
Seems correct to me
If i call the SetTimer() and in Ontimer Event i will call the method the kill the timer.
would that method continue till its end even the timer has been killed .
Regards.
|
|
|
|
|
zahid_ash wrote: would that method continue till its end even the timer has been killed
Nope!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
hi
I want to get the following details of my system in VC.
1)Processor config(eg:233 Mhz)
2)RAM size
3)Display Adapter
4)Monitor Resolution
5)CDROM Drive,Keyboard,Network Card etc
I need this details on Win XP & Win 2000.
Which API gives list of all these details including RAM Size??
"Every morning I go through Forbes list of 40 richest people in the world. If my name is not in there, I go to work..!!!"
|
|
|
|
|
QuickDeveloper wrote: hi
I want to get the following details of my system in VC.
1)Processor config(eg:233 Mhz)
2)RAM size
3)Display Adapter
4)Monitor Resolution
5)CDROM Drive,Keyboard,Network Card etc
I need this details on Win XP & Win 2000.
Which API gives list of all these details including RAM Size??
For Monitor resolution use GetSystemMetrics .
For Memory use GetMemoryStatus .
For Processor use GetSystemInfo .
Well the only complete answer for all of them is WMI . WMI gives in depth details for each of them.
Nibu thomas
Software Developer
Programming Tips[^]
|
|
|
|
|
Nibu thomas wrote: WMI gives in depth details for each of them
could you give me some links or Sample Code which uses WMI..
Thanx for the reply
"Every morning I go through Forbes list of 40 richest people in the world. If my name is not in there, I go to work..!!!"
|
|
|
|
|
QuickDeveloper wrote: could you give me some links or Sample Code which uses WMI..
There are plenty of samples. Go google.
Nibu thomas
Software Developer
Programming Tips[^]
|
|
|
|
|
|
NiceNaiduChk Dis :
http://www.codeguru.com/Cpp/W-P/system/article.php/c5773[^]
But why to me...
Nibu thomas
Software Developer
Programming Tips[^] My site[^]
|
|
|
|
|
Nibu thomas wrote: But why to me...
he forget that
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
Hi,
I have developed a dialog base application with some control on this as:
Static Frame, Button, TextBox, ComboBox,
I had render the image on the static frame and used Key Up, Key Letf, Key Right and Key Down to control this image.
But while I pressed the key to control left, right or down, up, I see that mouse cursor still focus on the Button, TextBox, and ComboBox, It maybe make the data change that I have not wanted in this case, so I need to want to let cursor focus just only on static frame image and do not let focus mouse cursor with the orther control on main dialog.
Please help me with this.
Thank in advance!
|
|
|
|
|
huutribk2001 wrote: I had render the image on the static frame and used Key Up, Key Letf, Key Right and Key Down to control this image.
But while I pressed the key to control left, right or down, up, I see that mouse cursor still focus on the Button, TextBox, and ComboBox, It maybe make the data change that I have not wanted in this case, so I need to want to let cursor focus just only on static frame image and do not let focus mouse cursor with the orther control on main dialog.
Please help me with this.
Can you be more specific. It's not clear from your description what you want.
Is the static control not gaining input focus? What is the ID of the static control. Is it IDC_STATIC well if it is then change it to something else and set SS_NOTIFY style on.
Nibu thomas
Software Developer
Programming Tips[^]
|
|
|
|
|
Yah, Sorry for not clearly to you.
I have the main dialog with ID: IDD_TEST_DIALOG
On this i added some control bellow:
a button: IDC_BUTTON1
a combo box: IDC_COMBO_MON1
two radio button: IDC_RADIO_CHECK_ANTI_ON and IDC_RADIO_CHECK_ANTI_OFF
a Text Box: IDC_FILE_EDIT
and a Static Frame IDC_IMAGE
Now, I have implemented a call back function to control the image by pressing the key as Key Up, Key Down, Key Right and Key Left.
It work well but while I press the key I see that the mouse cursor is focus on Button, then continue to change to the other control as TextBox, combo box or radio button if I still press Key Left or key right.
So, I want to do not let the mouse cursor focus on all the Control above on the main dialog while I press Up, Down, Left, Right key to control my image.
Please help me again!
Tx - Tri
|
|
|
|
|
huutribk2001 wrote: So, I want to do not let the mouse cursor focus on all the Control above on the main dialog while I press Up, Down, Left, Right key to control my image. Please help me again!
I guess you can remove WS_TABSTOP style from other controls. Of course this disables using tab and sometimes arrow keys.
You can also do this using the resource editor. There must be an option for tabstop .
Or another option is to override PreTranslateMessage to disable this behavior if input focus is on your control.
Nibu thomas
Software Developer
Programming Tips[^]
|
|
|
|
|
hi ..
Im doing a multithreaded program (in borland c++ builder.. I know that this place is for VC++ but a have no other place to go and I trust the knowladge of the ppl in this site..)that communicate with a modem via serial port.. my program takes characters from Edit1 then writes it to the buffer
strcpy( cp2, Edit1->Text.c_str() );<br />
WriteABuffer(m_hCom,cp2,strlen(cp2));
the problem is that there is something wrong with this ..I use a serial port spy program to monitor the serial port..now when I end an "AT command" like "AT", I send is like this "AT\r" but is show me this
[22/05/2006 10:18:25] - Written data<br />
<br />
41 54 5c 72 AT\\
but when I assign cp2 = "At\r"; it works!!
cp2 = "At\r"; <br />
WriteABuffer(m_hCom,cp2,strlen(cp2));
it shows :
[22/05/2006 10:24:53] - Written data<br />
<br />
41 54 0d AT.
which is right and the modem will respond by sending "ok".
"Edit1->Text" is AnsiString and "Edit1->Text.c_str()" is used to get the string from it..
Im using standerd writeFile ReadFile functions..
how can I solve this problem..I need to type commands in the Edit1 box so I can deal with the port while my program is running ..can you help please??
|
|
|
|