|
ThatsAlok wrote: Tom Moore wrote:
Okay ive done my subclass, how do i bind it to the static box in my dialog?
Add Variable for particular Static Control. If you class doesn't appear add variable Wizard the Manully Modify DDX_Control Block for your variable
That was easy in Visual C++ 6, but im using Visual Studio 2003.
I goto the Add Variable and the class isnt in the combobox.
I then looked for the DDX_Control Box, but i dont think Visual C++ 7 includes that.
Any Ideas
|
|
|
|
|
I have a dialog box were i have few parameters to be
displayed at certain interval from a etherenet connection .
I am using the SetTimer(); ]
i set the time interval for about 2 minutes but the dialog
box doesnot respond to anyother events inbetween .There is
another command button but i am not able to click on it inbetween.
Is there any solution like as in VB ther is DoEvents for similar
situations.
thank you
Vikas Amin
Embin Technology
Bombay
vikas.amin@embin.com
|
|
|
|
|
Maybe the app is collapsed by the commands executed in the timer. Try to execute them in a sepparate thread.
Marc Soleda.
... she said you are the perfect stranger she said baby let's keep it like this... Dire Straits
|
|
|
|
|
vikas amin wrote: I am using the SetTimer(); ]
i set the time interval for about 2 minutes but the dialog
box doesnot respond to anyother events inbetween .
This is not normnal behavior. What is the code doing after calling SetTimer() ?
"Take only what you need and leave the land as you found it." - Native American Proverb
|
|
|
|
|
vikas amin wrote:
I am using the SetTimer(); ]
i set the time interval for about 2 minutes but the dialog
box doesnot respond to anyother events inbetween .
This is not normnal behavior. What is the code doing after calling SetTimer()?
on the timer event which fires the SetTimer()
it calls a function which sends a some reqest data to a embedded device
& gets the data from the device . this process can take maximum 10 seconds.
Later on this data is displayed on the DialogBox
Vikas Amin
Embin Technology
Bombay
vikas.amin@embin.com
|
|
|
|
|
The timer callback runs on the UI thread, which means that for the time the callback runs, the UI will not respond. Maybe that explains your problem.
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
vikas amin wrote: on the timer event which fires the SetTimer()
it calls a function which sends a some reqest data to a embedded device
& gets the data from the device . this process can take maximum 10 seconds.
You should not be doing such time-intensive things in the timer-handling function. Fire off another thread to do that stuff so that the timer-handling function can get in and out in a fraction of a second.
"Take only what you need and leave the land as you found it." - Native American Proverb
|
|
|
|
|
Hello everybody,
I'm having some difficulties using functions from the dbhelp library (I guess it's not very surprising when you see how it's documented...).
Here's what I need to do:
I want to be able to get symbols names and adresses in a running application from its pdb file.
And this is what I do:
I run toto.exe (E:\toto_Debug\toto.exe)
While the process is running, in my debuger I do:
Get process handle (hProcess)-> use it in SymInitialize(hProcess,NULL,false))
(returns ok)
The I try to load the pdb file: (me32 is the module corresponding to toto.exe, I'm not sure of this step)
SymLoadModule64(hProcess, NULL, "E:\\toto\\Debug\\toto.pdb", NULL, (DWORD64)me32.modBaseAddr, 1090560)
(returns ok)
and then I try to get a symbol from its name:
char szSymbolName[MAX_SYM_NAME];<br />
ULONG64 buffer[(sizeof(SYMBOL_INFO) +<br />
MAX_SYM_NAME*sizeof(TCHAR) +<br />
sizeof(ULONG64) - 1) /<br />
sizeof(ULONG64)];<br />
PSYMBOL_INFO pSymbol = (PSYMBOL_INFO)buffer;<br />
<br />
lstrcpy(szSymbolName, "main");<br />
pSymbol->SizeOfStruct = sizeof(SYMBOL_INFO);<br />
pSymbol->MaxNameLen = MAX_SYM_NAME;<br />
<br />
SymFromName(hProcess, szSymbolName, pSymbol);
And the application crashes...(access violation).
Ok, questions now:
What is wrong in what I'm doing? I heard pdb files are handled is a strange way:
_does the dbgHelp library tries to find the pdb file itself in the same directory than the executable?
_Do you really have to call the SymLoadModule64 function or do you simply have to call SymInitialize with more appropriate parameters?
_If you really have to call SymLoadModule64, how do you get the module base adress?
I have to admit I'm really lost, if somebody could help me it would be greatly appreciated
Zillon
|
|
|
|
|
hello all,
how can i play all the animations including gif,swf,avi,mpeg and other video formats too in one vc++ application?.
Plz i need this.
Thank u in advance.
Regards,
Basheer.
|
|
|
|
|
U can use the Media Player ActiveX to play the MPEG.
For the AVI only u can refer the example in MSDN named "cmnctrl1"
For Gif there is a small example in CodeProject
There might be FlashPlayer ActiveX but i am not sure
thank you
Vikas Amin
Embin Technology
Bombay
vikas.amin@embin.com
|
|
|
|
|
hello Vikas,
Thank u very much for ur reply. yes for flash i got the activex (Shockwave player) and for Mpeg i used media player. but the problem is it should play the mpeg as a part of our application.
but in this case we are getting the controls like play, pause and others. i want them to use internally in my application.
could plz check this once. however thank u for ur reply.
Basheer.
|
|
|
|
|
use appropriate activex controls.
1.right click on the Dialog, then select "insert activex control"
(assume that u've selected Windows Media Player control)
2.Add a control variable to your control. (ie.IDC_MEDIAPLAYER1)
A dialog apprears asking wether to create a class for your activex control, clik yes.
3.now use that variable to access its methods,props etc,
m_Mplayer.play()
m_Mplayer.stop()
void CVideo::OnPlay()
{
m_MPlayer.SetFileName("c:\\basheer.wmv");
m_MPlayer.Play();
}
this'l play your video.
similarly for flash select shockwave flash Object.
He is like a one-legged man in a bum kicking competition. -Novjot Sidhu
--[v]--
|
|
|
|
|
hello Vivek,
Thank u very much for ur reply. yes for flash i got the activex (Shockwave player) and for Mpeg i used media player. but the problem is it should play the mpeg as a part of our application.
but in this case we are getting the controls like play, pause and others. i want them to use internally in my application.
could plz check this once. however thank u for ur reply.
Basheer.
|
|
|
|
|
No problem, just right click on the Media player ax control, then select properties,
Now select "all" tab.
in that scroll down to see
"Show Control"
"Show Statusbar"..etc.. set these properties to "FALSE". Now you wont see anything except the movie window.
He is like a one-legged man in a bum kicking competition. -Novjot Sidhu
--[v]--
|
|
|
|
|
my os is: window xp sp2
if I run the exe which I develop in vc,
the firewire show the dialog to protect the os .
the dialog message is:
Unblock the program
Keep blocking this program
Keep blocking this program, but ask me again later
how to hide the dialog in vc?
how to select the first one in code not myself?
thanks
|
|
|
|
|
This is not something you should do, and I would be very surprised if it was actually possible. The whole point of a firewall is that the user must make a choice. If any program could hide the dialog and select a choice then it can easily bypass the firewall entirely, and so spawn a new generation of virii/trojans. Don't do it!
|
|
|
|
|
Yes there is a way to do this. Its a registry issue.
For the best interest of consumers I probably shouldnt post the code to do it. But it does have something to do with the registry.
If people want the code, and it wont cause flack, I'll post it.
Steve Welborn
"Science can purify religion from error and superstition.
Religion can purify science from idolatry and false absolutes"
- 1987 John Paul the Great
|
|
|
|
|
thanks Swelborn!
Can you email the code to me?
or any message about the fireware registry issue!
or tell me how to do that!
it is my mail:cococut@msn.com
|
|
|
|
|
I emailed it to you.
Steve Welborn
"Science can purify religion from error and superstition.
Religion can purify science from idolatry and false absolutes"
- 1987 John Paul the Great
|
|
|
|
|
i have a problem~!
i want use CDC pointer in project,but my project base on dailog!
how can i do~~
thanks in advance~~;););)
nothing
|
|
|
|
|
ebinaini wrote: i have a problem~!
And what is your problem ? You have compilation errors, you don't know how to do something, .... I mean this can be so much different things it is impossible to give you an answer.
Be more precise in your question !
|
|
|
|
|
CDC dc;<br />
dc.CreateCompatibleDC(NULL);
this is this.
|
|
|
|
|
You could use a CClientDC object.
Anyway, being more specific might help the answer you expect.
SkyWalker
|
|
|
|
|
Hi all,
I want to use windows media player activex in my mfc app.
but I need some files and classes:
wmpsettings.h
wmpcontrols.h
and CWMPPlayer4
and if there is others ways please help me,
THANKS.
G.K.Z
Every new thing you learn,Gives you a new personality.
|
|
|
|
|
dSolariuM wrote: I want to use windows media player activex in my mfc app.
Just drag and drop the Media player on your dialog.... these classes will get added automatically
"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
|
|
|
|