|
Dears,
Could you please help me to find an API that gives the current network domain name to which the computer is connected?
Regards,
Krishnakumar
|
|
|
|
|
Does this[^] help?
Regards,
Sandip.
|
|
|
|
|
Dears,
I want to write an application to get the current firewall profile (Domain or Standard) used by the computer.
Is there any API/procedure to get the same.
Thanks in advance.
Regards,
Krishnakumar
|
|
|
|
|
|
Thanks...
but i want to do it in VC 6.0 (platform SDK february 2003).
INetFwMgr is not available in that.
Could you please tell me whether any registry entry there to get the same???
regards,
Krishnkumar
|
|
|
|
|
Hi, I'm trying to add a slider to my program to display the progress of a track when loading a sound file using the MCI functions.
It can seek, but I'm having a few issues.
firstly the slider does not get updated as the song plays, just remains the the same position until u slide it.
When you move the mouse over the position indicator of the slider, the playback jumps back to the position even if the track is currently playing from a different position.
I've been using the following project as an example.
http://www.codeproject.com/KB/audio-video/hmediaplayer.aspx[^]
I've added the timers, and some other things I've noticed from the example code.
Also the example is based on a Dialog class, while mine is a FormView, does that matter?
Thanks
soong
void CUCPView::OnTimer(UINT nIDEvent)
{
CWinApp* pApp;
pApp=AfxGetApp();
if(nIDEvent == ID_TIMER_POSITION)
{
lPos = MCIWndGetPosition(m_Audio);
m_Pos = lPos;
UpdateData(FALSE);
}
CFormView::OnTimer(nIDEvent);
}
void CUCPView::DoDataExchange(CDataExchange* pDX)
{
CFormView::DoDataExchange(pDX);
DDX_Control(pDX, IDC_SLIDER1, c_Slider);
DDX_Slider(pDX, IDC_SLIDER1, m_Pos);
}
ON_NOTIFY(NM_CUSTOMDRAW, IDC_SLIDER1, &CUCPView::OnNMCustomdrawSlider1)
|
|
|
|
|
Hi, I'm trying to add a slider to my program to display the progress of a track when loading a sound file using the MCI functions.
It can seek, but I'm having a few issues.
firstly the slider does not get updated as the song plays, just remains the the same position until u slide it.
When you move the mouse over the position indicator of the slider, the playback jumps back to the position even if the track is currently playing from a different position.
I've been using the following project as an example.
I've added the timers, and some other things I've notice
void CUCPView::OnTimer(UINT nIDEvent)
{
CWinApp* pApp;
pApp=AfxGetApp();
if(nIDEvent == ID_TIMER_POSITION)
{
lPos = MCIWndGetPosition(m_Audio);
m_Pos = lPos;
UpdateData(FALSE);
}
CFormView::OnTimer(nIDEvent);
}
void CUCPView::DoDataExchange(CDataExchange* pDX)
{
CFormView::DoDataExchange(pDX);
DDX_Control(pDX, IDC_SLIDER1, c_Slider);
DDX_Slider(pDX, IDC_SLIDER1, m_Pos);
}
ON_NOTIFY(NM_CUSTOMDRAW, IDC_SLIDER1, &CUCPView::OnNMCustomdrawSlider1)
|
|
|
|
|
Hi All
How can i hide folder?Plz help me
|
|
|
|
|
|
Thanks for reply.I am useing vista OS and check SetFileAttributes it's working nice for file.i use ths code
CFileStatus Cfs;
CFile::GetStatus("C:\\file.exe", Cfs);
Cfs.m_attribute =_A_HIDDEN;
CFile::SetStatus(("C:\\file.exe", Cfs);
And what i chnage for folder.Plz help me
|
|
|
|
|
Did you try to use SetFileAttributes with directory??
If not try it.
If yes and if it is not working what is the problem?
Did you check error code using GetLastError()??
Regards,
Sandip.
|
|
|
|
|
Did you check SetFileAttributes?
|
|
|
|
|
Is there some way to test the MFC project using monitor resolution of 1600by1250 on a monitor where maximum resolution is 1280*1024?
Plz help
|
|
|
|
|
AFAIK, NO...
Some things seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
No and the result is not attractive.
|
|
|
|
|
Maybe on a virtual machine, like MS's Virtual PC.
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
|
|
|
|
|
|
Hello friends,
I want to convert *.pcx image into *.jpg.
I want to do this conversion using Win32 Application in VC6.0
I am able to segregate the *.pcx header format and store the raw data in BIMAPINFO
strcuture.
But I don't know the header format and raw data requirement of *.jpg format.
I want to convert ICON.pcx file into ICON.jpg file using Win32.
Please give me the suggestion or source code if possible.
Waiting for your positive reply.
|
|
|
|
|
CXImage article on the codeproject is helpful for you(about formats of graphics).
|
|
|
|
|
CXImage is developed in MFC application. I just want to save *.pcx file into *.jpg
extension file using Win32 not by MFC.
Please give me information about;
How to save one format file into another file format.
|
|
|
|
|
|
Here's a way using GDI+...
#include <gdiplus.h>
...
BITMAPINFO *pBitmapInfo = ...;
BYTE *pBitmapPixelBits = ...;
ULONG dwToken;
Gdiplus::GdiplusStartupInput input;
Gdiplus::GdiplusStartupOutput output;
Gdiplus::Status status = Gdiplus::GdiplusStartup(&dwToken, &input, &output);
if(status == Gdiplus::Ok)
{
Gdiplus::Bitmap bitmap(pBitmapInfo, pBitmapPixelBits);
CLSID clsid;
GetEncoderClsid(L"image/jpeg", &clsid);
bitmap.Save(L"c:\\my.jpg", &clsid);
Gdiplus::GdiplusShutdown(dwToken);
}
...
int GetEncoderClsid(const WCHAR* format, CLSID* pClsid)
{
UINT num = 0;
UINT size = 0;
ImageCodecInfo* pImageCodecInfo = NULL;
GetImageEncodersSize(&num, &size);
if(size == 0)
return -1;
pImageCodecInfo = (ImageCodecInfo*)(malloc(size));
if(pImageCodecInfo == NULL)
return -1;
GetImageEncoders(num, size, pImageCodecInfo);
for(UINT j = 0; j < num; ++j)
{
if( wcscmp(pImageCodecInfo[j].MimeType, format) == 0 )
{
*pClsid = pImageCodecInfo[j].Clsid;
free(pImageCodecInfo);
return j;
}
}
free(pImageCodecInfo);
return -1;
}
If you can use ATL, the CImage class would allow you to do the same in a few lines of code.
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
i have a dialog box, if i click 1 button on that dialog box, i am displaying another dialog box. when i close that popup dialog box, the main dialog box is also getting closed.
how do i keep parent window displyed even after closing child window(popup dialog).
thanks in advance
|
|
|
|
|
How did you close chid dialog?
|
|
|
|
|
void CMessage1::OnClose()
{
CDialog::OnClose();
}
|
|
|
|