|
How it is shown the 'object name'? Is it a label (i.e. the caption of a control)? is it a text written using (for instance) TextOut inside the WM_PAINT message handler?...
Please be precise.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
|
A color with the same values for red, green, and blue will be a shade of gray. For example RGB (180, 180, 180) is a light gray, and RGB (100, 100, 100) is a darker gray. Set the text color to a shade of gray before drawing your object's name.
|
|
|
|
|
Change color of a text or a control?
|
|
|
|
|
Hi All,
Hopefully someone can help me, if possible
I have a problem with a locked chm file (htmlhelp file), it is launched from a printer driver so the process thats handling it is the explorer.exe, so when the help file is closed, explorer.exe still has a handle to the file. If I manual close the handle, using process explorer, then replace the file the html help window does not display the content. If I kill teh explorer.exe process and relaunch everything works OK.
I believe the problem is due to the hhctrl.ocx not being unloaded until explorer.exe is closed and restarted, is there a way to unload hhctrl.ocx without killing the explorer.exe?
Thanks!
|
|
|
|
|
Likely not - I believe that once a DLL is loaded into a process, unloading it is not possible (normally).
How about this - instead of opening the file itself, try copying it to a temp location and open the copy instead. After having it opened, open/close it again (via code) with the DELETE_ON_CLOSE flag and the file should clean itself up when it is finally closed.
Peace!
-=- James Please rate this message - let me know if I helped or not!<hr></hr> If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! See DeleteFXPFiles
|
|
|
|
|
Thanks for the suggestion, unfortunately this can not be done as it would involve re-writting alot of drivers. But if I can not unload it then there is nothing that can be done.
Thanks again!
|
|
|
|
|
Hello!
Recently, i faced with the problem of rotating selection area using MFC class CRectTracker.
Can anybody share this piece of code?
Thanks in advance.
|
|
|
|
|
The CRectTracker doesn't have the rotate function. Someone have develop class similar to CRectTracker that have this function. A useful class to do what you need is qTransformTracker and you can find it here www.codeguru.com/cpp/g-m/gdi/gdi/article.php/c3681
|
|
|
|
|
I know it. But since our application is written with usage CRectTracker reasonably simply to add this class with the necessary methods. Somebody already did it?
|
|
|
|
|
Excuse me I haven't understood your problem before. Unfortunately I don't know if someone have done this method before.
|
|
|
|
|
|
SandipG wrote: Does QTransformTracker[^] help?
No Since our application is written with usage CRectTracker reasonably simply to add this
class with the necessary methods.
|
|
|
|
|
nItem = m_ctrlList1.GetSelectedCount();
if (nItem > 0)
{
for (int i=0;i < nItem;i++)
{
m_ctrlList1.GetItemText(i,0,szText,sizeof(szText));
nItem = m_ctrlList1.GetNextItem(nItem, LVNI_SELECTED);
m_ctrlList1.Update(nItem);
::MessageBox(NULL,szText,"Test",MB_OK);
}
}
Im using ListCtrl with one column. If i have selected items 3,4,5, GetNextItem is showing item number 1 and 2.
Can anyone please tell where is the mistake?
|
|
|
|
|
Your code have several flaws (for instance you're badly changing the value of the variable nItem , that controls the loop). Try
int nSel = -1;
do
{
nSel = m_ctrlList1.GetNextItem(nSel, LVNI_SELECTED);
if ( nSel != -1 )
{
m_ctrlList1.GetItemText(nSel, 0, szText, sizeof(szText));
::MessageBox(NULL, szText, "Test", MB_OK);
}
} while (nSel != -1);
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
|
You are welcome.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
I'm working on an application that processes several kinds of file formats. The parsing and processing of the format take place in external plug-in libraries, implemented as DLLs. The parsers and processors are COM objects, implementing a few simple custom interfaces.
The problem is this: When importing files into the application we use a wizard with three pages (Select File->Define Settings->Finish). The first page of the wizard finds the correct external library to use for the file provided by the user, and then the library should create the second page with settings that apply to this file format only. This is where I get stuck.
One option would be to let the libraries add the page with something like this:
HRESULT GetPropertyPage(PROPSHEETPAGE** ppPage); However, the server application is implemented in MFC, and CPropertySheet doesn't play very well with the PROPSHEETPAGE struct. As far as I can see, there's no way to construct a CPropertyPage around a PROPSHEETPAGE . This solution would require that the first and last pages are implemented without MFC (not a major problem, but inconvenient).
Another option would be to venture into the world of IPropertyPage and other pre-defined interfaces. I have absolutely no idea on what to choose here, any input would be appreciated.
Thanks
|
|
|
|
|
Hi,
I have some code in Visual C++, which I had earlier compiled using Visual Studio 6.0, and it compiled and linked fine. But the same code which I converted to VS 2005, is giving me this error 2440, as follows:
error C2440: 'specialization' : cannot convert from 'BOOL (__stdcall *)(LPCSTR,UINT_PTR)' to 'BOOL (__cdecl *const )(const char *,UINT)'
I think this is the error regarding the calling convention. Could somebody resolve this problem for me?
Thanks in advance.
Sanjay Khapre
Software Developer
|
|
|
|
|
SanjaySMK wrote: Could somebody resolve this problem for me?
It would help a lot if you provide some code (how you declared your function, the expected prototype, ...)
|
|
|
|
|
can we use this grid in vs 2003
|
|
|
|
|
|
I'm using the VS 2008 MFC feature pack. ... Here ON_NOTIFY_REFLECT is not working can any one suggest the alternate for this messageHandler.
I tried with AFX_WM_RESETTOOLBAR but it is not working...
|
|
|
|
|
How about ON_CONTROL_REFLECT?
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
|
|
|
|
|
I have only the process name with me. I don't know how to get the process handle or the process id from the process name. Any api to fetch this.
Thanks..
|
|
|
|