|
Problem solved !
A co-worker found that <complex> was included in StdAfx.h
When commented out, both apps perform the same way.
Cheers everybody
Users.
Can't live with 'em, can't kill em!
|
|
|
|
|
even if it is fixed, did you have a look at ::abs() and ::fabs() ?
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
Hi All.
I want to detect disk type on windows.
Is it Basic or Dynamic?
Can any one help me.
Thanks in advance.
Sanjay
|
|
|
|
|
Check here[^]
<bold>- Nilesh
<italics>"Reading made Don Quixote a gentleman. Believing what he read made him mad" -George Bernard Shaw
|
|
|
|
|
Thanks Nilesh.
But this is only for virtual server.
However I need it for Windows2K,XP,Server
all windows versions which supports dynamic disks.
Thanks.
|
|
|
|
|
Hi, how can i determine if a PIDL is above or below another one?
What im trying todo is stop a user browsing up higher than a certain directory in my application.
The code i have been trying to use is:
CComPtr<ishellfolder> pDesktop;
if (SUCCEEDED(::SHGetDesktopFolder(&pDesktop)))
bReturn = static_cast<short>(HRESULT_CODE(pDesktop->CompareIDs(SHCIDS_CANONICALONLY, m_DirectoryIdList, pidlBrowse))) <= 0;
Which works fine when browsing deeper into folders, but doesnt work when pressing the up button.
How can i determine if the pidl of
C:\test\
comes before the pidl of
C:\test\cant_browse_below_here
I thought about converting the PIDLs to BYTE arrays and then comparing each byte. Is this a suitable way of continuing?
Skute
|
|
|
|
|
Have you considered restricting access to C:\test\ at the OS level?
"One must learn from the bite of the fire to leave it alone." - Native American Proverb
|
|
|
|
|
Ignore this. I was being dumb, passing in the current directory pidl, rather than the highest directory pidl i had previously stored.
Skute
|
|
|
|
|
Hi,
Am using WMI to collect the mount point details.Can anyone suggest me a WMI class that associates Volume GUID of a mount point to the disk number where it resides?
URagav
Everything can be sacrificed for truth, but truth cannot be sacrificed for anything .
|
|
|
|
|
Hope this[^]helps
<bold>- Nilesh
<italics>"Reading made Don Quixote a gentleman. Believing what he read made him mad" -George Bernard Shaw
|
|
|
|
|
Hi,
Thnx .am actually using that class....From that class,I can get the directory name where teh mount point is established and its Volume GUID...Now I need a mapping between this Volume GUID and the disk number where that mount point resides...
URagav
Everything can be sacrificed for truth, but truth cannot be sacrificed for anything .
|
|
|
|
|
Oops! No much idea then
<bold>- Nilesh
<italics>"Reading made Don Quixote a gentleman. Believing what he read made him mad" -George Bernard Shaw
|
|
|
|
|
(The title may not be very appropriate to summarise the problem..)
1) I have an little application that checks some stuff on timer. If something occurs, it creates a topmost dialogbox and display certain info (let's call it MyAlarmBox).
2) a control in the application can create a float menu if user R-clicks the mouse.(I use TrackPopupMenu)
Usually everythings works fine. But in the following circumstance:
1) user R-clicks the control to get the float menu.
2) before user selects a command, the MyAlarmBox goes off.
I end up with the MyAlarmBox on top being not able to receive any mouse click.
The workaround is to click any non-this-window area, then come back clicking on the dialog box, the dialog box 'comes alive' again. In short, the float menu and the dialog box are in conflict -- the float menu grabs the 'focus' (this may not be the correct word, please correct me if you could) and does not release it to the newly popped-up dialog box.
Anyone can help me solve this???...
|
|
|
|
|
The optimal solution would be to cancel the popup menu when the dialog is displayed, but I cannot find any way of cancelling a menu from the app. Instead, I would block the display of the dialog while you're tracking the menu.
<br />
bTracking = TRUE;<br />
cmd = TrackPopupMenu(...);<br />
bTracking = FALSE;<br />
<br />
<br />
if (!bTracking)<br />
dlg.DoModal(...)<br />
Cheers
Steen.
"To claim that computer games influence children is ridiculous. If Pacman had influenced children born in the 80'ies we would see a lot of youngsters running around in dark rooms eating pills while listening to monotonous music"
|
|
|
|
|
Thanks! That works.
At first I want to find a way to cancel the popmenu but just could not. I was thinking to use event synchronisation (menu and dlg are in different threads) but this seems a simpler solution.
It will still be the best way to cancel the menu, because for my case I cannot permanently block the alarm dialog (the user may just pop up the float menu then get distracted, leaving the menu floating there for a long period of time). I am thinking to wait for a few seconds and fire the dialog anyway (the alarm dialog plays sound/music on creating) so that if the user is nearby he/she will be alerted.
But so far, I will have to go with the solution you suggested. Thx again pal...
|
|
|
|
|
Hmmm... does this mean the you display UI stuff from two threads? I'm no expert on multithreading, but according to Joseph Newcomer (http://www.flounder.com/workerthreads.htm[^] (who seems to be an expert) you should never ever touch the UI from a worker thread. Instead, you should post a message from the worker thread to the main thread and have the main (UI) thread display the dialog.
If you for some reason don't want to change your design you should at least protect the access to the bool variable with a mutex (see http://www.flounder.com/semaphores.htm[^])
Cheers
Steen.
"To claim that computer games influence children is ridiculous. If Pacman had influenced children born in the 80'ies we would see a lot of youngsters running around in dark rooms eating pills while listening to monotonous music"
|
|
|
|
|
Actually, I guess you could use the mutex itself in place of the boolean.
Cheers
Steen.
"To claim that computer games influence children is ridiculous. If Pacman had influenced children born in the 80'ies we would see a lot of youngsters running around in dark rooms eating pills while listening to monotonous music"
|
|
|
|
|
How about creating the topmost dialog with GetCapture!!
<bold>- Nilesh
<italics>"Reading made Don Quixote a gentleman. Believing what he read made him mad" -George Bernard Shaw
|
|
|
|
|
I guess you mean SetCapture.
Does it work for you? It does not for me...
|
|
|
|
|
Hi all
Please can anyone help me,
How to convert one datatype to other. int to char*
in vc++ many datatypes are there like _variant_t , _bstr_t
what is the actual use of it.
thanks
|
|
|
|
|
if you use CString you can use its .Format() fc.
If not use the right fc in the sprintf family.
as to the variant, bstr type, obviousely it is not too early for you to know -- if you are into com stuff, you will know.
|
|
|
|
|
use _itot
Cheers
Steen.
"To claim that computer games influence children is ridiculous. If Pacman had influenced children born in the 80'ies we would see a lot of youngsters running around in dark rooms eating pills while listening to monotonous music"
|
|
|
|
|
You can use this sample:
#include <stdlib.h>
#include <stdio.h>
void main( void )
{
char buffer[20];
int i = 3445;
long l = -344115L;
unsigned long ul = 1234567890UL;
_itoa( i, buffer, 10 );
printf( "String of integer %d (radix 10): %s\n", i, buffer );
_itoa( i, buffer, 16 );
printf( "String of integer %d (radix 16): 0x%s\n", i, buffer );
_itoa( i, buffer, 2 );
printf( "String of integer %d (radix 2): %s\n", i, buffer );
_ltoa( l, buffer, 16 );
printf( "String of long int %ld (radix 16): 0x%s\n", l,
buffer );
_ultoa( ul, buffer, 16 );
printf( "String of unsigned long %lu (radix 16): 0x%s\n", ul,
buffer );
}
Output
String of integer 3445 (radix 10): 3445
String of integer 3445 (radix 16): 0xd75
String of integer 3445 (radix 2): 110101110101
String of long int -344115 (radix 16): 0xfffabfcd
String of unsigned long 1234567890 (radix 16): 0x499602d2
Omar
|
|
|
|
|
Do a search on MSDN for _itoa. You may come across: atoi, atof, atol, _itoa, _itow, ltoa, ltow, strod, strol, stroul, _ultoa, _wtoi, _wtol, _ultow. Lots of conversion functions for you!
Danny
|
|
|
|
|
How to write data to blank CD using VC
thanx
by
KK
|
|
|
|