|
|
I want to paint something outside of the client rect, but how to get that area?
Who can help me out? I would like to know if there is a function that returns a CRect.
Thanks
|
|
|
|
|
GetWindowRect returns that. Note that returned rect is in screen coordinates.
Tomasz Sowinski -- http://www.shooltz.com
|
|
|
|
|
|
How can I change the size of a Title Bar? I tried changing the CREATESTRUCT of the WM_NCCREATE message, but that didn't work...
Thanks in advance
|
|
|
|
|
|
"The WM_NCCALCSIZE message is sent when the size and position of a window's client area must be calculated. By processing this message, an application can control the content of the window's client area when the size or position of the window changes." - MSDN
I know it must be possible, as the size of the Title Bar changes when the dialog is a 'Tool window'
Can somebody please help me out? Some source code would be greatly appreciated.
|
|
|
|
|
So what's the problem? Capture the message and return the client area small or big enough for given titlebar size.
Tomasz Sowinski -- http://www.shooltz.com
|
|
|
|
|
See this article for funky nonclient area drawing tricks.
/ravi
"There is always one more bug..."
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
Thanks! That might be what I'm looking for.
|
|
|
|
|
i have a 1 to many dialog
i show one record of many and have a list showing all.
i would like have the list hilight the current record while either browsing or editting the current one.
So my actual question is:
Is there a way to hilight a row on a listcontrol without having focus?
|
|
|
|
|
|
i have tried that but the row is only hilighted with the control has focus.
as soon as focus is lost the hilight also goes away.
would be greatful for anyother suggestions. thank you.
|
|
|
|
|
Do you have 'Show selection always' option set in the dialog editor?
If you're creating list control dynamically, use LVS_SHOWSELALWAYS style.
Tomasz Sowinski -- http://www.shooltz.com
|
|
|
|
|
that is exactly the problem. thank you very much.
|
|
|
|
|
Hi ,
I am trying to create an editor similar to MS VisualStudio's
Resource Editor for Dialog.
In this I need to create a Label, which would contain Text
and be dragged around and also be resized.
Can some one tell me how it can be done.
Thanks,
Sansky
|
|
|
|
|
Howdy,
I think you would need to override several mouse functions in your Label class to do the following:
OnLButtonDown: Track when the user clicks and if they have the left button down so that you can know what to do when they move the mouse
OnLButtonUp: Again, use this to remember the mouse button state
OnMouseMove: Inside here test to find out if the mouse button is down and if so, use MoveWindow to move your window to the same coordinates as the mouse is moving to
I think that should do it, but this is just a guess. Hope it gives you a good direction to start looking...
Dave
|
|
|
|
|
Hi,
Thanks, What I need is, how do I create, display ,move and
resize Label
Also I might need to display the Label in the CView, as I
am not sure if I could drag and resize objects in CDialog.
Any suggestions
Regards,
Sansky
|
|
|
|
|
Is there a way to use something like the Internet Explorer "Save as" method in my own programs? I want to save a webpage including the images...
Is there a method / macro to use or do i have to do it all manually ( extracting the tags etc..)?
Thanks for your help...
|
|
|
|
|
Hello,
My application need during execution
to dinamically load a driver (.sys).
How can I do this programatically?
Also, how can I use Visual C++ to
compile a driver? I search in MSDN
and fount at visual c++ linker options
"Use the /DRIVER linker option to build a Windows NT kernel mode driver. ". But how should I use this? I can't figure myself.
Thanks
|
|
|
|
|
Don Miguel wrote:
Also, how can I use Visual C++ to
compile a driver?
You'll need a DDK. DDK is the acronym for Driver Development Kit. http://www.microsoft.com/ddk/ has the details. AFAIR, DDK for Win2000 is even available as a free download.
Tomasz Sowinski -- http://www.shooltz.com
|
|
|
|
|
You can set up a driver project in VC, though its a good idea to look at what build.exe does first. For the linker, the /subsystem:NATIVE,400 /driver settings will be needed. Compiler switches will vary based on language (c or c++). The NTDDK libs (int64.lib ntoskrnl.lib hal.lib) want _stdcall calling convention.
On NT, you can dynamically load a driver using the service control manager, calling CreateService with SERVICE_KERNEL_DRIVER as the service type, then StartService . This doesn't work on Win9x though - not sure if its possible without user interaction (can u say PnP?).
|
|
|
|
|
Hello Tim,
Thanks a lot for the tips with linker.
Those are exactly what I need.
Best regards,
Miguel
|
|
|
|
|
Hello Don,
To dynamically load a device driver in your (win32 USER-MODE) application, you would use the CreateFile() API. For example :
hDriver = CreateFile
(
"\\\\.\\Omron",
GENERIC_READ | GENERIC_WRITE,
FILE_SHARE_READ | FILE_SHARE_WRITE,
0, // Default security
OPEN_EXISTING,
FILE_FLAG_OVERLAPPED, // Perform asynchronous I/O
0
);
Notice that the format of the first parameter. A device driver is named using the convention "\\.\<Device name>".
You can get the list of names of devices when you look up the Control Panel's Services applet.
After a successful call to the CreateFile() API, you will be returned a handle to the device driver (hDriver as in the above example). You communicate with the device driver via the DeviceIoControl() API. For example :
bReturnCode = DeviceIoControl
(
hDriver,
IOCTL_OMRON_WRITE,
&lWriteCode, sizeof(lWriteCode),
&byReturnByte, sizeof(byReturnByte),
&dwBytesReturned,
&ov
);
The second parameter specifies the control code for the operation that the device is supposed to perform. The technical manual (or SDK) for your device should supply your with these information.
The other parameters are for transferring data to and from the device driver. Look up the API documentation for details.
As for compiling a device driver, the traditional way is to install DDK as mentioned by Thomas in his mail.
Hope the above helps, Don.
Best Regards,
Bio.
|
|
|
|
|
Hello Bio,
Thanks a lot for your help,
you bring many light in my project.
Thanks also for pointing to me
difference between USER-MODE and
KERNEL-MODE, I was on a wrong way in my
judgement about my task.
Best regards,
Miguel
|
|
|
|