|
There's NO perfect method available.
Girl, why dont you try some OpenGL or directx??
Maybe, it has some method that will help you.
|
|
|
|
|
Hi, There
How we can Send a beep to Internal PC Speaker
while a wave file is playing by the External
Speaker via sound Card (Using i.e SndPlaySound())?
Is There Any Idea?
Yours, Mehrdad
|
|
|
|
|
printf("%d", 0x07);
as the ASCII character 7 is the bell character
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
yes, But this play a beep on Both(Internal And external)
i want to play only on ninternal speaker
thanks,
|
|
|
|
|
M.Mehrdad.M wrote:
But this play a beep on Both(Internal And external)
never... it plays only on the internal speaker
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
Is [MessageBeep] and [beep] of any help
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
|
|
|
|
|
|
Dear toxcct
first, printf("%d", 0x07); prints 7 on stdio
second, I tried printf("%d", 0x07); again, it plays beep on both speakers, iam working with VC++7,console mode Win32 app, WindowsXP
|
|
|
|
|
|
:(Please help me.
I use the SHSetFolderPath function to Assigns a new path to a system folder through its CSIDL.But it return fail.The source code as follow:
HRESULT hr = NULL;
HINSTANCE hLib = NULL;
typedef HRESULT (WINAPI *SHSetFolderPath(int,HANDLE,DWORD,WCHAR*);
hLib = LoadLibrary("shell32.dll");
if(hLib)
{
SHSetFolderPath lpfSHSetFolderPath;
lpfSHSetFolderPath = (SHSetFolderPath)GetProcAddress(hLib,(LPTSTR)232);
hr = lpfSHSetFolderPath(CSIDL_FAVORITES,NULL,0,L"E:\\TestFolder");
}
The "hr" return value is not S_OK,why?
Thanks;
|
|
|
|
|
Hello,
I've got a problem and I hope you guys can help me out.
I want to use owner drawn Buttons. I use the CBitmapButton class and the LoadBitmaps()
member function. The bitmaps show round-shaped buttons.
My problem is, that I use a multi-color background for my application and want the parts of
the bitmaps, which should not belong to the button, make transparent.
Like if you create an icon with the IDE you can select the transparent color.
So that I don't see the whole rectangle.
I just want to know, how can I define a color to be transparent for a button?
For a normal bitmap to display is not a problem, but for a button I didn't found anywhere.
I am thankful for any help and ideas.
Paul.
|
|
|
|
|
Insert "Transparent Button" in the search engine of CodeProject you will find various examples.
Too many plans make the health badly...
|
|
|
|
|
I did so, but it did'nt help. The other either use others' classes or icons.
The others' classes don't seem to have solved the problem either.
It only looks like they do.
|
|
|
|
|
I can think of several possibilies, none of them will be fast.
If the dialog resource does not specify clip-children:
1) Draw the bitmap your self one pixel at a time, that way you can select and chose what to draw. If you use a DIB, this method can be very fast (see articles on DIBs at CP).
2) Scan the bitmap to determine where the edges are and then: create a clipping region (using thos edges), select it into dc and then just blit the image like normal.
If you want, you may be able to use the QuickFill algorithm (article at CP):
1) If you're not specifing clip-children: get a copy of the backgound image (via BitBlt, where you want to draw at), use the image as an argument to QuickFill inorder to fill the backgound (of the bitmap) and then blit the resulting bitmap.
2) If you're specifing clip-children: you'll have to get the backgound image
from the origanal bitmap (this will require some extra work if the images are not 1 to 1), use the image as an argument to QuickFill inorder to fill the backgound (of the bitmap) and then blit the resulting bitmap.
There are probably other ways to accomplish your goal. But the simpilist, and probably the fastest, is to use a DIB. By using a DIB and reading and writing one pixel at a time, you can also have transparent holes in your bitmap image.
Hmmm! A TransparentBlt that take a bitmap instead of a transparent color, sound like an article to me!
Well I hope that helps!
Good luck!
INTP
"The more help VB provides VB programmers, the more miserable your life as a C++ programmer becomes."
Andrew W. Troelsen
|
|
|
|
|
Did you try to use the debugger (F5 to start debugging and F9 to set/remove breakpoints) ? Because there you don't give us a lot of informations to help you....
|
|
|
|
|
Hi all,
Can u pls tell me how to call StoreProcedure from Oracle in VC++ using ODBC????
|
|
|
|
|
Teach yourself database programming in 21 days.
I guess it will help you. It has all the info regarding database programming in VC++
http://www.priyank.in/
|
|
|
|
|
May we access CMainFrame's members from CxxxView ?
Thanks in advance
|
|
|
|
|
You can use that:
((CMainFrame*)AfxGetMainWnd())-> ....
Hope this helps
|
|
|
|
|
May we access CxxxView's members from CMainFrame ?
Thanks in advance
|
|
|
|
|
Yes, you can use GetActiveView() like that:
CxxxView* pView = (CxxxView*)GetActiveView();
|
|
|
|
|
They appear these errors:
k:\paint\paintview.h(21) : error C2143: syntax error : missing ';' before '*'
k:\paint\paintview.h(21) : error C2501: 'CPaintDoc' : missing storage-class or type specifiers
k:\paint\paintview.h(21) : error C2501: 'GetDocument' : missing storage-class or type specifiers
Thanks in advance
|
|
|
|
|
Yesm you probably need to add #include "paintdoc.h" at the begining of your paintview.cpp file.
|
|
|
|
|
Normally, I do not need to add line 'include "PaintDoc.h"', why do we need to add this line now ?
More:
void CMainFrame::SetFColor(UINT nID)
{
CBitmap bitmap;
bitmap.LoadBitmap(nID);
HBITMAP hBitmapOld = ((CStatic*)m_wndMyDialogBar.GetDlgItem(IDC_FCOLOR))->SetBitmap(bitmap);
bitmap.Detach();
if(hBitmapOld != NULL)
DeleteObject(hBitmapOld);
CPaintView* pView;
pView = (CPaintView*)GetActiveView();
pView->m_clrBorderColor = m_clrFColor;
//SendMessage(WM_PAINT);
}
They appear an error here pView->m_clrBorderColor = m_clrFColor;
Thanks in advance
|
|
|
|
|
hcmuns wrote:
pView->m_clrBorderColor = m_clrFColor;
What is the error ?? Maybe because m_clrBorderColor is a private member of CPaintView ? It is a better principle to make all the member variables private and use Get/Set function to access the data
|
|
|
|