|
Could anyone help me with the following expressions?
n5-=7+2/3*10
and also
f2=10.0-18.0/-3.0*2.5e-1
Geoffrey A Overley
|
|
|
|
|
Geoffrey, while this question is probably better off here than in the lounge, it was general enough that I answered it there. Either way, please don't ask the same questions over and over, once here is enough.
Christian
I have come to clean zee pooollll. - Michael Martin Dec 30, 2001
Sonork ID 100.10002:MeanManOzI live in Bob's HungOut now
|
|
|
|
|
What is the best way to download a file with http protocol and actually test to see if that file really does exist? I have looked and looked to no avail. Any help will be greatly appreciated.
Bill? Who's this guy called Bill?
|
|
|
|
|
|
lol Why is it always the obvious things we overlook?
I used OpenURL() but no real way of checking if it exist or not; Unless I make it a complicated task.
Thanks Mike
|
|
|
|
|
Can some one tell me what the problems is...?
LPCTSTR GetBuffer()
{
LPSTR buff = "";
CopyMemory(buff, GlobalLock(m_hBuffer), m_nSize);
GlobalUnlock(m_hBuffer);
return buff;
}
CopyMemory fails!!! I've managed to use similar code for the SetBuffer function.
CopyMemory(GlobalLock(m_hBuffer), buff, m_nSize);
Why does the one work and not the other...?
TIA
"An expert is someone who has made all the mistakes in thier field" - Niels Bohr
|
|
|
|
|
I've fixed the problem, but i dunno if it's a proper fix.
LPCTSTR buff = (LPCTSTR)GlobalLock(m_hBuffer);
GlobalUnlock(m_hBuffer);
return buff;
I'm assuming the prob was that the temp buff is destroyed when outta scope...? So the CopyMemory had no effect. ultimately all i wanted returned was an address to the buffer and the above does this. However Locking the handle returns a pointer, doesn't Unlocking invalidate the handle...?
The above code works, but isn't it set up for failure, i'm kinda lost as to why it does work...? Each Lock increments a counter kinda like COM objects right..? as the Unlock does the opposite, as long as the lock count is zero shouldn't it fail...?
Thanx again!
"An expert is someone who has made all the mistakes in thier field" - Niels Bohr
|
|
|
|
|
How can I put a array that represents an image on my window. Have I to create a DC or something? Name of functions and explanations would be very nice.
|
|
|
|
|
DO you mean an array of pixel values ? You can create a DIBSection and copy the data directly onto the bitmap if you want to. Any decent DIBSection wrapper will also have a draw function, so all you need to do is pass in the DC you get in OnPaint.
Christian
I have come to clean zee pooollll. - Michael Martin Dec 30, 2001
Sonork ID 100.10002:MeanManOzI live in Bob's HungOut now
|
|
|
|
|
I have just started today with dirctx8 and I want to make a window in full screen mode. The DX SDK says to create a "topmost" window with WS_EX_TOPMOST.
I had my window topmost , but not Maximized.
How can I do it ?
ps: Without window borders!!!
|
|
|
|
|
I think you need to look in the SetCooperateLevel function (I think that's the name, anyway, or something like it). Also, it would be good advice to look at the DirectX sample progras, they are a gold mine.
--
Andrew.
|
|
|
|
|
How does one create an owned popup window?
If I use
CreateEx(NULL,
AfxRegisterWndClass(CS_HREDRAW | CS_VREDRAW, 0, (HBRUSH)(COLOR_WINDOW + 1), 0),
NULL,
WS_POPUP | WS_VISIBLE | WS_BORDER,
rect,
pParent,
1,
NULL); CreateEx fails to create a window
but, if I use
CreateEx(NULL,
AfxRegisterWndClass(CS_HREDRAW | CS_VREDRAW, 0, (HBRUSH)(COLOR_WINDOW + 1), 0),
NULL,
WS_CHILD | WS_VISIBLE | WS_BORDER,
rect,
pParent,
1,
NULL); CreateEx successfully creates a window, but it's visibility is limited to it's parent's client area.
My class is derived from CWnd, and I call CreateEx() in the constructor.
TIA
TA.
|
|
|
|
|
Does noone use use CWnd::CreateEx() to create a popup window
why would CreateEx() fail when the WS_POPUP flag is used, but if I use the CreateWindowEx() API function, with the exact same parameters as above, the window is successfully created?
I am very confused, and in the 2 days since I posted the original question, I have not gotten an answer. maybe this forum is not as helpful as I have been told
|
|
|
|
|
How can I skin a window?
for example: Title, Window client area, Tool Bar, Menues, Fonts, etc.
Every help needed links.
Anything . . .
Please HELP ! ! !
A S A P.
Thanks.
|
|
|
|
|
You have to write a skin parser, drawing code to put it all in the right places (resize wigits, buttons, icons, etc).
After that, you have to link all these icons and buttons to actual functionality, send window-grip messages, and more.
Needless to say rewriting a UI is a lot of work.
// Rock
|
|
|
|
|
This should get you started:
/ravi
"There is always one more bug..."
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
sorry 4 the mistake, guys.
But I meant: How can I skin an Explorer Window ?
Please HELP.
Thanks
|
|
|
|
|
Window blinds....
It would be a lot of work otherwise (way WAY more than your own program) because you have to listen for draw messages from all over the place and do your own drawing once windows is done its thing.
Not prety, and not worth it since window blinds does all this for you already.
// Rock
|
|
|
|
|
CLaW wrote:
window blinds does all this for you already
But I wanna do it and perfect some things...
BTW: come to #CodeProject on DalNet (mIRC)
|
|
|
|
|
I have a program where I want an mp3 audio file played in the background at start up and repeated until the program is closed. For now though, I have a menu option which will start the playing of the mp3 (although it will still play in the background without the bar shown)
I added the following function which I got from this program here ( http://www.codeproject.com/audio/mp3player.asp#xx88328xx ), but I can't seem to get it working. I included the vfw.h and put VFW32.lib in the linker's space as well.
When I run this program I get a "memory could not be read" error.
void CChildView::OnPlay()
{
m_Video = NULL;
if(m_Video == NULL)
{
m_Video = MCIWndCreate(this->GetSafeHwnd(),
AfxGetInstanceHandle(),
WS_CHILD | WS_VISIBLE|MCIWNDF_NOMENU, m_Path);
}
else
{
MCIWndHome(m_Video);
}
MCIWndPlay(m_Video);
}
Am I using the wrong function for this or am I simply using the right function wrongly?
|
|
|
|
|
I dunno, but I use the mp3 playback source code in the 'simple skinnable app with mpeg playback' article for this sort of thing, it works a treat.
Christian
I have come to clean zee pooollll. - Michael Martin Dec 30, 2001
Sonork ID 100.10002:MeanManOzI live in Bob's HungOut now
|
|
|
|
|
I'd already taken a look at that source and it's a lot more involved then what I need.
All I want is to be able to open and play an mp3 in the background, nothing fancy like the skinable mpeg player
|
|
|
|
|
What is the best threadsafe way to get a pointer to an MFC control on a form. I have been trying to use GetDlgItem() and it has not been working. It crashes when it calls isWindow ir something like that. BTW if I call GetDlgItem() from with in the formview class it works fine. I am using MFC7. Thanks.
Steve
|
|
|
|
|
You may be trying to use the returned CWnd pointer before the CWnd has had a chance to Create() itself. This is a common problem when you attempt to access a control using GetDlgItem() in a modeless dialog's OnInitDlg().
/ravi
"There is always one more bug..."
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
That is not the case here. The control has definetly been created.
|
|
|
|