|
Hi,
Go here:
Click me
and read Working with Windows Consoles: Part 1-4.
|
|
|
|
|
suppose i wan to have 2 views in an SDI that does not take up the whole frame, leaving space for some dialog controls.how do i do that? can i do the controls then split the view?
|
|
|
|
|
In a similar fashion to toolbars and status bars taking up some of the space from the frame,
you can add a CDialogBar too. And then put the controls on there.
Iain.
|
|
|
|
|
Hello
Does anyone knows a C++ library or an ActiveX component that can convert HTML to PDF? Or any other way to convert HTML to PDF in VC NET...
Freeware or the ones that just put their logo are needed
Thank you in advance
|
|
|
|
|
search on google
there are some free converters out there
and btw ... they convert most things to pdf as they act like virtual printer drivers
"there is no spoon" biz stuff about me
|
|
|
|
|
Look for Ghostscript. I think it will do what you want. I think!?
Larry.
Larry J. Siddens
Cornerstone Communications
TAME THE DOCUMENT MONSTER
www.unifier.biz
|
|
|
|
|
How do I toggle the toolbar items in the Doc/View architecture? They depress when clicked, but I can't get them to stay down or figure out how I can control this action programmatically.
halblonious
|
|
|
|
|
SetCheck in UI handler.
"...Ability to type is not enough to become a Programmer. Unless you type in VB. But then again you have to type really fast..."
Me
|
|
|
|
|
I need to access network resources that are available to the logged-in user from within a service. I would like to be able to do this without prompting the user for their username/password. It looks like I can use the ImpersonateLoggedOnUser API function to do this, but I need a handle to an access token for the logged-in user. If the service and the user are on the same box, I believe I can get the token via OpenProcessToken .
Here's the tricky part. Suppose the user is logged in on machine A, and the service is running on machine B. Is there a way to pass an access token for the user to the service, that will give the service access to the user's network resources?
Software Zen: delete this;
|
|
|
|
|
If you need to do this for only one user, then you can simply run the windows service under this user's account by reconfiguring it. Use Administrative tools on Windows 2000 or Control Panel on windows NT 4.0, select Services to find the service you want to configure.
If multiple users have to use the service, then the above does not work.
My articles and software tools
|
|
|
|
|
Hi,
I would like to know how to add a delay of say 1sec in my
MDI program !!!
Ehsan Behboudi
|
|
|
|
|
Sleep() - but then people may think you program is buggy or broken.
Neville Franks, Author of ED for Windows. Free Trial at www.getsoft.com
|
|
|
|
|
BuggyMax
|
|
|
|
|
maybe you want to use SetTimer
SetTimer(TIMER_ID, time);
Then just set up a message handler to check for TIMER_ID and do what you want in that message i think there are a few samples somewhere on this site :P
|
|
|
|
|
1. Sleep, but it prevents the program from responding to any other event during the Sleep interval.
2. CreateEvent to create a dummy event,
and then WaitForSingleObject
"It was when I found out I could make mistakes that I knew I was on to something."
-Ornette Coleman
|
|
|
|
|
void Delay(DWORD dwMsecs, BOOL bBlocking)
{
DWORD dwStrtmsecs, dwCurmsecs;
dwStrtmsecs = dwCurmsecs = ::GetTickCount();
do
{
if (!bBlocking)
{
MSG msg;
if (::PeekMessage(&msg, NULL, 0, 0, PM_REMOVE))
{
::TranslateMessage(&msg);
::DispatchMessage(&msg);
}
}
dwCurmsecs = ::GetTickCount();
if (dwCurmsecs < dwStrtmsecs)
dwStrtmsecs = dwCurmsecs;
} while ((dwCurmsecs < (dwMsecs + dwStrtmsecs)));
}
HPS HwndSpy - GUI developer's aid to visually
locate and inspect windows. For the month of August
only, use coupon code CP-81239 for 30% off.
|
|
|
|
|
im assuming this is for startup reasons?
what i do is after initialising all i need to simply send urself a message that "starts" the main app running
hope i got the right angle here
"there is no spoon" biz stuff about me
|
|
|
|
|
With CFrameWnd I can simply insert status bar by CStatusBar x(this) in OnCreate. But with CWnd it doesn't work. What else do I have to do? What is the difference between CWnd and CFrameWnd in this way?
|
|
|
|
|
CFrameWnd is the "frame" part of a window. CWnd is an MFC base class for all MFC window objects.
Kuphryn
|
|
|
|
|
I have a FILETIME struct that I want to perform arithmetic on (subtract a week from it). To do this, I need to convert it to a 64-bit integer, do the arithmetic, then convert back to a FILETIME. I've seen examples that do this with the ULARGE_INTEGER union. Something like this:
<br />
FILETIME ft;<br />
<br />
ULARGE_INTEGER uli;<br />
uli.LowPart = ft.dwLowDateTime;<br />
uli.HighPart = ft.dwHighDateTime;<br />
<br />
uli.QuadPart -= ...<br />
<br />
ft.dwLowDateTime = uli.LowPart;<br />
ft.dwHighDateTime = uli.HighPart;<br />
where the QuadPart is overlayed in memory with the LowPart/HighPart (since it's a union).
But is this legal... to set one union member and then read a different union member? Yes, I've tried it and it does work, but is it truly correct according to the language?
|
|
|
|
|
<br />
typedef union _ULARGE_INTEGER <br />
{ <br />
struct <br />
{<br />
DWORD LowPart; <br />
DWORD HighPart; <br />
};<br />
ULONGLONG QuadPart;<br />
} ULARGE_INTEGER; <br />
You should not have any problems since QuadPart is 64 bits, whereas LowPart and HighPart are 32 bits. LowPart holds the first 32 bits and HighPart represents the other 32 bits.
I hope this is correct since I never use unions and it has been 10 years since I have studied c++.
|
|
|
|
|
Yes, I realize the layout of the union. My question is sort of a tricky one that someone who is very familiar with the C or C++ language may know. Each language has specifications for what is and is not defined behavior. If something is not defined behavior, that means it may actually work sometimes or all the time, but it is still incorrectly coded. I seem to remember that it is illegal to assign to one union member and then read from a different union member. But I'm not sure, hence the question....
|
|
|
|
|
That's the whole purpose of a union - to be able to access a member by more than one name.
union u
{
DWORD dwValue;
struct s
{
WORD wValue1;
WORD wValue2;
};
};
Now I can assign a value to u.dwValue and read it as two WORD s by accessing s.wValue1 and s.wValue2 .
It looks odd but it definitely has its uses.
|
|
|
|
|
just use an overloded operatoer FILETIME operator-(FILETIME &ft, FILETIME &ft1);
|
|
|
|
|
Hi,
I'm not sure whether this is a fairly straightforward question or a lot to ask, but here goes...
I am creating a small file packing program. For selecting the files to pack, I am using a list box control with three button controls, "Browse", "Select All" and "Delete". Fairly straightforwardly, the combination of these controls lets the user browse for and select files to add to the list box, and to select and delete those items he or she wishes to get rid of etc. Everything is working great... Except that I have just realised that for this particular app the user is going to need to have the option to sort the items in the box by file type as well as by name. So I guess that means that I have to use a list _view_ control instead of a list box control, so that I can use multiple columns with headings and sort by them...
However, I have fallen at the first hurdle, as I am having problems finding concise information about how to set this up (I am relatively new to coding). My main problem is probably that I'm using _NO_ MFC, and all the tutorials/examples I can find seem to use MFC. Also there is a vast amount of info and a _long_ list of message descriptions on MSDN, but I can't seem to find any straight WinAPI examples that show the basics of setting up and populating a multi-column list view.
Could someone please point me towards a _NON_ MFC, standard C WinAPI tutorial/thread with info/any information at all on using list view controls to display a list of items with multiple columns? What I'm really aiming for is a simplified version of the sort of file list you get in WinZip or Windows Explorer (I just need to show file name, file type and path).
Many thanks to anyone who can tell me where to begin,
KB
|
|
|
|