|
As per the MSDN docs this parameter has been ignored since WinNT.
...cmk
Save the whales - collect the whole set
|
|
|
|
|
I dont know exactly what it is as this is not ANSI pragma options , pragma options are used to control/modify/set linker and preprocessor.
asm and endasm seems to be the inline assembly code to be used as the startup function for the module.
I cant say anything about SYN_SFSLCT.
Does this code work in VC++ , I mean does it get compiled correctly ?
|
|
|
|
|
Hello Friends,
How can we maintain the size of an Edit control with respective to the Form View. In my Project I am using a Form View on which I am placing a Edit control. This edit control has to resize on its own at the run time if the Form view size is changed.
I am using the splitter window where in one part of the splitter window, I am using the Form View class.
Bye Techies.
Work Hard and a bit of LUCK is KEY to SUCCESS.
|
|
|
|
|
Hi,
In the Form View class add WM_SIZE message with classwizard and write this code to resize the edit control (IDC_EDIT1)
void CYourOwnFormView::OnSize(UINT nType, int cx, int cy)
{
CFormView::OnSize(nType, cx, cy);
CWnd* wnd = GetDlgItem(IDC_EDIT1);
if(wnd)
{
CRect rect,editrect;
GetWindowRect(&rect);
wnd->GetWindowRect(&editrect);
editrect.left = rect.left + 10;
editrect.right = rect.right - 10;
ScreenToClient(editrect);
wnd->MoveWindow(&editrect);
}
}
Ivan Cachicatari
www.latindevelopers.com
|
|
|
|
|
Please tell me the difference between
HWND and HINSTANCE!
thanks
|
|
|
|
|
Both are void pointers!
ARSALAN MALIK
|
|
|
|
|
the HWND is an opaque handle to an internal Windows data structure that corresponds to a window and consumes system resources when present. A Windows window is identified by a “window handle”
but where as HINSTANCE is Handle to an object for which memory is allocated
Neelesh Jain
|
|
|
|
|
HWND is a pointer to an insternal structure that contains the state information for a window.
HINSTANCE is a pointer to an internal structure that contains the executable module state information.
There is only one HINSTANCE, but there may be 0 or more HWND for a given program.
Note: There are also HMODULE, which is a pointer to an internal structure that contains the state information for a module - a module is a dll or exe ... which means that HINSTANCE can also be thought of as being a special type of HMODULE.
You use HWND to manipulate windows - move them, resize them, ...
You use HINSTANCE/HMODULE to access resources in the exe or dll - icons, bitmaps, strings, ...
...cmk
Save the whales - collect the whole set
|
|
|
|
|
Hi everybody,
I want to add toolbar to a dialog base Vc++(6) programm.
can I do this?How?
Thanks for your help
|
|
|
|
|
|
I tried using context menu when receive WM_CONTEXTMENU, when working on CRichEditView and document container, like the MSDN Superpad, but it fails, where do i get wrong?
<italic>Work hard and a bit of luck is the key to success.
|
|
|
|
|
what do you do ?
TOXCCT >>> GEII power
|
|
|
|
|
Hi,
I have created a MDI using MFC Application.
The application is developed to process some input files and create an output file.
At the end of the process, after the output file is created, iam trying to open the same.
But its popping an error message saying
"A sharing violation occured while accessing C:\temp\output.txt"
And, iam not able to open it through any other application and the popping error message is "The document C:\temp\output.txt is being used by another application and cannot be accessed".
I have properly coded on file opening and file closing. But still, iam not able to understand on why the problem occurs.
Only, when i close my MFC application, iam able to access the created output file through any applicaton.
Could someone, please help me, to get out of this situation. I thank in advance.
Thanx
Mughi
Mughilan
|
|
|
|
|
What`s your code at your file closing. I think that`s where the problem is.
<italic>Work hard and a bit of luck is the key to success.
|
|
|
|
|
Hi,
Here is the code.
FILE *fp = fopen(this->output,"w");
fprintf(fp,"8\n");
for(rc=0;rc<9;rc++)
for(gc=0;gc<9;gc++)
for(bc=0;bc<9;bc++) {
lut[0][rc][gc][bc] = (lut[0][rc][gc][bc]>255)?255:lut[0][rc][gc][bc];
lut[1][rc][gc][bc] = (lut[1][rc][gc][bc]>255)?255:lut[1][rc][gc][bc];
lut[2][rc][gc][bc] = (lut[2][rc][gc][bc]>255)?255:lut[2][rc][gc][bc];
fprintf(fp,"%d %d %d\n",lut[0][rc][gc][bc],lut[1][rc][gc][bc],lut[2][rc][gc][bc]);
}
fclose(fp);
When my MFC application still runs, Iam able to open the file in dos prompt, but not in any of WIN32 application or in my own MFC application.
Am still not getting it. Could you please help me out, if you have the answers.
Thanx
Mughi
|
|
|
|
|
Hi,
The file was opened somewhere else (for other module) and was not closed. I had to track down the whole flow of the application and had the problem solved. Thats been a silly mistake and sorry for the inconvenience caused. Thanks for your support.
Thanx
Mughi
|
|
|
|
|
close the file before reopening it
TOXCCT >>> GEII power
|
|
|
|
|
I have a Pro*C application being developed on windows.
I have 2 functions, one which connects to the oracle database and the second function to update a table.
The first function connection()works fine (sucessfully connects to the DB).But when i try to update the table by calling the update() immediately after checking the success return value from the connect(), i get the error message
"ORA-01012: not logged on"
What is the problem?Is the session killed?
Please help.
Thanks
|
|
|
|
|
I'm working on an application that needs (mostly-sequential) access as fast as possible to a very large file (in excess of 1 GB, most likely in the range of 2-3 GB), so loading it to all to memory first is going to hurt more than it will help. I will be processing all of it, in a mostly (but not entirely - I may have to back-track a small amount on every iteration) sequetial manner, and performance is a key objective.
So my question is - am I better off writing (or finding) a file accessor class that explicitly caches the data to a buffer in (presumably) fixed amounts, or does the CFile (or underlying fread etc.) access functions take care of this situation in a reasonably efficient manner? (enough such that the overhead of secondary caching doesn't defeat the entire purpose?)
And if not, do you know of any already written libraries designed to handle this situation?
Thanks,
Tim
|
|
|
|
|
To be a bit more specific, out of the 1+ GB file, I'll need to access a few thousand bytes at once, and then need to access those same few thousand bytes +/- a few hundred (ie, my initial offset will be in the same ballpark, but not exactly the same as the first time).
Thanks,
Tim
|
|
|
|
|
|
Solution Title: COleDateTime
Date Asked: 12/01/2003 05:55AM PST
Date Answered: 03/30/2004 02:18AM PST
Hi
I am having some difficulty with the COleDateTime class in that I have a
DateTimePicker ctrl (m_date) and I am trying to initialise
it to the current time. from msdn help I have
DoDataExchange
DDX_DateTimeCtrl(pDX, IDC_LOG_DATE_PICKER, m_date);
Dialog Init
m_date = COleDateTime::GetCurrentTime();
Every time the dialog loads I get an error about "winCtrl5.cpp". I have traced it
and the above line is causing the problem.
Why? I had this working on Friday!
|
|
|
|
|
Is there a component gallery in VC++.net ( 2002 version ) ?
Thanks.
Maximilien Lincourt
Your Head A Splode - Strong Bad
|
|
|
|
|
I am having trouble with the "Process-wide api spying" article by Anton Bassov. Here is the code:
HMODULE hMod = GetModuleHandle("kernel32.dll");
if (hMod == NULL)
MessageBox(NULL,"could not load dll","error",MB_OK);
else
{
IMAGE_DOS_HEADER * dosheader=(IMAGE_DOS_HEADER *)hMod;
IMAGE_OPTIONAL_HEADER * opthdr =(IMAGE_OPTIONAL_HEADER *) ((BYTE*)hMod+dosheader->e_lfanew+24);
IMAGE_IMPORT_DESCRIPTOR * descriptor=(IMAGE_IMPORT_DESCRIPTOR*)(BYTE*)hMod + opthdr->DataDirectory[IMAGE_DIRECTORY_ENTRY_IMPORT].VirtualAddress;
while(descriptor->FirstThunk)
{
char*dllname=(char*)((BYTE*)hMod+ descriptor->Name);
IMAGE_THUNK_DATA* thunk=( IMAGE_THUNK_DATA*)((BYTE*) hMod + descriptor->OriginalFirstThunk);
int x=0;
while(thunk->u1.Function)
{
char*functionname=(char*)((BYTE*) hMod + ( DWORD)thunk->u1.AddressOfData+2);
MessageBox(NULL,functionname,"function",MB_OK);
DWORD *IATentryaddress=( DWORD *)((BYTE*) hMod + descriptor->FirstThunk)+x;
x++; thunk++;
}
descriptor++;
}
}
It is crashing at run-time, saying that it cannot read from desciptor. Anyone have any idea what the problem is? Any help is appreciated.
-Dev578
|
|
|
|
|
Hi,
I am working on an MDI program and I am not using DOC/View architecture because its too slow. So I kind of made my own version that creates CMDIChildWnd derived objects during runtime then calling ->Create to create and show the window in the main frame.
Right now I am closing the windows by sending WM_CLOSE message to the object. However, I can't seem to delete the object explicitly. Visual C++ will break with an exception if I do.
I read the code project tutorial "Creation of Multiple Dynamic Views" and it says near the bottom that I can't delete it explicitly and must let the main frame close and call the destructors automatically.
http://www.codeproject.com/docview/dynviews.asp#xxxx[^]
Now after extended use without closing the main frame, will there be a memory leak in my program? If so, how do I get around this so I can delete my memory right away.
Thanks in advance!
|
|
|
|