Click here to Skip to main content
15,880,651 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Dos FTP & Unix File Details Pin
Randor 17-Nov-11 6:13
professional Randor 17-Nov-11 6:13 
QuestionCan we create multiple message maps in a Dialog? Pin
rahul.kulshreshtha17-Nov-11 1:27
rahul.kulshreshtha17-Nov-11 1:27 
AnswerRe: Can we create multiple message maps in a Dialog? Pin
Chris Meech17-Nov-11 2:51
Chris Meech17-Nov-11 2:51 
AnswerRe: Can we create multiple message maps in a Dialog? Pin
Chuck O'Toole17-Nov-11 3:02
Chuck O'Toole17-Nov-11 3:02 
AnswerRe: Can we create multiple message maps in a Dialog? Pin
Erudite_Eric17-Nov-11 3:57
Erudite_Eric17-Nov-11 3:57 
GeneralRe: Can we create multiple message maps in a Dialog? Pin
Chuck O'Toole17-Nov-11 4:16
Chuck O'Toole17-Nov-11 4:16 
GeneralRe: Can we create multiple message maps in a Dialog? Pin
Erudite_Eric17-Nov-11 4:21
Erudite_Eric17-Nov-11 4:21 
GeneralRe: Can we create multiple message maps in a Dialog? Pin
rahul.kulshreshtha17-Nov-11 5:32
rahul.kulshreshtha17-Nov-11 5:32 
Thanks all,

Here is my answers:

It a share-market application which receives heavy broadcast from the server. I have a worker thread for receiving the data. After receiving the data, this thread formats data into structures and sends to another worker thread for processing. After processing that; thread posts a message (using ::PostMessage) to the active view to display the data. That view is only handling the display of the data but as the data is more it takes some time (200 milliseconds) to display. View is setting that data into a grid (UltimateGrid). Broadcast packet comes in every 500 milliseconds. Each packet contains data to be filled in approx 80 rows of the grids ( 80 * 9 cells). There is also color formatting and bold fonts on some cells. This all eats up 15 to 20% of the CPU. It freezes when I moves a child window over the grid while it was actually drawing the data on it. Just Because view was busy with handling the POSTMessages sent by broadcast thread. If I move the code which sets the grid cells, into any other worker thread then CPU utilization goes below 5% and view does not freeze but grid crashes when I scroll the grid, because internally it tries to copy the data from one row to another row however there is only one thread which updates the grid. Even though I also tried for synchronization in grid methods but that did not worked so now I am hanging between whether I should do cell setting on view (everything works fine but view freezes) or inside some worker thread (grid crashes but nothing freezes).

Is there any further optimization?
GeneralRe: Can we create multiple message maps in a Dialog? Pin
Chris Meech17-Nov-11 5:39
Chris Meech17-Nov-11 5:39 
GeneralRe: Can we create multiple message maps in a Dialog? Pin
rahul.kulshreshtha17-Nov-11 6:08
rahul.kulshreshtha17-Nov-11 6:08 
GeneralRe: Can we create multiple message maps in a Dialog? Pin
Chuck O'Toole17-Nov-11 10:17
Chuck O'Toole17-Nov-11 10:17 
GeneralRe: Can we create multiple message maps in a Dialog? Pin
Erudite_Eric17-Nov-11 7:28
Erudite_Eric17-Nov-11 7:28 
AnswerRe: Can we create multiple message maps in a Dialog? Pin
Chuck O'Toole17-Nov-11 10:12
Chuck O'Toole17-Nov-11 10:12 
AnswerRe: Can we create multiple message maps in a Dialog? Pin
Chuck O'Toole17-Nov-11 10:10
Chuck O'Toole17-Nov-11 10:10 
GeneralRe: Can we create multiple message maps in a Dialog? Pin
rahul.kulshreshtha17-Nov-11 17:50
rahul.kulshreshtha17-Nov-11 17:50 
AnswerRe: Can we create multiple message maps in a Dialog? Pin
Chuck O'Toole17-Nov-11 18:10
Chuck O'Toole17-Nov-11 18:10 
GeneralRe: Can we create multiple message maps in a Dialog? Pin
Erudite_Eric17-Nov-11 21:10
Erudite_Eric17-Nov-11 21:10 
GeneralRe: Can we create multiple message maps in a Dialog? Pin
Roger Allen18-Nov-11 4:02
Roger Allen18-Nov-11 4:02 
GeneralRe: Can we create multiple message maps in a Dialog? Pin
Erudite_Eric18-Nov-11 5:39
Erudite_Eric18-Nov-11 5:39 
QuestionPrevent an property page to close Pin
_Flaviu17-Nov-11 0:54
_Flaviu17-Nov-11 0:54 
AnswerRe: Prevent an property page to close Pin
Chuck O'Toole17-Nov-11 2:57
Chuck O'Toole17-Nov-11 2:57 
QuestionRe: Prevent an property page to close Pin
David Crow17-Nov-11 8:44
David Crow17-Nov-11 8:44 
AnswerRe: Prevent an property page to close Pin
_Flaviu17-Nov-11 21:11
_Flaviu17-Nov-11 21:11 
Questionvideo(Playing using directx) refreshing Problem Pin
VCProgrammer16-Nov-11 21:21
VCProgrammer16-Nov-11 21:21 
AnswerRe: video(Playing using directx) refreshing Problem Pin
Code-o-mat17-Nov-11 4:23
Code-o-mat17-Nov-11 4:23 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.