|
As an occasional "real" C programmer (SDK level), I can say that I don't handle WM_GETMINMAXINFO - I leave it to the default handlers.
Don't the MFC gurus have a way to look at the MFC code, to see what MFC actually does with this message? As far as I remember (from talking to my local Alpha-geek) MFC just passes most of the low-level WM_ messages straight through to the native Windows handlers.
|
|
|
|
|
normanS wrote: Don't the MFC gurus have a way to look at the MFC code, to see what MFC actually does with this message?
CRect rectWindow, rectClient;
GetWindowRect(rectWindow);
GetClientRect(rectClient);
pMMI->ptMinTrackSize.x = rectWindow.Width() - rectClient.right;
pMMI->ptMinTrackSize.y = rectWindow.Height() - rectClient.bottom; is what I found as default behaviour. This is from CMiniFrameWnd and it might be different in other classes, but I did not find the implementation.
"We trained hard, but it seemed that every time we were beginning to form up into teams we would be reorganised. I was to learn later in life that we tend to meet any new situation by reorganising: and a wonderful method it can be for creating the illusion of progress, while producing confusion, inefficiency and demoralisation."
-- Caius Petronius, Roman Consul, 66 A.D.
|
|
|
|
|
virtualrush wrote: I was told...
Someone told you wrong, or you simply misunderstood.
"The words of God are not like the oak leaf which dies and falls to the earth, but like the pine tree which stays green forever." - Native American Proverb
|
|
|
|
|
WM_GETMINMAXINFO is used if you want to specify the maximum and minimum
possible widths of the window.
|
|
|
|
|
Hi all,
I m making a screen capture utility.
My application takes the screenshot after certain intervals but
if a tooltip window appears on the screen during capturing process
it doesnt capture it.
Please tell me how can i inform my application that
a tooltip window appears on screen and how to
capture its window bitmap?
I m trying to do it as but got problem
<br />
EnumWindows(&TooltipsWndProc,1);<br />
<br />
BOOL CALLBACK TooltipsWndProc(HWND hwnd,LPARAM lParam)<br />
{<br />
CHAR buf[256];<br />
GetClassName(hwnd,buf,256);<br />
if((lstrcmp(buf,TEXT("tooltips_class32"))==0)<br />
|| (lstrcmpi(buf, TEXT("tooltips_class")) == 0))<br />
<br />
{ <br />
<br />
MessageBox(NULL, "Tooltip", "TT",1);<br />
}<br />
EnumChildWindows(hwnd,&KillTT_EnableTooltips,lParam);<br />
return TRUE;<br />
}<br />
Its doesnt work for only tooltips, on each button click
the above MessageBox appears.
Thanx for ur +ve reply.
|
|
|
|
|
I m still waiting for reply from any guru.....
|
|
|
|
|
So you want to be informed when a tooltip is created by any application? If this is the case you will probably have to install a system wide hook. Look up SetWindowsHookEx . I'd probably use the WH_CBT variety. If you're not familiar with system wide hooks (as opposed to the safer and easier thread local hooks) you should read up on it before coding one since system wide hooks inject code into other processes and can thus crash them or worse.
Steve
|
|
|
|
|
Hello!
I want to write some aplication for example some proprietary TCP client that will connect to some server and receive and send messages. I want this functionality to be encapsulated in DLL library. Some GUI client will load this DLL and call its functions. So far so good. But here is a problem...when TCP client receives some message, I want it to notify GUI client trough some kind of callback function. How do I do that? How do I call a function that is implemented in GUI part from TCP client DLL?
I know I did something like that long ago when I was learning about DLL from MSDN article. I can't find this article now. I checked local and internet version of MSDN, but I just can't find it. The title was something like "Introduction to DLL's" or something like that and contained nice pictures of text and data segments mappings. If somebody knows this article please direct me to it.
Best regards,
Rostfrei
|
|
|
|
|
define a register callback function that take a function pointer as a paramater and export it out of the dll.
EX
bool RegisterCallback(bool (*FP)(void *,const char *,const char *),void * passin)
This defines a function that takes a void pointer and a pointer function that returns a bool and takes a void pointer and two character pointers.
I have found that when you define a function that takes a call back you should allways have a void pointer in the callback deffinition and in the called function so you have some way to pass data into the callback.
a programmer traped in a thugs body
|
|
|
|
|
Hai,
I am just struggling to read the data which i have put into the LPSTREAM.
Can any one help me?
Here is the code snippet:
char *buf = new char[statstg.cbSize.LowPart];
hrRetTemp=lpStream->Read((void *)buf, statstg.cbSize.LowPart, &ulBytesRead);
I dont get any data in the "buf" .Pls help me.
Saravana Kumar
|
|
|
|
|
Run it in the debugger after placing a breakpoint after the Read call. When the breakpoint is hit type "hrRetTemp, hr" in the watch window. This should show a textual representation of the error.
Steve
|
|
|
|
|
hi
i have a dialog class.I want to get Document Pointer in that class and using that access a member variable of the Document class.
how to get the document pointer in the dialog class?
|
|
|
|
|
|
Instead of accessing the document's member variables directly, you'd be wise to use a "getter" method instead. For example, if the document contained information about a person, it should have method for retrieving that information something like:
class CMyDocument : public CDocument
{
private:
CString m_strName;
CString m_strAddress;
UINT m_uAge;
public:
CString GetName() const;
CString GetAddress() const;
UINT GetAge() const;
};
"The words of God are not like the oak leaf which dies and falls to the earth, but like the pine tree which stays green forever." - Native American Proverb
|
|
|
|
|
hi~everyone
i hava a question puzzle me ! when i used "CFile's" open()function read a file use unicode in windows 98
but it's allways fail !
please help me ande very thanks in advance!!
nothing
|
|
|
|
|
|
ebinaini wrote: ...but it's allways fail !
Define "fail."
"The words of God are not like the oak leaf which dies and falls to the earth, but like the pine tree which stays green forever." - Native American Proverb
|
|
|
|
|
i can't get the handle of file and i install MLU in windows 98
thanks in advance!
nothing
|
|
|
|
|
ebinaini wrote: i can't get the handle of file...
Why not? What does the code snippet look like that does not work?
"The words of God are not like the oak leaf which dies and falls to the earth, but like the pine tree which stays green forever." - Native American Proverb
|
|
|
|
|
can anyone expain this logic flow!i mean the for loop makes no sense to me!...yet it works!and displays the map of india!
#include <stdio.h>
main()
{
int a,b,c;
int count = 1;
for (b=c=10;a="- FIGURE?, UMKC,XYZHello Folks,\
TFy!QJu ROo TNn(ROo)SLq SLq ULo+\
UHs UJq TNn*RPn/QPbEWS_JSWQAIJO^\
NBELPeHBFHT}TnALVlBLOFAkHFOuFETp\
HCStHAUFAgcEAelclcn^r^r\\tZvYxXy\
T|S~Pn SPm SOn TNn ULo0ULo#ULo-W\
Hq!WFs XDt!" [b+++21]; )
for(; a-- > 64 ; )
putchar ( ++c=='Z' ? c = c/ 9:33^b&1); return 0;
}
-- modified at 5:22 Wednesday 25th January, 2006
|
|
|
|
|
|
|
|
First shot:
namaskaaram wrote: a="- FIGURE?, UMKC,XYZHello Folks,\
TFy!QJu ROo TNn(ROo)SLq SLq ULo+\
UHs UJq TNn*RPn/QPbEWS_JSWQAIJO^\
NBELPeHBFHT}TnALVlBLOFAkHFOuFETp\
HCStHAUFAgcEAelclcn^r^r\\tZvYxXy\
T|S~Pn SPm SOn TNn ULo0ULo#ULo-W\
Hq!WFs XDt!"
This is the map of india, XORed with some easy key.
namaskaaram wrote: for(; a-- > 64 ; )
putchar ( ++c=='Z' ? c = c/ 9:33^b&1); return 0;
This displays spaces or '!', ++c=='Z' ? c = c/ 9:33^b&1 being the decyphering code.
More in a while...
~RaGE();
|
|
|
|
|
Rage wrote: This displays spaces or '!', ++c=='Z' ? c = c/ 9:33^b&1 being the decyphering code.
we have a ?: operator here, so might be seen this way first :
putchar(
(++c == 'Z') ?
(c = c / 9) :
(33 ^ (b & 1))
);
TOXCCT >>> GEII power [toxcct][VisualCalc 2.20][VCalc 3.0 soon...]
|
|
|
|