|
Oops . I didn't see your qualification about not extracting the executable. Sorry.
I don't think what you're asking is possible under Windows. An executable is actually a set of data structures, along with the compiled code. The loader is responsible for reading those data structures and the code, placing that in memory and then running it. You would have to somehow emulate the loader process, or invoke it yourself. I don't know of a public API that lets you do that.
Software Zen: delete this;
|
|
|
|
|
Hi there...
i am using CFileDialog to save and move files...
but i need to add an edit box in that dialog so users
can add comments...
can i overwrite/edit sumthing in CFileDialog class to add
new controls?
tnx 4 d help
|
|
|
|
|
|
I am updating a Visual C++ program's GUI, and I am getting some parsing errors from by the Visual C++ class wizard for one of the classes.
One of the parsing errors has the following form:
In file WizardDlg.h, I have
// Dialog Data
//{{AFX_DATA(CWizardDlg)
enum { IDD = IDD_WIZARD_DIALOG };
CButton m_button[3];
//}}AFX_DATA
In file WizardDlg.cpp, I have:
void CWizardDlg::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CWizardDlg)
DDX_Control(pDX, IDC_BUTTON3, m_button[0]);
DDX_Control(pDX, IDC_BUTTON2, m_button[1]);
DDX_Control(pDX, IDC_BUTTON1, m_button[2]);
//}}AFX_DATA_MAP
}
The code compiles, but I get the class wizard parsing error
Parsing error: Expected ";".
Input Line: "CButton m_button[3];"
I know one way to fix this error: replace the array with three separate CButton m_button instances, i.e.
CButton m_button1;
CButton m_button2;
CButton m_button3;
DDX_Control(pDX, IDC_BUTTON1, m_button1);
DDX_Control(pDX, IDC_BUTTON2, m_button2);
DDX_Control(pDX, IDC_BUTTON3, m_button3);
However, I may not be able to use this approach without changing a lot of code. Is there a way to make the parser accept the CButton m_button[3] array, or something like it?
This is an important project for work, so any advice would be greatly appreciated.
|
|
|
|
|
I'm afraid you're out of luck here. The VC6 class wizard is notoriously limited in what it will accept, and arrays of controls aren't part of that.
You can, however, move the array references outside the comment markers used by VC6 (the lines with "//{{ and //}} "), and do things that way. You will need to maintain those entries yourself, but at least it lets you continue using the class wizard for other things.
Software Zen: delete this;
|
|
|
|
|
Hi guys
If I run a program in a DOS console, what should I do to have the time displayed on screen as the program is running:
1) without overhead time
2) without a zillion numbers scrolling down the screen but as a neat counter that sits tight on one single place.
Thanks!
|
|
|
|
|
|
You could use the backspace (^H, ASCII 8) character to return to the start of the line in order to overwrite it.
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
I recently ran into the situation where a bitmap displayed different results for pixels (255, 0, 255 vs. 248, 0, 248) on a desktop PC and a pocket PC. I've looked around for comments on this but haven't found anything. Does anyone have any information as to how this is possible????
|
|
|
|
|
|
If any of you ever typed "///" in a c# document...it'd generate these nice xml summary blocks.
Are their any extensions to vs.net that do this sorta stuff to c++?
|
|
|
|
|
O btw...are their any plugins that add the collapsable regions of c# for c++ documents :P
|
|
|
|
|
In VS.NET 2003, go to Tools, Options, Text Editor, C/C++, and check the "Enter outlining mode when files open" box.
Software Zen: delete this;
|
|
|
|
|
when I Init the AcDbDatabase class
AcDbDatabase* db = new AcDbDatabase(Adesk::kFalse, Adesk::kTrue );
db = NULL;
I get a heaperrorafter init'ing the AcDbDatabase object.
any takers on why?
I'm not an expert yet, but I play one at work. Yeah and here too.
|
|
|
|
|
lets run a dos window (command.com) then type "sort" (then press return key).
the dos window blocks there (until we input complete command for "sort").
at this stage, can we terminate the "sort" command or exit dos window without pressing close button of the dos window? - i mean, terminate the dos window only by tying some command ot text?
================================================
this is a VC question actually.
I use an app to CreateProcess of the command.com.
but once the dos blocks there (i.e. in the middle of sending command "sort"), my app can not terminate the dos window - i have tried all functions (such as TerminateProcess, RxitProcess).
i think if i can terminate the dos by command as described above, i can terminate the dos in my app also.
thx
includeh10
|
|
|
|
|
when u use createprocess to run command.exe are u using the process handle in the return PROCESS_INFORMATION structure to TerminateProcess() ?
also sort.exe is another app which is spawned by command.exe, so TerminateProcess() doesnt hav the process handle of sort.exe it only has command.exe.
maybe try using createprocess to run sort.exe instead?
|
|
|
|
|
When I run my VC++ program (both Console and Windows version), I noticed that the "Mem Usage" (under Processes in the Windows Task Manager) ALWAYS increases by 4K every time my program executes. Is this normal? I didnt use any dynamic memory creation (using "new"), but can this be a memory leak?
I let the program sleep using "Sleep(xxx), and I use FileMappingObject... Can this be the reason??
Rihannsu
|
|
|
|
|
Your program's private bytes would be cleaned up upon exit anyway. You should see what your program does. Maybe you leaked some system resource or other shared resource, which might not get recovered until the system restarts.
|
|
|
|
|
The program will be running for weeks on end. Also, I use FileMappingObject every time the program runs (in this case, every 2 seconds). Every time this happens, it increases by 4k. Can this be related to opening files, or using FMO??
Thanks!
Rihannsu
|
|
|
|
|
You need to UnmapViewOfFile those FMO when you are done. Also make sure to CloseHandle the FMO's 'file' handle after unmapping the view to it. There is no reason you could not run 'indefinitely' if the proper cleanup is performed.
We use FMO in our apps, and our apps run for months at a time.
|
|
|
|
|
I am writing a c++ program to encrypt/decrypt files. my instructor wants to start this program by right clicking on the file to be encrypted/decrypted and then choosing the option Encrypt/Decrypt among the list that appears when any file is right-clicked. Can anyone help me with that?
|
|
|
|
|
|
Meaning you probably need a context menu handler that responds to all file selections.
Selection of items from the context menu will invoke your program to encrypt/decrypt the selected file(s).
|
|
|
|
|
Thank you. This is exactly what i was looking for
|
|
|
|
|
Hi,
I want to send an email through my VC++ app with out anyone knowing( in the back ground). We have Lotus notes as the email client. Can anyone please suggest How to do this? Thanks a Lot!
Murthy
|
|
|
|