|
his problem is not in creating the registry value,
it can be created by manually or by program, the PROBLEM is that didnt work in his computer..!!!!!!!!
I want to change Myself..Can u help me?
|
|
|
|
|
Does anyone know of a way to discover all of the preprocessor defines that are set before and during the VC++ compilation of a module? I just want to know the results after plowing through a morass of headers. GNU CPP has such an output. Does VC++? Thanks.
Chas L.
|
|
|
|
|
|
Thanks, but as you know that gives me the result, not the cause of the emitted code.
I figured out I can use the GNU cpp.exe to get most of the info I want. Just need to get at all the built-in MSC defines. There is a list of them in the compiler docs, but it seems to be a small number of them...
Thanks again.
Chas L
|
|
|
|
|
Hi,
Is there a set of commands that deals programatically with FTP ?
My "WishList" will be something like:
Handle h=OpenConnection (Hostname, Username, passwrod);
h->Send...
s->receive...
Anything like that ?
Shay
|
|
|
|
|
Are you looking for CFtpConnection
MSN Messenger.
prakashnadar@msn.com
"If history isn't good, just burn it." - Sidhuism.
|
|
|
|
|
OK, we are getting there.....
Can you give me a small example of how CFtpConnection will connect to a host named ABCD with user XX and password YY ?
Thans a lot
Shay
|
|
|
|
|
Click[^]
MSN Messenger.
prakashnadar@msn.com
"If history isn't good, just burn it." - Sidhuism.
|
|
|
|
|
Hi,
I'm a relative newcomer to the MFC world with a question on static library and dialog boxes.
I have two projects, MIM and MCB, MCB is also used to create a static library MCB_Library. MIM links into the MCB_Library and calls several methods which are used for data processing. One of the methods called is supposed to create a dialog box for user input.
When executing the code, the doModal routine is called, but the dialog box doesn't appear.
Is there a way to use modal dialogs across two projects or does the MCB project have to create a modeless dialog box for use by MIM ?
If I'm not clear, I apologize in advance, and will try to fill in more.
Thank you.
liobsynde
--Wish I had something great to say here, but the good ones have already been taken...
|
|
|
|
|
has the dialog resource properly linked to the exe ?
MSN Messenger.
prakashnadar@msn.com
"If history isn't good, just burn it." - Sidhuism.
|
|
|
|
|
There are two projects each with their own resources (MIM.rc and MCB.rc) In the MCB_Library there is a MCB.res file. how do I ensure that this is properly linked to the MIM executable ?
Thank you for being patient with a MFC newbie...
liobsynde
|
|
|
|
|
i am not sure this will work or not, but can you try providing the .res file in the link tab of project settings ?
MSN Messenger.
prakashnadar@msn.com
"If history isn't good, just burn it." - Sidhuism.
|
|
|
|
|
It didn't work. It doesn't like having an additional res file specified.
The creator of the MCB project is going pull out the resources for the two dialog boxes that I need so that I can include just those resources. And try from that angle.
Thank you for your help/ideas.
liobsynde
--Wish I had something great to say here, but the good ones have already been taken...
|
|
|
|
|
Sorry that i could not be of much help.
MSN Messenger.
prakashnadar@msn.com
"If history isn't good, just burn it." - Sidhuism.
|
|
|
|
|
Ideally, the data processing library (MCB_Library ) shouldn't contain any GUI calls. If there's a need for MCB_Library to get information from the client application at run-time, you might want to make MCB_Library call into its client and execute a known data retrieval method.
For example, define an interface (an abstract base class with a single pure virtual method) called IMCB_Client .
class IMCB_Client
{
public:
IMCB_Client() {};
virtual ~IMCB_Client() {};
public:
virtual bool getDataFromUser
(void* pData) = 0;
} Your MIM application should "implement" the interface (by simply multiply inheriting from IMCB_Client ), like so:
class CMimApp : public CWinApp,
public IMCB_Client()
{
...
public:
bool getDataFromUser
(void* pData);
} The implementation of CMimApp::getDataFromUser() should display the appropriate dialog and store the desired information in pData . The method could return false to indicate the data is not available. CMimApp should register itself as a client of MCB_Library . This just means storing a pointer to CMimApp in MCB_Library .
Finally, replace your call to display the dialog in MCB_Library with this code:
ASSERT (m_pClient != NULL);
DATA someData;
bool bGotData = m_pClient->getDataFromUser (&someData);
if (bGotData)
...
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
I want to shut down my computer at a certain time of the day, so I wrote a small program that calls InitiateSystemShutdownEx() and scheduled it using the Task Scheduler. The program works whenever I'm logged in on my computer. However when I'm logged off (i.e. the computer displays the welcome or logon screen), the shutdown doesn't occur. The scheduler does show that the program was executed, so I'm guessing it might have something to do with security.
Here's a section of the code:
if (!mode)
{<br />
HANDLE procHnd, tokHnd;<br />
<br />
procHnd = GetCurrentProcess();<br />
if (!OpenProcessToken(procHnd,TOKEN_ADJUST_PRIVILEGES,&tokHnd))<br />
return;<br />
<br />
TOKEN_PRIVILEGES tp;<br />
LUID luid;<br />
<br />
if (!LookupPrivilegeValue(NULL, SE_SHUTDOWN_NAME, &luid))<br />
return; <br />
<br />
tp.PrivilegeCount = 1;<br />
tp.Privileges[0].Luid = luid;<br />
tp.Privileges[0].Attributes = SE_PRIVILEGE_ENABLED;<br />
<br />
AdjustTokenPrivileges(tokHnd, FALSE, &tp, 0, NULL, 0); <br />
<br />
InitiateSystemShutdownEx(NULL, NULL, 15, TRUE, FALSE, SHTDN_REASON_FLAG_PLANNED);<br />
<br />
}<br />
else if (mode == 1)
SetSuspendState(FALSE,TRUE,FALSE);<br />
else if (mode == 2)
SetSuspendState(TRUE,TRUE,FALSE);
I tried using ExitWindowsEx() but have the same problem. However, hibernating does work when I'm logged off.
I'm puzzled
reymano
|
|
|
|
|
Are you sure that you used these flags with ExitWindowsEx
1. EWX_FORCE
2. EWX_FORCEIFHUNG
As it works on my PC
...Avenger
Remember... testing & debugging are always part of programming ...so exterminate those stinking bugs
|
|
|
|
|
Yep, I tried them but no go. Does your program work when you are logged off? Try scheduling the program a minute or two into the future, then logoff and wait on the welcome screen to see if it shuts down.
FYI, I'm also running on WinXP Pro if that makes a difference.
reymano
|
|
|
|
|
if this question has been asked before or answered somewhere else just point me there. anyway I was wondering how I can make a fullscreen, transparent OpenGL window so I could draw 3D objects on my desktop. I mainly want it so I can use Cg shaders and play with my desktop. the only catch is i want the effects to stay under the icons but effects my wallpaper. I want to use my desktop while the effect is going on. does that make sense?
thanks ahead of time.
|
|
|
|
|
Folks,
I am really hoping you can help me with this because I have no idea what it means. I have just installed embedded Visual C++ 4.0 w/ SP3, SQL Server CE 2.0, and emulation images for Windows Mobile 2003 second edition on two computers. One is a laptop and the other is a desktop running Windows 2000 with the latest patches. It has an AMD 64 bit CPU and SATA drives. On the laptop, everything works fine, but on the desktop, when I try to compile anything, I get a message box labeled "cl.exe - No Disk" and the message "There is no disk in the drive. Please insert a disk into drive \Device\Hardisk3\DR7".
I have googled for this message and searched msdn but can't find anything relevant. Any assistance would be MUCH appreciated.
I have posted this also in the Embedded/Mobile board and apologize for the double posting, but I'm not at all sure the problem is specific to eVC.
Regards,
Matthew Fleming
|
|
|
|
|
In Tools -> Options, you can go to the Directories tab and see where it's looking for things. If there are duplicate paths that don't exist anymore then you can just delete them from there and you'll have no problem anymore.
|
|
|
|
|
My problem is this : I want an event when the user stops resizing the window by using the mouse by means of dragging:
a) if the user hasn't finished dragging the margins : do nothing
b) when the user released the drag and drop mouse : Resize the controls in the window
The windows I'm using are MDIChildFrame
I tried overwriting OnSize(WM_SIZE) but gets called only when it's maximized or minimized not for dragging
I tried overwriting WM_SIZING in Window proc but gets called continuosly when user is dragging. so difficult to Resize the controls...flickering problem
So i want to know is there any event that can be captured once the dragging of mouse is over?????
can some one help me ....very urgent.....
Adi
Software Engineer
|
|
|
|
|
Hmm, I think you'll need to keep track of a WM_LBUTTONDOWN and handle WM_SIZE if a corresponding WM_LBUTTONUP has been received. You should probably also handle WM_KILLFOCUS in order to reset the mouse-down state.
Just to make sure I've interpreted your question correctly, you only want to control window resizing if the mouse was used, right?
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
Handle WM_ENTERSIZEMOVE and WM_EXITSIZEMOVE to know when a resize or move operations begins and ends. When you get WM_ENTERSIZEMOVE , save the window's RECT . When you get WM_EXITSIZEMOVE , get the new RECT and if it's different, move your controls around.
--Mike--
Personal stuff:: Ericahist | Homepage
Shareware stuff:: 1ClickPicGrabber | RightClick-Encrypt
CP stuff:: CP SearchBar v2.0.2 | C++ Forum FAQ
----
"die"
ahhhh!
"diet"
AAHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH!!!!!!!!!
|
|
|
|
|
thanku very much Ravi and Michel.
i tried wht michel was telling... it's working fine.
thanks again...
Adi
|
|
|
|