|
I don't have .NET, so ctime it is.
one more thing:
The msdn-doc says this about ftime: All versions of the C run-time libraries.
[VISUAL STUDIO 6.0] [MFC] [WIN98/2]
Bluute tette!
|
|
|
|
|
Grote Smurf (aka frisco) wrote:
The msdn-doc says this about ftime: All versions of the C run-time libraries.
What's wrong with that?
Tomasz Sowinski -- http://www.shooltz.com
To some its a six-pack, to me it's a support group
|
|
|
|
|
You can read it as: All versions of the C run-time libraries, including vc6 run-time.
[VISUAL STUDIO 6.0] [MFC] [WIN98/2]
|
|
|
|
|
Isn't that correct information? They refer to 64-free version.
Tomasz Sowinski -- http://www.shooltz.com
To some its a six-pack, to me it's a support group
|
|
|
|
|
Try this - from my CSimpleDate class here on CP:
<br />
{<br />
long time_val ;<br />
struct tm *tm_ptr ;<br />
<br />
time( (time_t *)&time_val) ;<br />
tm_ptr = localtime( (time_t *)&time_val) ;<br />
<br />
m_Hour=tm_ptr->tm_hour;<br />
m_Min=tm_ptr->tm_min;<br />
m_Second=tm_ptr->tm_sec;<br />
if(m_Hour >= 12)<br />
{<br />
m_bPM=TRUE;<br />
m_Hour-=12;<br />
}<br />
else<br />
m_bPM=FALSE;<br />
}<br />
We are called the nation of inventors. And we are. We could still claim that title and wear its loftiest honors if we had stopped with the first thing we ever invented, which was human liberty.
Mark Twain- Foreign Critics speech, 1890
|
|
|
|
|
So, where do you guys get your icons for your application?
You go to msdn and get them over there?
You have an in-house artists who creates them?
You downloaded a nice collection of the internet? url?
Or you just open an executable and take the icons from there. If so, what program can you use to extract that nifty looking 256-color bitmap icons out of an executable.
And finally, are the icons I take from eg. shell32.dll royalty free?
My graphic ability is a bit on the low side
Thanks in advance
Wim
|
|
|
|
|
We create them mostly in-house.
Wim Jans wrote:
what program can you use to extract that nifty looking 256-color bitmap icons out of an executable
You can use Visual Studio. In file open dialog, select "Resources" in Open as combobox.
Pavel
Sonork 100.15206
|
|
|
|
|
Its amazing how much good icons can improve your application.
I used to spend ages making, what in the end turned out to be pretty crap, icons.
check out www.glyfx.com, they have a free version of the typical icons available with VC++ but you can pay them for more advanced icons.
or if you feel adventurous try out
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnwxp/html/winxpicons.asp
Asim Hussain
e: asim@jawache.net
w: www.jawache.net
|
|
|
|
|
How can I get the width of a char in a view(in pixels). It seems to be difficult for me coz each chars width will be different
|
|
|
|
|
GetTextExtent or GetTabbedTextExtent API functions or correspoding methods of CDC in MFC.
Pavel
Sonork 100.15206
|
|
|
|
|
Since I want the char size in OnChar function itself, i cannot use GetTextExtent API. I have the log font size stored in a variable. But it is in logical units. I want to get the pixel size.
|
|
|
|
|
You can use CWnd::GetWindowDC/ReleaseDC to get/release a display context of the window.
Pavel
Sonork 100.15206
|
|
|
|
|
Try this ...
CSize size = pDC->GetTextExtent(sChar);
int nWidth = size.cx;
Best regards,
Eugene Pustovoyt
|
|
|
|
|
Since I want the char size in OnChar function itself, i cannot use GetTextExtent API. I have the log font size stored in a variable. But it is in logical units. I want to get the pixel size.
|
|
|
|
|
I need to use a device driver (developed by a colleague of mine)
in my application that runs on WINNT and I have the following problem:
I can access to the driver (CreateFile and OpenEvent) only if
I'm logged with an Administrator user.
Non-administrator users cannot access to the driver even if it
starts automatically with the OS.
Is this a normal situation or can I do something to allow the
application to access to the driver even if it is used by a
non-Admin user ???
|
|
|
|
|
I assume you checked the return code for the failed CreateFile() and it was #5 (access denied). If so then the most likely problem is the device driver was installed requiring admin privs to connect to it. Check the install.
|
|
|
|
|
What's that thingy called?
I'm trying to add one to my app. If you're not sure what I mean, open Windows Explorer and make the left pane much wider, which results in a now shorter right pane. What the heck is that thing called that lets you do that? The closet I've come so far is "Rebar control" and that seems to only apply to the one control it's attached to.
I'm attempting to add one to my app using C++ through the API, so if you can step up and play "Name That Control" I'd appreciate it. No MFC references please.
--chajadan
|
|
|
|
|
|
Well that definitely gave me an anchor point for my searches, but I'm looking for the direct Win32 API calls I need to make, not the MFC ones. Perhaps if I knew of a good MFC reference that detailed the underlying API calls things would be much easier on me, but I don't.
--chajadan
|
|
|
|
|
Splitters are not a built-in control, you'll need to code them yourself. For a good reference, check out MFC Internals which goes into painstaking detail on MFC's splitters.
--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
|
|
|
|
|
Hi Gang,
I was wondering if anybody has a sample of a CFileDialog where I can select more than 12 items. It reliably selects 12, just nothing more. When more are highlighted, it just returns nothing. Any ideas?
Env: VC6,sp5,XP/SP1
Thanks,
Nick
|
|
|
|
|
my memory of this is that for multi selection to work you must ensure that the buffer you pass in for the filenames is adequately sized.
might this be the problem?
|
|
|
|
|
|
Nishant S wrote:
You need to allocate enough memory for the lpstrFileTitle member of the OPENFILENAME struct as well change the nMaxFile member!
Nish
Hey Nish, do you by chance have a quickie example? My program keeps excepting. I'm sure it's something simple.
Thanks for the help,
Nick
|
|
|
|
|
Hi Nick,
the following code allows you to open multiple files in a MDI app.
Tabbing got lost
<br />
void CManagerApp::OnFileOpen() <br />
{<br />
CFileDialog dlg(true, _T("process"), NULL,<br />
OFN_ALLOWMULTISELECT | OFN_EXPLORER | OFN_FILEMUSTEXIST | OFN_HIDEREADONLY,<br />
_T("Process definitions (*.process)||"));<br />
<br />
DWORD dwMaxFile = 4096;<br />
dlg.m_ofn.nMaxFile = dwMaxFile;<br />
LPTSTR pszFilenames = new TCHAR[dwMaxFile];<br />
dlg.m_ofn.lpstrFile = pszFilenames;<br />
dlg.m_ofn.lpstrFile[0] = NULL;<br />
<br />
if (dlg.DoModal() == IDOK)<br />
{<br />
POSITION pos = dlg.GetStartPosition();<br />
while(pos)<br />
OpenDocumentFile(dlg.GetNextPathName(pos));<br />
} <br />
<br />
delete[] pszFilenames; <br />
}<br />
Alwin
|
|
|
|