|
|
|
I am a jackaroo about C.
Thanks~
|
|
|
|
|
you can get MS's if you get a full version of Visual Studio.
or, you can just go get yourself a copy of gcc.
-c
"Half of the harm that is done in this world is due to people who want to feel important."
-- TS Elliot
|
|
|
|
|
im trying to serialize something but this works;
ar << m_bool;
and this doesn`t:
ar >> m_bool;
why?
|
|
|
|
|
i notice in "afx.h" that the CArchive class does not have an explicit override for '<< bool' so this may be the problem.
try casting it like this (as an experiment):
ar << (int)m_bool;
ar >> (int&)m_bool;
|
|
|
|
|
thanks it compiles just let me check if it works fine
|
|
|
|
|
As already explained, this was just an <i>experiment</i>.
For "the real stuff" you should provide your own streaming operators like:
CArchive& operator<<(CArchive&, bool);
CArchive& operator>>(CArchive&, bool&);
|
|
|
|
|
thanks i just did that.
|
|
|
|
|
From MSDN:
<code>ptMaxSize</code>
Specifies the maximized width (point.x) and the maximized height (point.y) of the window. For systems with multiple monitors, this refers to the primary monitor.
<code>ptMaxTrackSize </code>
Specifies the maximum tracking width (point.x) and the maximum tracking height (point.y) of the window. For systems with multiple monitors, this is the size for a window that is made as large as the virtual screen.
Whats tracking refer to ?
Thanks,
ns
|
|
|
|
|
tracking refers to dragging the edge of the window.
i think it harks back to the days when windows displayed a 'tracking rectangle' as you dragged instead of the dynamic resizing we get today.
|
|
|
|
|
Thanks. Next question. I set my max size hardcoded as
lpMMI->ptMaxTrackSize = CPoint(1228,872);
because thats what looks best on my machine. My XP resolution is 1280 by 1024 . If I maximise this app on a lower resolution machine, its going to go offscreen right? Or will it get as big as it can and stop there? If it goes offscreen I dont know how we'll get a hold of it to minimize it again (if the title bar is offscreen).
Should I not code this line?
Thanks,
ns
|
|
|
|
|
The max track size will only allow the window to be tracked to the maximum size that you set, or as far as the cursor can resize the window. Basically the max size is the minimum of what you specify, and the size of the screen that the window is running on.
Build a man a fire, and he will be warm for a day Light a man on fire, and he will be warm for the rest of his life!
|
|
|
|
|
many thanks! So I'm in no danger with my hardcoding....
|
|
|
|
|
have a look at the size that windows provides as a default.
typically this is the available desktop area.
then instead of hardcoding a value, you could do it like this:
lpMMI->ptMaxTrackSize.x = min(lpMMI->ptMaxTrackSize.x, 1228);
lpMMI->ptMaxTrackSize.y = min(lpMMI->ptMaxTrackSize.y, 872);
this way the size will not exceed your values on a high-res monitor but will also not exceed the desktop on lower-res monitors.
|
|
|
|
|
Appreciate your helpful responses. I actually tested the app hardcoded as is (without the nifty if condition you've given me, and it didnt make it off screen.). But I wil implement yopur solution.
Thanks again,
ns
|
|
|
|
|
Ok I know this is going to be simple, but how do I get a BN_CLICKED message for a static control?
Not one person lives in the present. Only the past. I can prove it.
|
|
|
|
|
Only buttons send BN_CLICKED (BN = button notification). You need to set the "notify" property for the static, and then handle the notification the control sends, STN_CLICKED .
--Mike--
Just released - RightClick-Encrypt v1.4 - Adds fast & easy file encryption to Explorer
My really out-of-date homepage
Sonork-100.19012 Acid_Helm
|
|
|
|
|
check it and try to run it
PeekMessage
who told u its simple?
r00d0034@yahoo.com
|
|
|
|
|
OK this is what I did. I open class wiz and overrid the OnCommand() function. I then check to see if hte wParam is equal to my static control. If it does then call what ever function I want. It worked out extremly simple. Just make sure you set the noify in the static control settings.
Darroll
Not one person lives in the present. Only the past. I can prove it.
|
|
|
|
|
You just need to make sure the control has a unique ID on the form and has the Notify style set for it in the resource editor.
Roger Allen
Sonork 100.10016
I think I need a new quote, I am on the prowl, so look out for a soft cute furry looking animal, which is really a Hippo in disguise. Its probably me.
|
|
|
|
|
I have a file that include html,gif (I know the file format). Have any control to show the file? Or what shold do to view the file ?
|
|
|
|
|
any boduy tell how to use TRACE("")in non MFC application
?
or its equal code?
i am trying it in a MFC dll but it did not display any message to out put window all other code after that line executed but TRACE("message") does not execute.
although it has not any error compiler recognise it but did not execute it.
r00d0034@yahoo.com
|
|
|
|
|
char buf[1000];
snprintf(buf, 999, "my message #%d\n", number);
OutputDebugString(buf);
-c
"Half of the harm that is done in this world is due to people who want to feel important."
-- TS Elliot
|
|
|
|
|
if i want to creat my own service.
1-it can communicate on the network using socket programming while the system is logoff.
2-it can automaticall login after half an hour?
any body could provide the releted link.
i have done socket programming but i did not know how to creat such a service because when system is logoff all runing service are also destroy.
r00d0034@yahoo.com
|
|
|
|