|
onmoving()
{
invalidaterect(NULL);
}
I am the mighty keeper of the book on knowledge . Contact me to get your copy .
|
|
|
|
|
Hi all,
Is there a program out there somewhere that is designed specifically for user interface development? I mean something like the dialog editor in visual studio, but as a standalone program. I've seen that it is (sort of) possible with Visio, but I'm looking for something more sophisticated. For example, it would be nice if there would be support for custom controls, with a build-in bitmap editor or so. It would also be nice if it could export to .rc format. Thanks!
|
|
|
|
|
I'm trying to figure out a way to set the cursor's position. I can't seem to find any information about it. It appears to be possible because 3D Studio is capable of doing it*, but how?
* In 3D Studio, when you rotate an object, the cursor can actually go off the screen and appear on the other side, so the user is never limited in how far an object is rotated.
------------------------------------------
"What happened in that Rhode Island club is shocking. To think that over a hundred people would attend a Great White concert." - The Onion
|
|
|
|
|
|
Thanks! I discovered that I couldn't find the function because I'm using VS .NET and I had my filter set to "Visual C++". (Apparently, MS made a mistake by filtering this function when the filter is set to "Visual C++".) I discovered that if I chose "no filter" the function appeared in the help system.
------------------------------------------
"What happened in that Rhode Island club is shocking. To think that over a hundred people would attend a Great White concert." - The Onion
|
|
|
|
|
dear all
i have written a small app which detects windows shutdows or user logoff using WM_QUERYENDSESSION and runs an application say calculator using CreateProcess(..)
the problem is that i'm getting this error =>
"application cannot initialize because windows station is shutting down"
how do i ensure that the calculator runs whenever a user logs off or shuts down the computer.
the code is=>
case WM_QUERYENDSESSION:
{
Run(); //CreateProcess(...) code
if (lParam & ENDSESSION_LOGOFF)
{
MessageBox(hwnd,"User Logging Off..........", "User LogOff Detected", MB_OK|MB_ICONINFORMATION);
}
else
{
MessageBox(hwnd,"System Shutting Down..........", "System ShutDown Detected", MB_OK|MB_ICONINFORMATION);
}
return 1;
}
am i missing something crucial.
thanx
with Regards
|
|
|
|
|
rishabhs wrote:
am i missing something crucial
Not at all. You can not start any applications during the shutdown/logoff process. It's as simple as that.
If you want to simulate this, return 0 to cancel the shutdown (keeping track of what type of shutdown it is), run the application (set a timer or something...), and then initiate the shutdown from software when the application has finished (use ExitWindowsEx() - read the documentation).
Ryan
He who laughs last thinks too slowly.
|
|
|
|
|
thanx a ton 4 ur early reply
but is there any other way to do such a task.
bcoz if i can just know whether it is a logoff event or a system shutdown.
i can't know about a system restart
any clues!!!!!!!!!
regards
|
|
|
|
|
I'm not sure about a system restart. The docs state that the lParam value is a bitmask, and they only mention the ENDSESSION_LOGOFF value, but there may be another bit defined in the system is restarting. You could just run a few tests, by storing the value of this parameter as you try some shutdowns and restarts. Remember that if you return 0, the shutdown or restart won't actually take place, so you won't have to wait for it each time. Other than that, I'm not sure about detecting a restart. Sorry...
Ryan
He who laughs last thinks too slowly.
|
|
|
|
|
Hello,
Any body has idea how to implement MSN like Emoticon list
Regards.
The Phantom is Tracking Bullets
|
|
|
|
|
you can make an owner drawn menu .. or better use a modelless dialog box with picture box controls on it
|
|
|
|
|
I develop an MFC application, a plain simple window (non-doc View). I want to add an edit child control on this parent window. For this purpose i need to call CEdit::Create() in order to place control.
Now, I want to change the behaviour of edit control, for this purpose i derive my own class myedit from CEdit i.e class myedit:public CEdit . Then i add the member variable of myedit , m_myedit in project. Now do i need to call m_myedit.SubclassWindow() before calling m_myedit.Create() ???? Under what cases we need to call SubclassWindow/SubClassDlgItem() ????
|
|
|
|
|
Shah Shehpori wrote:
Now do i need to call m_myedit.SubclassWindow() before calling m_myedit.Create() ?
Nope! MFC takes care of subclassing the control as it is created when you call Create() .
Shah Shehpori wrote:
Under what cases we need to call SubclassWindow/SubClassDlgItem() ?
If the control were already created but did not have an MFC class attached to it, you would then need to sublclass it in order for your custom class to receive messages sent to it.
---
My whole life I've practiced the art of self-sabotage -- fearing success perhaps even more than fearing failure. I think I have got this flareup resolved, but I'm constantly waiting to see what new and exciting ways I can spoil my chances for a better life.
- koreykruse, Compulsive Skin Picking
|
|
|
|
|
be deriving a control when you set the veriable type to the derived type the sublassing is automatic .
on presubclasswindow()
{
//make any modifications before your control is subclassed
}
I am the mighty keeper of the book on knowledge . Contact me to get your copy .
|
|
|
|
|
Hi everybody
I have made a Listbox in which I have populated some string values.I want to read these string values from the list box and then after matching the value to some criteria I want to add the specific matched valued to another Dialog control. How can I do so. Plz provide me with the code if possible. It would be nice of u.
Reply me soon
|
|
|
|
|
|
This is One Example from MSDN just check it out
Example
// The pointer to my list box.
extern CListBox* pmyListBox;
// Dump all of the items in the list box.
#ifdef _DEBUG
CString str, str2;
int n;
for (int i=0;i < pmyListBox->GetCount();i++)
{
n = pmyListBox->GetTextLen( i );
pmyListBox->GetText( i, str.GetBuffer(n) );
str.ReleaseBuffer();
str2.Format(_T("item %d: %s\r\n"), i, str.GetBuffer(0));
afxDump << str2;
}
#endif
|
|
|
|
|
My program has to update the resource in the .exe file under Win98? What can I do?
stanley
|
|
|
|
|
You can load the Image File using win32 APIs.Then there is a section called .RSRC (Resource Section).Use Image header. Then you can manupulate the things..but then you have to take care of the file size and respective RVA's..
|
|
|
|
|
from MSDN:
The UpdateResource function adds, deletes, or replaces a resource in an executable file.
Update for win9x: UpdateResourceW is supported by the Microsoft Layer for Unicode. To use this, you must add certain files to your application, as outlined in Microsoft Layer for Unicode on Windows 95/98/Me Systems.
That means you can use the UpdateResourceW function after adding those files.
|
|
|
|
|
But I am sorry that which files are neccesary. Can you tell me which files are must added to my program? Help me, please.
stanley
|
|
|
|
|
Thank you! The problem is gotten rid of.
stanley
|
|
|
|
|
I am a newbie so bear with me. I have a dialog that launches another dialog(modal). This second dialog collects and wraps user data into a data structure. I want to pass this data structure back to the original dialog that launched it. The default ctor for the second dialog takes a pointer to a cwnd which is the parent. How can I do this? Should I create another ctor in the 2nd dialog that takes in a pointer to the parent and have a callback, or does studio provide an easier way. Thank you!
|
|
|
|
|
There are lots of ways of doing this. One way is to create the data structure in the parent dialog, and pass in a pointer or reference to it in the constructor of the second dialog. Then the second dialog modifies the reference directly so when DoModal() returns, the data structure contains all the user data already.
Dave
|
|
|
|
|
This way the user can not cancel the dialog, as changes have already been performed.
Please seem my other post for a different possibility.
My opinions may have changed, but not the fact that I am right.
|
|
|
|