|
Okay. I'll go with that idea. Thank you
Appreciate your help,
ns
|
|
|
|
|
I've used in the past Paul DiLascia's CSplash class[^]. The trick to achieve sync with the appearance of your main dialog is to delay setting the m_pMainWnd member of the CWinApp object till your OnInitDialog is done.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Thats a terrific sample you linked me to. Only problem is his app is coming up minimized when the splash disappears. I'm not sure what line of code makes it minimized on startup. I want mine to show up, not minimized. Something in his code is telling it to minimize, and I need to figure out what it is...so that my app works the way I want it.
Appreciate your help,
ns
|
|
|
|
|
I don't know... This is what I've put at the end of my OnInitDialog :
AfxGetApp()->m_pMainWnd=this;
SetForegroundWindow();
and it works OK.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Thanks. I dont know whats happened to my machine since I ran Lascias sample...its got a cmdline.cpp I'm suspecting. Anyways, even after rebooting, my app wont work. Crashes when its processing cmdline info. It works fine on other machines....ideas?
Appreciate your help,
ns
|
|
|
|
|
i need to zip a file dynamically by c++ then send to somewhere. i think i need to learn zip format.
do u know how to zip a file in c++ or give me a line to zip format.
thx
includeh10
|
|
|
|
|
Check out Creating a Self Extracting Executable
There's other similar utilities under the files section of CP also...
"If at any time I announce that a nation or kingdom is to be uprooted, torn down and destroyed, and if that nation I warned repents of its evil, then I will relent and not inflict on it the disaster I had planned. And if at another time I announce that a nation or kingdom is to be built up and planted, and if it does evil in my sight and does not obey me, then I will reconsider the good I had intended to do for it." -- Jeremiah 18:7-10 (God, commenting on the value of the United Nations)
|
|
|
|
|
thank u, my dear ....
includeh10
|
|
|
|
|
|
I dont have this file on my machine. I loaded a CP splashscreen sample in my vc6, and I get:
Linking...
LINK : fatal error LNK1104: cannot open file "mfc42u.lib"
Any ideas on how to fix this?
Appreciate your help,
ns
|
|
|
|
|
it is lib for NT. if u don't use NT, build exe in debug or release version, should be OK,otherwise, delete makefile, create a new one urself.
if use NT, type following line at beginning:
#pragma comment(lib,"mfc42u.lib")
if still not working, try to find the file to see if it is existing
includeh10
|
|
|
|
|
Thanks. I am building the project in the VC debug environment on win2K. this file is not on my machine in the vc98 folder...
Appreciate your help,
ns
|
|
|
|
|
it's for UNICODE build, maybe you didn't install UNICODE support files and DLL when you installed CV++ re-install/repair/modify and check that the UNICODE support is checked.
Max.
|
|
|
|
|
I want to make simple dialog based application. What i need is that dialog box appears in an "inactive" state i.e when i run my program from VS IDE, the dialog box goes behind and VS IDE not loose its focus. how can i do so ???
BTW: I've already used ShowWinndow options in OnInitDialog(), but these options not worked in case of Dialog Box
|
|
|
|
|
Create a modeless dialog using Create() and ShowWindow() (see MSDN), and then change the dialog's zorder
"If at any time I announce that a nation or kingdom is to be uprooted, torn down and destroyed, and if that nation I warned repents of its evil, then I will relent and not inflict on it the disaster I had planned. And if at another time I announce that a nation or kingdom is to be built up and planted, and if it does evil in my sight and does not obey me, then I will reconsider the good I had intended to do for it." -- Jeremiah 18:7-10 (God, commenting on the value of the United Nations)
|
|
|
|
|
Hi,
I was going through the DirectSound samples that come with DirectX SDK. In the file dsutil.cpp I came across the following function:
//--------------------------------------------------------------------------
// Name: CSoundManager::SetPrimaryBufferFormat()
// Desc: Set primary buffer to a specified format
// For example, to set the primary buffer format to 22kHz stereo, 16-bit
// then: dwPrimaryChannels = 2
// dwPrimaryFreq = 22050,
// dwPrimaryBitRate = 16
//--------------------------------------------------------------------------
HRESULT CSoundManager::SetPrimaryBufferFormat( DWORD dwPrimaryChannels,
DWORD dwPrimaryFreq,
DWORD dwPrimaryBitRate )
{
HRESULT hr;
LPDIRECTSOUNDBUFFER pDSBPrimary = NULL;
if( m_pDS == NULL )
return CO_E_NOTINITIALIZED;
// Get the primary buffer
DSBUFFERDESC dsbd;
ZeroMemory( &dsbd, sizeof(DSBUFFERDESC) );
dsbd.dwSize = sizeof(DSBUFFERDESC);
dsbd.dwFlags = DSBCAPS_PRIMARYBUFFER;
dsbd.dwBufferBytes = 0;
dsbd.lpwfxFormat = NULL;
if( FAILED( hr = m_pDS->CreateSoundBuffer( &dsbd, &pDSBPrimary, NULL ) ) )
return DXTRACE_ERR( TEXT("CreateSoundBuffer"), hr );
WAVEFORMATEX wfx;
ZeroMemory( &wfx, sizeof(WAVEFORMATEX) );
wfx.wFormatTag = WAVE_FORMAT_PCM;
wfx.nChannels = (WORD) dwPrimaryChannels;
wfx.nSamplesPerSec = dwPrimaryFreq;
wfx.wBitsPerSample = (WORD) dwPrimaryBitRate;
wfx.nBlockAlign = (WORD) (wfx.wBitsPerSample / 8 * wfx.nChannels);
wfx.nAvgBytesPerSec = wfx.nSamplesPerSec * wfx.nBlockAlign;
if( FAILED( hr = pDSBPrimary->SetFormat(&wfx) ) )
return DXTRACE_ERR( TEXT("SetFormat"), hr );
SAFE_RELEASE( pDSBPrimary );
return S_OK;
}
This is called after calling DirectSoundCreate8() and setting the CooperationLevel. Apparantly, this sets the format of the primary buffer. The question that I have is why is the primary buffer released after setting the format? Should we not keep a reference to the primary buffer? Or maybe I am not understanding something here.
Thanks for any help you might be able to provide.
Pankaj
Without struggle, there is no progress
|
|
|
|
|
Ok, I got it. I somehow thought it was destroying the primary buffer. Of course, it was just decrementing the reference count.
It was late at night and I was not thinking. Amazing how a hours of sleep can make you realize how stupid you wer ebefore that
Pankaj
Without struggle, there is no progress
|
|
|
|
|
I show my dialogbox.When i press close,iam closing the dialog box by using func called enddialog.If i open and close the dialog box again and again,the memory size at runtime is increasing.I dont know why.
|
|
|
|
|
Two possible reasons:
1: MFC
2: Your own code
Do you allocate memory or something?
Rickard Andersson@Suza Computing
C# and C++ programmer from SWEDEN!
UIN: 50302279
E-Mail: nikado@pc.nu
Speciality: I love C#, ASP.NET and C++!
|
|
|
|
|
Sounds like you're doing this to show your dialog:-
CMyDialog *pDlg = new CMyDialog;
pDlg->DoModal();
if that is the case, make sure that you have:-
delete pDlg;
after the domodal.
But, provided the dialog is modal, you'd be far better off doing:-
CMyDialog dlg;
dlg.DoModal();
becuase then you don't need to delete it.
Jon
Signature space for rent. Apply by email to....
|
|
|
|
|
Tell me please, how can I launch standart microsoft remote access server ( ) programmatically?
|
|
|
|
|
Please, answer me. Don't leave me alone with this problem.
|
|
|
|
|
I want add or del the resources in EXE files. I know I can do it in VC if I have sourcecode. But is there any tool to do this ? Or I can write a easy tool to do this ? Please give me some hints and Thx.
|
|
|
|
|
You can do this in VS6 IDE this way:
1) Call OpenFile dialog from menu File/Open...
2) In Files of type combo select Executable files
3) In Open as combo select Resources
4) After you open the executable file with these settings, you can edit the resources as usual.
5) Save the modified resources back into exe using save.
Watch for copyrights doing it
Pavel
Sonork 100.15206
|
|
|
|
|
Thank you.
|
|
|
|