|
CWnd::ScrollWindow does allow you to specify which part of the window to scroll. You do not have to scroll the entire client area.
You may be right I may be crazy -- Billy Joel --
Within you lies the power for good, use it!!!
|
|
|
|
|
Hi all,
I have created a Project using VC++ 6.0. It has a normal (parent) thread.
I have created another thread (infintely queries the server) using AfxBeginThread() .
The problem is :
The project is taking "99% CPU Usage". Hence other application that are running along will get struck.
What is the solution for this? Please help me.
Thanks in Advance.
|
|
|
|
|
I'm guessing you are using a never ending loop somewhere in your code. Within the loop put Sleep(0) , this will yield some CPU time for other processes.
|
|
|
|
|
Ya i am using never ending loop.
|
|
|
|
|
MaHeSG wrote: Ya i am using never ending loop.
Why? This is most always a sure sign of a bad design.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Is there any other method available instead of infinite loop for querying server or for updating data continously?
|
|
|
|
|
MaHeSG wrote: Is there any other method available instead of infinite loop for querying server...
Have you considered a timer?
MaHeSG wrote: ...or for updating data continously?
What data? From where?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Does this status when you create another thread
|
|
|
|
|
with real sdk, i can control the player play . pause and stop with
IRMAPlayer interface ,but when i want to fullscreen the player ,
i failed . i found interface IRMASiteFullScreen, but i don't know
how to get the interface.
who can tell me how to implement it ,kind of giving some sample code .
thx a lot~
|
|
|
|
|
I was wondering if anyone can tell me how to open .aby files, or view them or something. Thanks.
|
|
|
|
|
Open them just like you would any other file. Now if you want to open them with a particular application, or in their native format, that's altogether different.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
From 'http://filext.com/[^] :
Usually found in the AOL program directory. May have to do with your preferences.
|
|
|
|
|
Hey all,
I am busy updating my CFileEditCtrl class[^] to support XP themes. As part of that update I want the browse button to be drawn the same as a combo box dropdown button, except without the arrow. Using DrawThemeBackground automatically draws the arrow
HTHEME hTheme = OpenThemeData(*this, L"COMBOBOX");
LRESULT ret = DrawThemeBackground(hTheme, dc, CP_DROPDOWNBUTTON, CBXS_NORMAL, CRect(10, 10, 27, 27), NULL);
Is there any option that will draw the themed button background without the arrow?
You may be right I may be crazy -- Billy Joel --
Within you lies the power for good, use it!!!
|
|
|
|
|
Hi!
There are no any option to do this.
Try HTHEME hTheme = OpenThemeData(*this, L"Button"); instead of combobox, or parse manually theme info from .theme file.
Rgds. Tarmo.
|
|
|
|
|
Unfortunately the standard push button and the combobox buttons are different. In the standard blue theme the push button is white while the combo box button is blue.
How does one draw custom controls using themes? Surely there must be an API provided for it if the custom control varies in appearance from the windows standard controls. Pre fisher-price was so much easier
You may be right I may be crazy -- Billy Joel --
Within you lies the power for good, use it!!!
|
|
|
|
|
so, i've looked in a lot of questions about serial ports, how to establish one and so on... but my question is a little bit more accurate and I can't find an answer:
how do I access a single Pin for my serial port?
I established the connection via createfile and wanted to write to the 4th pin...
that's what I guess. I need to set an integer there...
actually I needed to rewrite the function:
outportb(portAddr, int n)
where n is an int... and portadr is given as adr(Com2)+4, so I guess that's the pin.
when I use writefile as:
(int 3 or 4 should be written)
WriteFile(porthandle, &"3", sizeof(txData), &bytesSent, NULL);
which is obviously wrong I don't get the right result...
how do i have to use it???
|
|
|
|
|
So you want to send data out on a handshake (DTR) line as opposed to the actual TX pin? Maybe changing the cable is a better solution.
Jeron
|
|
|
|
|
cannot change the cable cause its an old-school shutter-glasses device
|
|
|
|
|
Maybe using with EscapeCommFunction()to manipulate (bit bang) using the DTR line, but timing would probably not be accurate enough for anything but a very low baud rate, and everything would have to be handled by your app. (the UART would be just a glamorous voltage converter).
Jeron
|
|
|
|
|
well I tried "EscapeCommFunction" with DWORD running in loop from 0 1500 as int
<br />
for (int i = 0; i<1500; i++)<br />
{<br />
DWORD set = (DWORD)i;<br />
EscapeCommFunction(porthandler, set);<br />
}<br />
but somehow it didn't work...
I guess it's rediculous to try the other 5000 values.
|
|
|
|
|
The second parameter of the EscapeCommFunction() is one of 2 values in your case. These will make the DTR line high or low.
1. CLRDTR Clears the DTR (data-terminal-ready) signal
2. SETDTR Sends the DTR (data-terminal-ready) signal
Jeron
|
|
|
|
|
zqueezy wrote: how do I access a single Pin for my serial port?
Depends on what you want to do with it and what type of connector you have.
zqueezy wrote: I established the connection via createfile and wanted to write to the 4th pin...
Well, if this is a DB25 connector then pin 4 is the RTS signal and if it's a DB9 connector it would be the DTR signal.
As jeron1 said you can use the ::EscapeCommFunction() to set or clear those signals.
You can also use ::SetCommState() to set up handshaking behaviour.
From user mode it's not possible to send data that is dependant on a specific baudrate on such pins since you cannot rely on the timing due to windows not being a real-time OS.
How are you planning to use the pin?
"It's supposed to be hard, otherwise anybody could do it!" - selfquote "High speed never compensates for wrong direction!" - unknown
|
|
|
|
|
hi all,
if i declare variable like this in visual studio 6.0
i am getting error.
can anyone help me regarding this ??
regards
venu
|
|
|
|
|
like this? exacly like this?
const double ERROR=-1e30;
??
:] Try
const double ERR=-1e30;
it should work :]
ERROR is a defined name in wingdi.h and is equal to 0, so u can not use it again in your declaration in that way
|
|
|
|
|
as i'm not mind reader; but you could have guessed yourself that one would ask you to proovide the exact error description...
also, please explain where you do declare this variable
|
|
|
|