|
As best as I can remember, they represent three groups of read/write/execute. Correct? What does the initial 'p' represent?
"Take only what you need and leave the land as you found it." - Native American Proverb
|
|
|
|
|
Here is the situation:
I have a main window, that can have many sub windows/objects. ie ComboBox, push buttons, radio buttons, text boxes etc.. Some of those objects inside that window are hidden and only become unhidden when an event happens, like a button being clicked or a Combobox item is selected.
The window that I am getting is a black box, that is that I dont get the code, and it can change at any given build.
Here is the problem:
I am still fairly new to MFC/Windows API. I have used hooks on other parts of the code, and was just wondering what hook would you use to find out if there was a hidden object that was about to become unhidden as a result of a button click or some other event. If there is no hook, is there another solution that I am not familliar with?
Any help/links on this would be extremely helpfull.
Thanks in advance.
MyJob = herdingCats();
Maddo
|
|
|
|
|
Hi Friends,
I am store some data into vector and mapping it long key for searching (1::1 mapping).Below code
---------------------.h file------------------------
typedef std::vector<item *=""> m_cache;
typedef std::map<long, item="" *=""> m_index;
typedef std::pair<long, item*=""> INDEX_ENTRY;
INDEX_ENTRY IndexEntry(Item * plu);
--------------------.cpp-------------------------
m_cache.push_back(item);
m_index.insert(IndexEntry(item));
-------------------------------------------------
Now the requirment is to retrive the same data with any of 2 different key long1 and long2 from the same vector(1::2 mapping). Can you please help me how to do this?
Thanks
-- modified at 11:13 Tuesday 25th October, 2005
|
|
|
|
|
Calling EgWin::Calibrate works only if i do some stuff like Write nothing before i call another void in an unmanaged dll. Why does it not work if i take out this stupid Console::Write("") ??
<code>
class EgWin
{
public:
EgWin() {}
~EgWin() {}
int Init() { return EgInit(&stEgControl);}
void Calibrate(IntPtr hwnd){Console::Write(""); EgCalibrate(hwnd);}
};
public __gc class EgWinProxy
{
public:
EgWinProxy(){}
~EgWinProxy(){}
int _EgInit(){return mpC->Init();}
void _EgCalibrate(IntPtr hwnd){mpC->Calibrate(hwnd);}
private:
EgWin * mpC;
};
</code>
|
|
|
|
|
Thanks for your help with Subclassing in Visual Studio 2003.
However I have a new problem.
When creating a Editbox to store initials in, i created the class correctly and linked it to a EditBox. The Subclass was called CInitials and was derived from CEdit. The problem came when I trying to add the WM_CHAR message.
It doesnt show up on the 'Add Event Handler' dialog. The message im trying to filter is OnChar.
Any help will be appreciated.
Thanks
Tom
|
|
|
|
|
Hi,
Follow this
CInitials::CEdit(derived from CEdit)
make a control variable from CInitials and link it to the editbox(through classwizard)
then you will be able to tap it on the CInitials::OnChar(..)(through classwizard),
or else add the EN_CHANGE handler this will also help you .
Regards
FarPOinter
|
|
|
|
|
Thanks, but im using Visual C++ 7.1 not Visual Studio 6.0.
Visual C++ 7.1 comes with Visual Studio 2003.
Thanks for the suggestion anyway.
Tom
|
|
|
|
|
Tom Moore wrote: When creating a Editbox to store initials in, i created the class correctly and linked it to a EditBox. The Subclass was called CInitials and was derived from CEdit. The problem came when I trying to add the WM_CHAR message.
It doesnt show up on the 'Add Event Handler' dialog. The message im trying to filter is OnChar.
In Visual C++.net 2003 follow these step to get add handller automatically
In Class View,
#1 Right Click on Class
#2 Select Properties
#3 when properties Windows open, click on appropiate Icon of Message or overides to get handller.
Hope this work for you
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
Hello,
I've been trying to implement an autosave method for an SDI application. There is an article about how to do this here. However, my coding isn't that great, and filling in the missing bits (i.e. where to put the snippets of code) is causing me, and the compiler, problems.
At the moment I'm struggling with the AutosaveTimerChildProc bit. Where does that go?
Can anyone offer some help. A example implementation would be really helpful to me.
Cheers,
Mark
|
|
|
|
|
I've already used the GetProcAddress function for half a dozen functions but it seems I've got a problem with that one. Might be a problem with the prototyping but there are few pages about it on the web and it is the first SH* function I try to get the address for.
I tried all the prototypes I could imagine WINAPI, STDAPI, STDAPICALLTYPE with extern "C", dllimport and other __cdecl, __stdcall gave nothing.
So here's the code, any idea welcome:
typedef int (__stdcall *LPFNSHGETICONOVERLAYINDEX)(LPCSTR, int);<br />
HMODULE hMod = ::GetModuleHandle(_T("Shell32.dll"));<br />
if (hMod) {<br />
LPFNSHGETICONOVERLAYINDEX lpfnSHGetIconOverlayIndex;<br />
lpfnSHGetIconOverlayIndex = (LPFNSHGETICONOVERLAYINDEX)GetProcAddress(hMod,_T("SHGetIconOverlayIndex"));<br />
if (lpfnSHGetIconOverlayIndex) {<br />
m_nIndexOverlay = lpfnSHGetIconOverlayIndex("C:\\", IDO_SHGIOI_LINK);<br />
}<br />
}<br />
Yarp
http://www.senosoft.com/
|
|
|
|
|
Try SHGetIconOverlayIndexA or SHGetIconOverlayIndexW
|
|
|
|
|
I have found several nice articles on customizing and superclassing CFileDialog to do things like change the dialog size and defaulting to a particular view (list, detail, thumbnail) when displaying files. I haven't found anything on how to change the file display order. I would like to show the files in detail view (done) and then order them by date, descending, in the view. There doesn't appear to be any programatic way to do this, short of creating my own file dialog box from scratch. I have attempted to send messages faking a left click on the date header, but that does nothing.
It would be really nice to show the user the newest files to process. Any ideas?
Thx in advance
"It takes a minimum of redesign to turn a crucifix into a pogo stick"
|
|
|
|
|
**Sigh**
Nevermind. I figured it out. I had to fake up a WM_NOTIFY to the undocumented control that houses the listbox that contains the file names. I had to fake a left click and populate an NM_LISTVIEW structure and pass it into the SHELLDEF_view window message processor. The fake was to tell it the message was from its list control. Send 2 messages to order in descending order.
Whatta zoo.
"It takes a minimum of redesign to turn a crucifix into a pogo stick"
|
|
|
|
|
How to get the same intensity after stretching an image
eg:
Let intensity of a square of 1 unit = 1 x I1
If I stretch the square to 2 units then the intensity = 2 x I2
Both these intensities should be equal
1xI1 = 2xI2 = k(constant)
I am using bilinear interpolation for stretching but the intensities arent equal.
Is there some other method for stretching so that I ll get same intensity in both the images.
Pls Help
|
|
|
|
|
Well I guess you can solve the problem just by dividing Intensity in each pixel by a stretch factor. In above example- just divide it by 2.
But I think your problem could be deeper- if you imagine an image,
and you zoom in (for example you double the number of pixels in both directions -> you see 4 times more pixels), it means that you are watching sub-pixels, and they have area of 1/4 of original pixel. Therefore you have 4 times more pixels, but each of them has just 1/4 of unit area.
|
|
|
|
|
Thanks a lot
Is there any algorithm or filter which I could use to reduce the intensity? It should work both ways (stretching and shrinking).
|
|
|
|
|
I have created one dialog box. Then I have created a view class
with help of menu Insert -> Form.
CMultiDocTemplate* pNewDocTemplate = new CMultiDocTemplate(
IDR_TRIAL_TMPL,
RUNTIME_CLASS(CMDIDocumentDoc), // document class
RUNTIME_CLASS(CMDIChildWnd), // frame class
RUNTIME_CLASS(trial)); // view class
AddDocTemplate(pNewDocTemplate);
Even New template is seen in File -> New but it does not display
my dialog but gives error "Debug Assertion Failed in viewform.cpp'
I am sure I am missing some step while creation of view class
Please help me
|
|
|
|
|
shivditya wrote: ...but gives error "Debug Assertion Failed in viewform.cpp'
Have you looked at the line in viewform.cpp to see what condition is causing the assertion to fire?
|
|
|
|
|
No but If I replace my view class name with any view class made by the earlier programmers view class the application is opening its dialogs. I have gone in viewform.cpp but it seems to be useless it is mfc's cpp.
|| ART OF LIVING ||
|
|
|
|
|
Please some body reply
|| ART OF LIVING ||
|
|
|
|
|
If you find the reason why viewform.cpp gets into trouble, then you might find out the cause of why it happens.
|
|
|
|
|
IT IS TELLING LINE NUMBER IN VIEWFORM.CPP WHILE DEBUGGING ,IT IS NOT GOING TO THAT ERROR. WHEN I AM OPENING VIEWFORM.CPP THERE ARE MANY FUNCTIONS HOW CAN I UNDERSTAND WHERE IS ERROR?
I AM BEGINNER SO I AM SURE SOME SILLY STEP I AM MISSING
WHILE CREATING VIEW CLASS PLEASE HELP?
|| ART OF LIVING ||
|
|
|
|
|
I'm using VS 6.0.
When your program has aborted (while debugging it), take a look in the window below the code window (in Visual studio).
There you have a small window with the name "Context". The text line itself shows the function where the program took a dive.
Now, if you press the down arrow at the right of that text line, you will get a list of all of the functions your program has on it's call stack.
There will be (at least) one function name that you will recognize (because it's in your program).
Select that line and the editor window will show your code, together with a green arrow. The green arrow will point at the line (still in cour code) that was the reason for the error.
Another way to do this (sill in VS 6.0), is to select (from the VS menu), View->Debug Windows->Call Stack (or press Alt-7).
Double-click on the most upper line that has a function name that's in your code and the editor takes you to the line in error.
And please, for your own sake, get a book about Visual Studio. I'm sure you will find the time spent on reading to be worth while.
Good luck.
kakan
|
|
|
|
|
Sorry, I wasn't logged in when i wrote the answer.
|
|
|
|
|
Hello, everyong!
who can tell me the difference between "std::wstring" and "std::string" ? For unicode, I want to replace "std::string"
with "std::wstring", what I should pay attention to ? Please instruct me, thanks a lot!
|
|
|
|