|
Hi ,
im Trying to Make an Right-to-Left MFC Application , But I got a probelm which it cant be viewd correctly
I Tried the Right-to-Left Reading Order option under the extend Styles , but it failed and I always got it view like this ---> E?IE?
Any idea What Can I do to make it View correct ?
Thanks in advanced
|
|
|
|
|
E?IE? makes no sense. What are you trying to display?
The WS_EX_RTLREADING style is only supported for shell languages in Hebrew, Arabic, or another languages that support reading-order alignment.
Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?
|
|
|
|
|
yeah , But How can I manage to make my application write and read such letters ?
|
|
|
|
|
I'd imagine you'd have to install a version of Windows that supported Hebrew, Arabic, or another languages that support reading-order alignment.
http://support.microsoft.com/default.aspx?scid=kb;en-us;311019
Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?
|
|
|
|
|
i am writing a very simple program which allocates some memory for an array...
it is running under vc++ 6.0 or 7.1, on a athlon xp , 512 mb of ram, win xp pro. the big problem is that when i try to allocate something like 200 mb of ram memory (out of ~380 mb available), the program takes forever just to allocate the memory, and after that the computer begins to run extremely slow, even after i deallocate the memory. and if i run the program again and try to allocate memory again, windows will only allow me to allocate virtual memory, althought there's enough ram memory free that could be allocated... that's how i have written the program:
...
int main()
{
long size=25000;
long *array;
cout << "Will now allocate memory for the array..." << endl;
array=new long [size*sizeof(long)];
cout << "Memory allocated sucessfully..." << endl;
cout << "Will now deallocate the memory..." << endl;
delete[] array;
system("pause");
return 0;
}
i used a program (memtest) to test if this could be caused by defective ram memory, but i dont think thats the cause of that...
thanx
|
|
|
|
|
Anonymous wrote:
the program takes forever just to allocate the memory
What did you expect?
"It is better to remain silent and be thought a fool than to open one's mouth and remove all doubt." - Abraham Lincoln
|
|
|
|
|
Good God! Why do you need 25000 * 4 = 100,000 places for data?!?!?
If there is no other option for you here, why don't you break
it up into manageable chunks, say, I don't know, 100 blocks
of 1000 elements or something, then process each one on it's
own...
The slowness you are experiencing is due to the sheer size of the array
you are trying to create. You are trying to fill 200 MB of RAM,
so the operating system will attempt to swap the contents of your memory disk to make room for it all. Since you have the 200 MB of the array and the OS occupying the bulk of the rest, you are probably running short on RAM...
BTW: There's nothing wrong with your RAM here, just the pure size of the array you are trying to allocate.
John Theal
Physicist/Mathematical Programmer
Digital Immersion Software Corporation
Got CAD?
http://www.presenter3d.com[^]
http://www.merlin3d.com[^]
|
|
|
|
|
What are you trying to achieve here? Why would you need 25000 x 4 = 100000 longs? IMO it is unusual to see sizeof() within the brackets of a new [] statement.
When creating arrays, the number in the [] brackets, is the number of elements in the array. If you need 25000 longs then the line should read
long *array = new long [25000];
If you were using malloc, then the same allocation would be
long *array = malloc( 25000 * sizeof(long) );
Hope this might help.
|
|
|
|
|
i am writing a very simple program which allocates some memory for an array...
this is running on a athlon xp , 512 mb of ram, win xp pro. the big problem is that when i try to allocate something like 200 mb of ram memory (out of ~380 mb available), the program takes forever just to allocate the memory, and after that the computer begins to run extremely slow, even after i deallocate the memory. and if i run the program again and try to allocate memory again, windows will only allow me to allocate virtual memory, althought there's enough ram memory free that could be allocated... that's how i have written the program:
...
int main()
{
long size=25000;
long *array;
cout << "Will now allocate memory for the array..." << endl;
array=new long [size*sizeof(long)];
cout << "Memory allocated sucessfully..." << endl;
cout << "Will now deallocate the memory..." << endl;
delete[] array;
system("pause");
return 0;
}
i used a program (memtest) to test if this could be caused by defective ram memory, but i dont think thats the cause of that...
thanx
|
|
|
|
|
So what's your question? Allocating 200MB out of 380MB is a task that the memory manager is going to have to work at, especially if other applications are running. The more applications that are running, the more stuff will need to be swapped to disk before 200MB is freed up.
While the delete operator does free up the allocated memory (i.e., your application no longer owns it), the memory manager does not guarantee that it is immediately available again.
BTW, 25000 * 4 * 4 is only four hundred thousand, a trivial amount of RAM to obtain from the heap.
Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?
|
|
|
|
|
Hi
I have this dialog where the size can be adjusted.
So i've written some event handlers to handle the messages (vscroll, size & hscroll).
This works very good.
But what if the dialog is already too big to fit into the screen!?!!. Then there have to be scrollbars already.If i resize the dialog, then there are some scrollbars but at default not.
How can i work around this? or has anyone written a class derived from CDialog which implements automatic scrollbar options.
Greetings
|
|
|
|
|
Hi! Anyone knows how to programmaticly read one message from DBX file (Outlook Express) in my application. In OE all messages (in folder) are stored in one file. How can I take out one message ???
Sorry for my polish
Mila
|
|
|
|
|
If I use the NM_CLICK event to do a chkBox.GeCheck() (for a listCtrl)soon as I check the box, it claims that check is FALSE. When I check the second item, the first checkbox is stated to have been checked by the debugger. SO basically the checkmark seems to apppear AFTER the NM_CLICK is triggered. So what message do I want to handle to detect instantly that the checkbox got checked in the listCtrl?
Thanks,
ns
|
|
|
|
|
Perhaps LVN_ITEMCHANGED ? (Guessing)
/ravi
Let's put "civil" back in "civilization"
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
Thats perfect! I guess I need to read the messages available more carefully!!!
Thanks. Havent had a chance to go to your site yet. major dental procedure in an hour so things are unsettled.....
|
|
|
|
|
Ugh, hope it's not too painful.
/ravi
Let's put "civil" back in "civilization"
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
Hi,
Everyone out there must have seen the link like send this page to a friend. I want to add the same functionality to my application such that if someone is on IE and wants to send the page to his friend hence he could just press the button which says send this page to a friend and that page could be emailed..Please help me out..I need it urgently..any help or pointers are highly appreciated..
Thanks a lot in advance..
Himanshu
|
|
|
|
|
The easiest way (to get the URL that IE is using) is to use Internet Explorer Automation (search MSDN for examples of using automation). However, if multiple IE windows are open, you'll need a way of determing which one the user wants to send.
Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?
|
|
|
|
|
My program has a view inherit from CView,when it receive WM_SETFOCUS I want do something,but the view receive WM_SETFOCUS message only once when program starting.why?
linjie
|
|
|
|
|
linjie wrote:
the view receive WM_SETFOCUS message only once when program starting.
What are you using to verify this? I tried this and used Spy++ to see the messages. The application received multiple WM_SETFOCUS messages.
Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?
|
|
|
|
|
Because CView has the focus of the OS.
From MSDN Library
-----------------
The WM_SETFOCUS message is sent to a window after it has gained the keyboard focus.
The SetFocus function sends a WM_KILLFOCUS message to the window that loses the keyboard focus and a WM_SETFOCUS message to the window that receives the keyboard focus. It also activates either the window that receives the focus or the parent of the window that receives the focus.
If a window is active but does not have the focus, any key pressed will produce the WM_SYSCHAR, WM_SYSKEYDOWN, or WM_SYSKEYUP message. If the VK_MENU key is also pressed, the lParam parameter of the message will have bit 30 set. Otherwise, the messages produced do not have this bit set.
By using the AttachThreadInput function, a thread can attach its input processing to another thread. This allows a thread to call SetFocus to set the keyboard focus to a window associated with another thread's message queue.
|
|
|
|
|
I need to implement ICopyHook interface inorder to intercept copy,rename and delete commands. I have basic knowledge of COM, Can anybody give me some guide lines as in how to begin implementing this ??
Please note I am looking for very basic tips, starting from how to create my own interface? is it like adding class ?? if yes whats the procedure ??
any and every help would be much appreaciated.
Thanks
Abhishek Narula
|
|
|
|
|
|
Thanks Mike, just downloaded your articles appears to be exactly what I was looking for .. Thanks the help.
Regards,
Abhishek Narula
|
|
|
|
|
We are using the 'Crystal Report Control 4.6' as an OLE component in VC++. While using the SetAction() function provided by the OLE component, we are getting an error "Unable to load Report".
If some one has worked on the same or has any idea how to rectify the error please respond. Thanks
ThomasKennedyBose
|
|
|
|