|
Hi
When i create a MFC DLL with Automation option selected, wizard creates some functions for me. For example DllGetClassObject, DllRegisterServer
If i add second com class to my dll, how must i change the CoGetClassObject, DllRegisterServer code?
I see all the sample codes are about one class in one dll. i dont know what must be done if i want to add more than one class.
Also i wonder this:
If one dll contains 3 com class, it means there are 3 servers in one dll?
|
|
|
|
|
It's hard to explain COM in a small book let a lone in a short post so the best thing I can do is say try it and see. Try creating 3 separate Dlls, one object in each with the wizard and see where the code is the same and where it's different and if you can combine them manually. Also the theory of COM is different from the implementation of COM objects within a framework like MFC or ATL. Framework implementation details like COM Maps can be very confusing if you don't already understand what they're trying to achieve.
Learning by fiddling has always been the best way to learn programming and not just because that's how I did it.
Nothing is exactly what it seems but everything with seems can be unpicked.
|
|
|
|
|
How to set fontsize while printing??
|
|
|
|
|
Select the correct font into the Print-DC.
Though I speak with the tongues of men and of angels, and have not money, I am become as a sounding brass, or a tinkling cymbal. George Orwell, "Keep the Aspidistra Flying", Opening words
|
|
|
|
|
Did you try to set font on the DC ?
|
|
|
|
|
use CreateFont to create a font of the size you need
|
|
|
|
|
Hi everybody,
i create a RibbonMenu with dynamically added Buttons.
each Button gets a Command ID of WM_USER+100+i (i is incremented by i++)
Now the two questions:
Is there a Handler to catch an array of commands from WM_USER+101 till WM_USER+110 ?
The RibbonBar searches the command ID into the StringResource and uses the string as ButtonText
and Button-Tooltip
Is it possible to create dynamically a StringResource?
Big thanks for help !
|
|
|
|
|
baerten wrote: Command ID of WM_USER+100+i
Does it button ID, like IDOK, IDCANCEL, etc. ?
- NS -
|
|
|
|
|
baerten wrote: Is there a Handler to catch an array of commands from WM_USER+101 till WM_USER+110 ?
Yes, take a look at ON_COMMAND_RANGE[^] macro.
|
|
|
|
|
Big thanks for your help
|
|
|
|
|
Can Anybody tell me how tp Put the tool tip on Button
I am Using Win32 Application.
I find some thing from MSDN Regarding this. I am using Followind code but it gives error.
It is NotGetting the Handle of ToolTipWnd;
ToolTipWnd = CreateWindow(TOOLTIPS_CLASS,NULL, WS_POPUP, 0,0,0,0, hWndDlg, NULL,hInst, 0);<br />
<br />
if ( ToolTipWnd == NULL )<br />
{<br />
DWORD Error;<br />
Error = GetLastError();<br />
MessageBox(NULL,L"Error",L"",0);<br />
}<br />
<br />
SendMessage(ToolTipWnd, TTM_ACTIVATE, TRUE, 0);
<br />
TOOLINFO toolinfo;
<br />
memset(&toolinfo, 0, sizeof(TOOLINFO));<br />
<br />
toolinfo.cbSize = sizeof(TOOLINFO);<br />
toolinfo.hwnd = hWndDlg;<br />
toolinfo.uFlags = TTF_SUBCLASS | TTF_IDISHWND;<br />
toolinfo.uId = IDC_BUTTON1;<br />
toolinfo.hinst = NULL;<br />
toolinfo.lpszText =L"Hi ,,,,,,,,,,";
DWORD error;<br />
if(!SendMessage ( hWndDlg, TTM_ADDTOOL, 0, (LPARAM)&toolinfo ))<br />
{<br />
error = GetLastError();<br />
MessageBox(NULL,L"Error",L"",0);<br />
}
-- modified at 7:36 Thursday 6th September, 2007
|
|
|
|
|
This[^] will be a good start...
- NS -
|
|
|
|
|
hi.
Thanx for your reply. I Due to some problem I am not able to open that link.Actully i m not allowed to open Microsoft site. So can u tell me whats in it.
|
|
|
|
|
So I shall mail you the content...
- NS -
|
|
|
|
|
will be nice if u do so. or better if u tell me where i am wrong in my code.
|
|
|
|
|
Hi all,
I would like to know what the following does (does it operate like an if statement or something):
m_bIsConnected = ret == SQL_SUCCESS || ret == SQL_SUCCESS_WITH_INFO;
Many Thanks
Regards,
The only programmers that are better that C programmers are those who code in 1's and 0's
Programm3r
My Blog: ^_^
|
|
|
|
|
Programm3r wrote: does it operate like an if statement or something
Yes, something like that. In fact, the expression ret == SQL_SUCCESS 'returns' a boolean (true if they are equals, false if they are different). The same with the || operator. Thus, the complete expression returns a boolean, which is stored in m_bIsConnected.
|
|
|
|
|
|
hi all masters
i use sleep(5); in vc++(MFC) but error is that undeclared identifier
is there any other way to declare it
|
|
|
|
|
p_ wrote: is there any other way to declare it
Maybe by using the correct function ? Use Sleep instead of sleep
|
|
|
|
|
|
Use this define
#define 5 1+1+1+1+1
codito ergo sum
|
|
|
|
|
Hi all,
I have a binary file. I want to read as it is(i mean ones and zeros), and at the same time need to store in an array. Here is the code I used to read the file.
<br />
ifstream file( "G00046_002_01.srf" ) ; <br />
file >> noskipws ;<br />
typedef bitset< numeric_limits<unsigned char>::digits > bitset ;<br />
unsigned char byte ;<br />
<br />
if(filebin.is_open())<br />
{<br />
while( file >> byte )<br />
{<br />
cout << bitset(byte) ; <br />
filebin << bitset(byte) ;<br />
}<br />
filebin.close() ;<br />
}<br />
Can you guys tell me how store those zeros and ones on an array. I confusing that working with dynamic data and arrays. Tried, but failed.
Hi all....
|
|
|
|
|
|
Thanks,
Actually I want to store that read bits on an array. That's the place I'm wired.
Hi all....
|
|
|
|