|
Yes, thanks a lot!
that's what I needed!
|
|
|
|
|
I've been doing some work with IShellFolder and related shell interfaces, working mostly with PIDLs. I did some tests, and saw that the DWORD cast of a PIDL was the same for particular folders. My gut tells me that these pointers are calculated using each folder's ID, token if you will. Does anyone who has more experience with these know for sure if they are persistent for each folder/file/virtual folder in the Namespace?
|
|
|
|
|
Hi there
I'm trying to refactor some old code, and in the process I'm introducing a dll, that's to be used from atleast 5 app's. The exe's has som objects with operations on them that i want to call. And I run into troubles. And I cannot figure out how to make a funktion call from an mfc extension dll to an exe.
Please hint me.
thanks
kenneth
app,dll,exe,call
|
|
|
|
|
How about passing the DLL a pointer to a static or global function from the main process?
Kuphryn
|
|
|
|
|
well, i'm just not happy with globals, but it might be the only way.
I was hoping on something like an COM emulated solution, through interfaces or
just through instances.
k
|
|
|
|
|
Just wondering if you are are exporting the function/methods (and or the objects) from the .exe.
Trust in the code Luke. Yea right!
|
|
|
|
|
Hello,
I am new to MFC, please bear with me.
Within MainFrm.cpp, I have a function that is mapped as
ON_COMMAND(ID_STARTUP, DoStartupFunctions)
Now, I want to execute this before user can do anything else. Can you guide me on this ? Thanks.
Robert
|
|
|
|
|
Go to class wizard ( CTRL + W) and map a function to the message WM_INIT
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
Depending on what things you want to happen initially, you may need to put code in several classes, not just CMainFrame.
|
|
|
|
|
Normally the applications get initialized in the OnInitInstance handler.
Well after having said that, think always in the OOP and initialize class members inside it's own owner class (this will make your life easier).
And after having said this and going where you need to go..., I think there's a handler for OnInitialUpdate (If you want to initialize things after the view is created) OnCreate (if you want to initialize things while the view is created). Take a look at the class wizard as other CPian advice's you Ctrl+W and choose the best handler for your pourpose.
Hope this helps...
|
|
|
|
|
In your app's InitInstance() method, right after you create the mainframe window, do:
pMainFrameWnd->PostMessage (WM_COMMAND, ID_STARTUP);
This will cause the DoStartupFunctions() handler to be called before the user is permitted to interact with the app.
/ravi
Let's put "civil" back in "civilization"
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
Thank you, all. I got it. Wished I had asked before
Robert
|
|
|
|
|
Hi,
I'm looking for an Edit box where i can set the font size something bigger. Do somebody know such of control??
Thanks,
Willem
|
|
|
|
|
Yes, the Edit control is what you want. Just select a different font into its DC.
|
|
|
|
|
DavidCrow wrote:
Yes, the Edit control is what you want. Just select a different font into its DC.
okay, but how can i do that?
thank you!
|
|
|
|
|
Use SetFont() , which is a method of the base CWnd class. See the documentation of CFont before using this function.
/ravi
Let's put "civil" back in "civilization"
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
By using SetFont():
BOOL CMyDlg::OnInitDialog()<br />
{<br />
CDialog::OnInitDialog();<br />
<br />
m_font.CreateStockObject(SYSTEM_FIXED_FONT);<br />
m_edit1.SetFont(&m_font);<br />
<br />
return TRUE;<br />
}
|
|
|
|
|
create a font, and set the edit control to use it. The font object should be a member var in your dlg class.
Method 1:
---------
OnInitDialog()
{
...
m_oFont.CreatePointFont(80,"MS Sans serif");
m_oEditControl.SetFont(&m_oFont);
...
}
Method 2:
---------
static LOGFONT BASED_CODE sEditFont =
{ -10, 0, 0, 0, FW_BOLD, 0, 0, 0, 0, OUT_STRING_PRECIS, CLIP_STROKE_PRECIS,
DEFAULT_QUALITY, VARIABLE_PITCH|FF_SWISS, "Arial"};
OnInitDialog()
{
...
m_oFont.CreateFontIndirect(&sEditFont);
m_oEditControl.SetFont(&m_oFont);
...
}
|
|
|
|
|
|
There are a bunch of utilities here (like grids) that I would like to try out from VB.NET. Microsoft says that they have made it pretty easy but I have not seen any examples of how to do it. Anyone with experience at this?
|
|
|
|
|
Hello,
I want to create a shortcut from code and I have no idea how .... can anyone give me a hint ?
tnanks !
|
|
|
|
|
I think the IShellLink interface is what you are after.
|
|
|
|
|
|
Hi, I am required to create two activeX applications, one of them will be pre-install on the computer an the factory and the other will be used by service and support when the user logs in the site, the activeX will gather information from the system in order for S&S to keep track of the users who log in to the site.
It is also requested not to use the default pop-up window from IE but our own pop-up window to provide the information about the activeX.
Well the problem is I am an student and I have no clue about activeX, so if someone could share some tutorials or skeleton code, it would be great.
"Learn from the mistakes of others.
You can't live long enough to make them all yourself.
Age doesn't always bring wisdom. Sometimes age comes alone".
"Failure doesn't mean I'm a failure, It does mean I have not yet succeeded;
Failure doesn't mean that I should give up, It does mean that I should try harder;
Failure doesn't mean that I will never make it, It does mean that I need more practice".
Thank you for helping.
|
|
|
|
|
Dear all,
I am using the following function to display the members of a memberlist.
I need also to display the books of a booklist. If I use the comments then there is no compilation problem, but I cant display the books, on the other hand if I do not use the comments there is a compilation problem because get_member() function does not accept class Member* argument, but only class Book* argument. How can I generalise the function to accept both arguments, and display both books and members using the same function?
template<class object="">
void List<object>::displayElement(char* type)
{
if (num_elements == 0)
cout<<"No "<<type<<" is="" found="" in="" the="" "<<type<<="" "array.\n";
="" else
="" for(int="" element="0;" element<this-="">num_elements; element++)
{
cout<<'\n';
//this->element_list[element]->display(association_list.get_member(element_list[element]));
}
}
Regards,
grscot
|
|
|
|