|
Hello,
So while configuring ODBC I will have to give the info about the Server and the database Is it?
Thanks for your reply.I will look into the detail of ODBC configuaration.
Pritha
|
|
|
|
|
I'm using this structure while toggling my window between fullscreen and window modes. Now according to MSDN this is the definition:
typedef struct _WINDOWPLACEMENT {
UINT length;
UINT flags;
UINT showCmd;
POINT ptMinPosition;
POINT ptMaxPosition;
RECT rcNormalPosition;
} WINDOWPLACEMENT;
But my VS is showing an extra member RECT rcDevice . Great I thought, the monitors rect is given to me. But in winuser.h, this extra member is wrapped in a #ifdef _MAC #endif block. What does this mean exactly?
|
|
|
|
|
WalderMort wrote: #ifdef _MAC #endif blo
For MAC machines I guess.
Dario: How is "directory" in French? (I mean a file system directory).
John Simmons: "zee file holdaire thingie"
|
|
|
|
|
That's my guess, but I didn't realise VS was capable of compiling code for the mac. So I ask to be sure.
|
|
|
|
|
Microsoft has whole range[^] of products for Mac OS.
|
|
|
|
|
Having mac versions of a range of products doesn't necessarily mean that VS is able to build mac versions. Thats like saying VS builds will also run on linux ( with the exception of wine ).
|
|
|
|
|
VS isn't capable (to the best of my knowledge), but the header files are from the platform SDK, which is usable by other compilers. This way they keep a common source.
Iain.
|
|
|
|
|
Dear All,
we are managing a very big ascii files that we should like to save in a DB as zipped file.
When user should like to know the content of the file I don't want to extract and save a local copy of the file, unzip and show to the user the content. What I want to do is to read the file and unzip it in the memory on the fly without saving it.
Does any one can help me ?
Thanks
Nicola
|
|
|
|
|
|
Hi,
another question:
i want to shut down the pc...
i tried with "ExitWindowsEx(EWX_SHUTDOWN ,EWX_FORCE);"
EWX_POWEROFF
but don't work....
have you got an idea?
regards
giulio
|
|
|
|
|
Ing.Raiz82 wrote: "ExitWindowsEx(EWX_SHUTDOWN ,EWX_FORCE);"
the parameter are incorrect. Use a below
ExitWindowsEx(EWX_SHUTDOWN | EWX_FORCE, SHTDN_REASON_MAJOR_OTHER );
nave
|
|
|
|
|
thanks....
but don't work...
i don't understand....
i create a simple button and..
void CSmartAdvertiseDlg::OnBnClickedButton1()
{
ExitWindowsEx(EWX_SHUTDOWN | EWX_FORCE, SHTDN_REASON_MAJOR_OTHER );
}
but don't work.....ahhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
thanks
giulio
|
|
|
|
|
Whats return value of ExitWindowsEx
|
|
|
|
|
U can't directly use this API. To use the API, u'r process should have sufficient privileges. The Privilege required is SE_SHUTDOWN_NAME. Use
OpenProcessToken() and
AdjustTokenPrivileges() to get the right privilege.
Come online at:-
jubinc@skype
|
|
|
|
|
thanks a lot...
but i'm a beginner...
can you see me an example?
sorry... and thanks too...
|
|
|
|
|
See here[^] how to use this function
|
|
|
|
|
|
thank you so much..
bye...
Giulio
|
|
|
|
|
|
ok....
This is the code... it work....
//giulio shutdown pc
HANDLE hToken;
TOKEN_PRIVILEGES tkp;
if (OpenProcessToken(GetCurrentProcess(),TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY, &hToken))
{
LookupPrivilegeValue(NULL, SE_SHUTDOWN_NAME, &tkp.Privileges[0].Luid);
tkp.PrivilegeCount = 1;
tkp.Privileges[0].Attributes = SE_PRIVILEGE_ENABLED;
if(AdjustTokenPrivileges(hToken, FALSE, &tkp, 0, (PTOKEN_PRIVILEGES)NULL, 0))
{
ExitWindowsEx(EWX_SHUTDOWN|EWX_POWEROFF|EWX_FORCE,0);
}
}
Bye
Giulio
|
|
|
|
|
ExitWindowsEx
Windows NT/2000/XP: To shut down or restart the system, the calling process must use the AdjustTokenPrivileges function to enable the SE_SHUTDOWN_NAME privilege. For more information about security privileges, see Privileges.
Windows 95/98/Me: ExitWindowEx does not work from a console application.
HANDLE hToken; // handle to process token
TOKEN_PRIVILEGES tkp; // pointer to token structure
if (!OpenProcessToken(GetCurrentProcess(), TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY, &hToken))
{
return (FALSE);
}
LookupPrivilegeValue(NULL, SE_SHUTDOWN_NAME, &tkp.Privileges[0].Luid);
tkp.PrivilegeCount = 1; // one privilege to set
tkp.Privileges[0].Attributes = SE_PRIVILEGE_ENABLED;
// Get shutdown privilege for this process.
AdjustTokenPrivileges(hToken, FALSE, &tkp, 0, (PTOKEN_PRIVILEGES) NULL, 0);
Then call ExitWindowsEx function
Known is a drop, unknown is an ocean
|
|
|
|
|
I have a partly developed MFC project. When we execute that project a window will open. In that window, a tool bar, a status bar are already created. In the status bar an idle text "Ready" is displayed in the right corner. In the left corner a pane is already there.
I also created one pane to the left of already existing pane.I do not know how they created the already existing pane. I created the second pane by specifying the ID of the second pane in the string table. Now I want to access the Properties window for the status bar(I have to). How can I do this?
|
|
|
|
|
This may not be the most helpful answer, but there *isn't* a properties window for a status bar.
If you want one when the program is running, then you'll have to subclass the status bar, handle WM_CONTEXT, and bring up your own dialog box.
What I *think* you mean is how to work out where this stuff is getting added...
Look in CMainFrame for a member variable called m_StatusBar (or similar). When you know that name, do a search for it, and you'll find any reference to it. The bits you want are probably in CMainFrame::OnCreate. You might also want to check if they're using CStatusBar, or CMyCustomMadeUpStatusBar. If they used their own bar, you'll need to dig into their class and see what it does.
Iain.
|
|
|
|
|
T.RATHA KRISHNAN wrote: I created the second pane by specifying the ID of the second pane in the string table.
Simply adding an ID to the stringtable resource will not cause a new pane to be created. You must add an item to the indicators array in the frame's code.
T.RATHA KRISHNAN wrote: Now I want to access the Properties window for the status bar(I have to). How can I do this?
Do you have an example of this?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
How can I drag and drop text that user enters in the window?
Should I check if the user clicked inside the rectangle that contains the text?
Sikora
|
|
|
|