|
thank you
it was helpful
Ehsan Behboudi
|
|
|
|
|
Hi,
I am modifying a DCOM sever, i have written some new functions and would like to package them into their own interface. How do i do this, a sample piece of IDL is shown for one of the interfaces that already exists on the object. Is there anything i need to watch out for? where do i get the uuid from
[
uuid(5E816CCA-628A-4959-B1FE-05465C3393EB),
helpstring("IDocumentVision Interface"),
pointer_default(unique)
]
interface IDocumentVision : IUnknown
{
}
Cheers
Rich
|
|
|
|
|
You can get the uuid from GUIDGen.exe, should be in the tools folder in your Visual Studio installation. I always add it to the tools menu for easy access.
|
|
|
|
|
If I use a prebuild command to auto-generate a source file, can I then add that source file to the current project?
|
|
|
|
|
Hi there,
I was wondering if there is anyway to detect what system DSNs are currently configured on a given machine within a Windows Application?
thanks
|
|
|
|
|
Look under this reg key: HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBC.INI
|
|
|
|
|
I'm using a CListView-derieved class which displays SQL-results in report style.
I decided to turn the background gray, so I called SetBkColor() in OnInitialUpdate. The problem is, that this backgroundcolor can only be seen in areas, where no items are draw and as a flickering background when scrolling the list.
What must be done to override the standard item background color?
Pseudocode is code to demonstrate a concept, not designed to be run.
Like certain Microsoft software.
|
|
|
|
|
|
Sorry, but it doesn't help me.
On handling this message, i can decide to paint or not paint the background.
This is well doing, and my desired black background is already painting but not at the items background. That is my problem. The areas, where no item is 'overpainting' are black.
Any idea?
--------------------------------------------------
"Pseudocode is code to demonstrate a concept, not designed to be run.
Like certain Microsoft software. "
|
|
|
|
|
Use identical color with LVM_SETBKCOLOR and LVM_SETTEXTBKCOLOR (or CListCtrl::SetBkColor/SetTextBkColor if you're using MFC):
CListCtrl &lst = ...;
lst.SetBkColor(RGB(255, 0, 0));
lst.SetTextBkColor(RGB(255, 0, 0));
This should make all background red.
Tomasz Sowinski -- http://www.shooltz.com
|
|
|
|
|
Attention please~~~
Hi~
I'm a University student preparing a graduation thesis, in Korea.
But in the process, there raised an obstacle, so I'm in stuck with a problem.
So now I sincerely call for your help...
As the question contains some images and source file, I make out html document file.
The address is http://my.netian.com/~sibuzigi/forsite.htm
I hope your quick and adequate answer.
p/s Please~~~ Somebody help me~~~!^^;;;;;;
|
|
|
|
|
the site is korean,, how do you expect an answer buddy?
Ehsan Behboudi
|
|
|
|
|
By reading Hangul. But that doesn't help when you get a page not found error.
|
|
|
|
|
Oh! I'm sorry! T.T......
I unloaded wrong URL by mistake.
So I correct now.
The address is http://my.netian.com/~sibuzigi/forsite.htm
please! help me!
|
|
|
|
|
The Windows GDI Platform SDK documentation for LOGFONT in MSDN states that the following can be used to set the font size in points when using the MM_TEXT mapping mode:
lfHeight = -MulDiv (PointSize, GetDeviceCaps (hDC, LOGPIXELSY), 72);
I've used this code to try to set the font height but it is unchanged at about 10/12 points height. Any ideas? My code is as follows:
BOOL CMyDialog::OnInitDialog () {
CDialog::OnInitDialog ();
GetFont ()->GetLogFont (&m_lf);
CDC* pDC = GetDC ();
m_lf.lfWeight = FW_BOLD;
m_lf.lfHeight = -MulDiv (8, GetDeviceCaps (pDC->hDC, LOGPIXELSY), 72);
CFont font;
font.CreateFontIndirect (&m_lf);
CWnd* pWnd = GetWindow (GW_CHILD);
while (pWnd != NULL) {
pWnd->SetFont (&font);
pWnd = pWnd->GetWindow (GW_HWNDNEXT);
}
return TRUE;
}
Derek.
|
|
|
|
|
You should make a modified font a class member, not a local variable. CWnd::SetFont (which wraps WM_SETFONT) doesn't create a font copy.
Tomasz Sowinski -- http://www.shooltz.com
|
|
|
|
|
I take it you mean the CFont, rather than the LOGFONT which is already a member (m_lf).
I'll try that, thanks.
|
|
|
|
|
If you just want to be able to set the font point size, use CreatePointFont(), it requires a handle to the device context....
CWindowDC dc(this);
CFont font;
font.CreatePointFont(120, "Times New Roman", &dc); //Creates 12 point Times New Roman Font
//The first value passed to the function should be 10x the point size you want.
|
|
|
|
|
How can I retrive and/or set NUM LOCK key state ???
Celebrate Mr. Cesilko!
|
|
|
|
|
GetKeyState or GetKeyboardState. The former gets the state of an individual key while the later gets the state for all.
|
|
|
|
|
I need to be able to use the ON_COMMAND_UPDATE_UI macro in a dialog. I was helpfully pointed to the WM_KICKIDLE private message and I have investigated how this works and what I need to do.
I have a class which inherits from CDialog to implement some common functionality across the dialogs I'll be using in my app. It includes changing the font for controls (a separate issue!) and enabling the handling described above.
Unfortunately it's not happening I have ON_MESSAGE(WM_KICKIDLE, OnKickIdle) in the message map and a LRESULT CMyDialog::OnKickIdle(WPARAM wp, LPARAM lp) function and there is an afx_msg LRESULT OnKickIdle(WPARAM wp, LPARAM lp); defined in the header file.
Using Spy++ I can see that the WM_KICKIDLE message is being posted for a standard CDialog-derived class that doens't include the handling, but it isn't being posted for my classes that derive from CMyDialog
Any thoughts?
|
|
|
|
|
I believe you need to call the following function in KickIdle
UpdateDialogControls(this, FALSE);
Christian
#include "std_disclaimer.h"
The careful application of terror is also a form of communication.
Eagles may soar, but weasels don't get sucked into jet engines.
|
|
|
|
|
I thought I'd found the problem having read an article at Earthweb. It seems that the process falls apart for modeless dialogs.
Apparently you are supposed to handle WM_KICKIDLE in the parent and manually post it to any child dialogs.
Unfortunately I've tried this and using Spy++ I can see that the dialogs are receiving the posted messages, but my code isn't handling them. My OnKickIdle function never gets called
|
|
|
|
|
WM_KICKIDLE shouldn't be used any more from memory. Instead use WM_IDLEUPDATECMDUI and call UpdateDialogControls() from your message handler.
I do this in ED4W and it all works very well.
Neville Franks, Author of ED for Windows
www.getsoft.com
|
|
|
|
|
Thanks. I'll try that instead
|
|
|
|