|
Can anybody tell me a resource for adding a Splash screen to a DLL. Splasher and other classes require a CWinApp or CMainFrm object - my DLL does not have these.
Basically, I want to display an intro or splash screen to a library DLL when not properly registered. It would go away after a short period.
Thanks
|
|
|
|
|
One solution is to simply implement an MFC DLL. As for the splash screen, one solution is a dialog box.
Kuphryn
|
|
|
|
|
Since you don't know how the caller is going call your DLL, this is a really bad idea. It's best to return an error code and then let the calling application notify the user.
|
|
|
|
|
I really need some help here folks.
Im using VC++.net (vc++ v7.x)
Im trying to create a simple wizard based program. However nowhere can i find a decent tutorial or guide to help me work it out.
lots of tutorials, sorry a few tutorials talk about property pages and property sheets. Others about Cdialog and classes. Also alot make you click on a menu toolbar to bring up the wizard. I dont want this, what i want is when you click the .exe a single dialog screen appears straight away and then you use the Next and Back buttons to navigate between the pages.
Can anyone give me some help please, either some advice or a best way to do it tip, or a link to a decent tutorial one that MSN search cant find as ive looked. Im not looking for anyone to do it for me, just a big kick in the right direction please.
One problem that i have also found is that a couple of articles say i need to change the base class from one thing to something else but i dont see how i can do this it just doesnt let me.
Any advice, please im pulling my hair out.
Kind regards
Dave Long
|
|
|
|
|
Use the CPropertySheet class. Follow the same steps you would follow to create a standard property sheet, but call SetWizardMode() before you call DoModal().
|
|
|
|
|
hi
i want to display my application's icon in system tray
please guide me that how can i do it
and also that how can i load a .jpg or .bmp in an sdi application
and another problem !!!
i made an sdi application
when ever i run the program it sizes the window in default size of vc++ which is normally in all cases ... now what i want to do is to reduce the size .... and have size of my own how can i do it ... and how can i give specific shape to window e.g circular or oval etc.
kindly answer as soon as possible
regards
Nauman Ghazi
Bahria University
|
|
|
|
|
djghazi wrote:
i want to display my application's icon in system tray
please guide me that how can i do it
Use Shell_NotifyIcon().
djghazi wrote:
i made an sdi application
when ever i run the program it sizes the window in default size of vc++ which is normally in all cases ... now what i want to do is to reduce the size
Change your app's initial size/position in CFrameWnd::PreCreateWindow().
|
|
|
|
|
I need help with some file operations.
What I want to do is replace a file with a modified version of that file and have the original filename retained.
For example:
Original.txt --> Modified_Original.tmp --> Original.txt
I know the complete pathname of the Original. The Original.txt file property is Read-Only, and this is where I get a problem.
What I have done is:
remove(szOriginalFilename);
// Rename the temporary file (modified version) to the original
CFile::Rename(szTempFilename,szOriginalFilename);
This works ONLY when the Original is Write-able. How do I change a file's R-W properties from code??
Thanks
Johnny
|
|
|
|
|
Use the CFile::SetStatus() method, or use SetFileAttributes().
|
|
|
|
|
Thanks! I'll try them out.
|
|
|
|
|
Is there a way to change the fonts inside a listview control.
Thanks
|
|
|
|
|
See SetFont method of CWnd or WM_SETFONT msg.
|
|
|
|
|
d:\\Program Files\\Windows Media Player\\wmplayer.exe
d:\Program Files\Windows Media Player\wmplayer.exe
I:\Music\Symphony\RichardClayderman\Lieberstraum.mp3
I want use ShellExecute function to active a application (WindowMediaPlayer9 or WinAmp) and open a MP3 file also (play that MP3)
but I can not do that function always return ERROR_FILE_NOT_FOUND
When I type
"d:\Program Files\Windows Media Player\wmplayer.exe" "I:\Music\Symphony\RichardClayderman\Lieberstraum.mp3"
in RUN DialogBox (Start/Run)...>> it works OKAY
Can you show me a way to get right result?
thank
<br />
#define ERROR_FILE_NOT_FOUND 2L<br />
<br />
<br />
CHAR szCommandLine[300]=STR_NULL;<br />
CHAR szFileName[255]=STR_NULL;<br />
strcpy(szCommandLine,"\"d:\\Program Files\\Windows Media Player\\wmplayer.exe\" \"");<br />
<br />
ListView_GetItemText(hWndLvwContent_Time,dwIndex,2,szFileName,sizeof(szFileName));<br />
<br />
strcat(szCommandLine,szFileName);<br />
strcat(szCommandLine,"\"");<br />
MessageBox(hWnd,szCommandLine,"",MB_OK);<br />
If((INT)ShellExecute(NULL, NULL, szCommandLine, NULL, NULL, SW_SHOWNORMAL)<=32)<br />
{<br />
}
|
|
|
|
|
CHAR szCommandLine[300]=STR_NULL;
CHAR szFileName[255]=STR_NULL; What is STR_NULL defined as?
strcpy(szCommandLine,"\"d:\\Program Files\\Windows Media Player\\wmplayer.exe\" \"");
...
strcat(szCommandLine,"\""); Why are you escaping the double-quotes?
If((INT)ShellExecute(NULL, NULL, szCommandLine... Unless you really want to use wmplayer.exe, you can simply set szCommandLine equal to I:\\Music\\Symphony\\RichardClayderman\\Lieberstraum.mp3 and let the shell's association determine what app to run.
|
|
|
|
|
wonderful!
WinAmp' s activated auto to play that MP3 file
thank you
|
|
|
|
|
thank you
#define STR_NULL ""
|
|
|
|
|
Hi,
Is there a place that shows what is the meaning of m_reason member of CArchiveException.
I used a try/catch in my code and aperantly I got an exception with m_cause=7, what does it mean ?
The only thing I did was to serialize another member of my class...
Thanks,
Shay
|
|
|
|
|
Shay Harel wrote:
m_cause=7, what does it mean ?
CArchiveException::badSchema
|
|
|
|
|
First,
Thank you.
I still can't understand why. I did bump the Schema in 1 but I also have a switch statement that do the right serialize based on the schema....
Shay
|
|
|
|
|
What I have found is the easiest method of handling schema changes (since the MFC Schema stuff does nothing) is to write out a couple of extra bytes in each object. This will let you do your own object versioning and conditional serialization. Example:
void MyClass::Serialize(CArchive &archive)
{
WORD wMagicNum;
WORD wVersion;
CObject::Serialize(archive);
if (archive.IsStoring())
{
archive << (WORD)0x4C53; // LS
archive << (WORD)4; // version
archive << m_cServerConfigName << m_cLoginHTMLFileName << m_cDefaultIPAddress;
archive << (WORD)m_bUseSSL << (WORD)m_wNumWorkerThreads;
archive << (DWORD)m_iInputBufferSize << (DWORD)m_iOutputBufferSize;
archive << (DWORD)m_iSQLBufferSize << (DWORD)m_iMaxParameters;
archive << m_cCurrentApplicationSetFileName;
archive << (WORD)m_bUseMailSender << m_cMailProfile << m_cMailProfilePassword << (DWORD)m_iMailWorkerThreadCount;
archive << m_cSMTPHost << (DWORD)m_iSMTPAuthenticationMode << m_cSMTPUserName;
archive << m_cSMTPPassword << (DWORD)m_iSMTPPort << m_cSMTPBoundIP << (DWORD)m_iMailTransportToUse;
archive << (WORD)m_bOutputPerformanceHeader << (WORD)m_bCompactOutputBuffer;
}
else
{
archive >> (WORD&)wMagicNum;
if (wMagicNum != 0x4C53)
{
TRACE("Bad id number in front of a LightningServer item\n");
AfxThrowArchiveException(CArchiveException::generic);
}
archive >> (WORD&)wVersion;
archive >> m_cServerConfigName >> m_cLoginHTMLFileName >> m_cDefaultIPAddress;
archive >> (WORD&)m_bUseSSL >> (WORD&)m_wNumWorkerThreads;
archive >> (DWORD&)m_iInputBufferSize >> (DWORD&)m_iOutputBufferSize;
archive >> (DWORD&)m_iSQLBufferSize >> (DWORD&)m_iMaxParameters;
archive >> m_cCurrentApplicationSetFileName;
if (wVersion > 0)
{
archive >> (WORD&)m_bUseMailSender >> m_cMailProfile >> m_cMailProfilePassword >> (DWORD&)m_iMailWorkerThreadCount;
if (wVersion > 1)
{
archive >> m_cSMTPHost >> (DWORD&)m_iSMTPAuthenticationMode >> m_cSMTPUserName;
archive >> m_cSMTPPassword >> (DWORD&)m_iSMTPPort >> m_cSMTPBoundIP >> (DWORD&)m_iMailTransportToUse;
}
if (wVersion > 2)
archive >> (WORD&)m_bOutputPerformanceHeader;
if (wVersion > 3)
archive >> (WORD&)m_bCompactOutputBuffer;
}
}
}
|
|
|
|
|
I want to make a application that supports form creation(a form editor), like in MS Access or in VC++ Dialog Editor, like the VB form editor. i want to add controls dynamically to CFormView . and want to give the user the ability to move, resize or select the control in design mode. Please if any one can help me i would be very greatfull to him/her.
|
|
|
|
|
Hi,
I write into Excel over COM
My Problem is the interface IDispatch. I can't get acces to a SeriesCollection object with this interface.
I've tried to map anotherone but this doesn't works. The compiler says the code is ok but when executing i got an invalid pointer massage
Here are some parts of my code:
_ApplicationPtr pXL;
pXL.CreateInstance(L"Excel.Application.9");
.
.
.
pXL->Range["Messwerte!B5"]->Value2= 35.6;
pXL->Range["Messwerte!B6"]->Value2= 32.7;
pXL->Range["Messwerte!B7"]->Value2= 33.6;
pXL->Range["Messwerte!B8"]->Value2= 37.6;
pXL->Range["Messwerte!B9"]->Value2= 34.6;
pXL->Charts->Add();
pXL->ActiveChart->SetSourceData(pXL->Range["Messwerte!B5:Messwerte!B9"], _variant_t((long)xlColumns) );
pXL->ActiveChart->ChartType = xlLineMarkers;
pXL->ActiveChart->Location(xlLocationAsObject,"Messwerte");
pSheet->Shapes->Item( _variant_t((long)1) )->Top = 0;
pSheet->Shapes->Item( _variant_t((long)1) )->Left = 0;
pSheet->Shapes->Item( _variant_t((long)1) )->Width = 400;
pSheet->Shapes->Item( _variant_t((long)1) )->Height = 200;
// it works until here now i want change some attributes of the chart so i have to use an SeriesCollection Object
IID IID_ISERIESCOLLECTION = {0x00020813-0x0000-0x0000-0xC000
0x000000000046};
ISeriesCollection *pscMyCollection;
pXL->ActiveChart->SeriesCollection( _variant_t((long)1) )->QueryInterface(IID_ISERIESCOLLECTION, (void**)&pscMyCollection);
pscMyCollection-> //here i want to acces members, e.g. Item, Add.. but it doesn't work
Thanks for Help
|
|
|
|
|
seemed to be the wrong Inteface.
Does perhaps someone know an InterfaceID with which i,ve got acces to SeriesCollection member?
|
|
|
|
|
I'm trying to create multiple buttons on a dialog page dynamically and have been able to get the buttons to appear, but i can't get the tools tips to work. Before I did this I was using static buttons and they worked fine. Now everything works except the tool tip. Could this be because I'm just using one resource button on that dialog page?
m_Icon[ndx].Create(_T(""), WS_CHILD | WS_VISIBLE | WS_TABSTOP , CRect(0, 0, 0, 0), this,IDC_BTN );//IDC_BTN is the only resource on dialog created in the dialog editor
Any idea to the limit of the number of objects that can be put on a page? Looks like I may have a max of 600 plus all the stuff to make the page into a x/y graph.
Thanks for any help
|
|
|
|
|
As I understand it, applications which share a dll will share the code segment of the dll. Each application will get a new data segment for the data in the dll.
This can be overridden with the #pragmas such that a shared data segment can be used.
And I understand that variables must be initilized in order to be in that data segment.
Now when I create a class, can I specify what data segment it's data members will be in?
related question:
Let's say I have an array[] of some type that is supposed to be member data of a class. Should I create it as global (to the shared memory segment) and then only have a pointer to it in the class? If so, will all instantiations of the dll class point to the same data?
Thanks,
-KS
|
|
|
|