Thanks a lot. That worked. It aligned the text as I expected but few items could not be drawn, I guess I have to skip where the item type is image instead of text. Or may be I have to set the image also. I am working on it. I had used lvs_ownerdrawfixed. Thanks, Rahul Kulshreshtha
rahul kulshreshtha
Posts
-
How to set the alignment of items of CListCtrl -
How to set the alignment of items of CListCtrlThanks Richard, I am going to give it a try. I searched for the example for this and found this http://msdn.microsoft.com/en-us/library/kc9hahtd(v=vs.80).aspx[^] Can you refer any other examples? I am new to OwnerDraw. This is what I got about ownerdraw. http://msdn.microsoft.com/en-us/library/windows/desktop/hh298352(v=vs.85).aspx[^]
-
How to set the alignment of items of CListCtrlI want to set the alignment of the items only and not for the header. I tried with SetColumn with LVCFMT_RIGHT but that aligns header also. I just want to align only the items(header should be skipped) I also thought that SetItem should work for aligning only a single item but I don't know how it can be used for aligning a single item.
-
How to stop typing in CDateTimeCtrl in MFCThanks Jochen, you are right. That way it will work. But for such a small requirement, I don't want to do big changes :doh: and also I don't want to go for pretranslate message. Is there any way to handle WM_CHAR/OnChar events for the date control on the same dialog class?
-
How to stop typing in CDateTimeCtrl in MFCI have a CDateTimeCtrl on my dialog. Through this I can choose any date in given range from drop down. But currently user is also allowed to press numeric keys to set the date. Is there any way to stop user from typing in it. I want, he should only be able to select the date from drop-down and I don't want to disable the control. I have checked the "AllowEdit" property but that is different thing. Currently it is set to false.
-
Which IDE you use for development on Linux platforms?Hmm i was also thinking for the same. Earlier I had used eclipse for Java applications however Netbeans was also good.
-
Which IDE you use for development on Linux platforms?Which IDE you use for development on Linux platforms? 1. Does it support driver development or kernel development? 2. Does it provide a nice GUI for application development, for example - can you drag and drop controls from toolbars to forms? 3. Is debugging of threads, memory location and registers possible in that ? I am an MFC developer and now want to try my hands on Linux.
-
TAPI Call programThe msdn pages which I had followed are moved but I found something similar to that. http://msdn.microsoft.com/en-us/library/windows/desktop/ms734223%28v=vs.85%29.aspx[^] This is similar to those steps. Initialise->SessionControl->Device control etc However I think, samples located at http://www.tapi.info/[^] should be better to start than msdn.
-
An Easy QuestionThanks, I got it
-
An Easy QuestionIn Release mode with VS2008, Why "var" prints "Whats up" instead of "newval" It crashes in debug mode. I guess the reason might be the auto-memory allocation is "read-only". If I use char *var = new char[15] then it works fine.
#include <stdio.h>
#include <conio.h>
#include <string>int main()
{
char *var = "\nWhats Up";
strcpy(var, "newval");
printf(var);
getch();
return 0;
} -
How to access application's extern variable inside a dllNopes! I am not; but I like to explore the things at extreme level :-\
-
How to access application's extern variable inside a dllThanks Chris for verifying that I cannot access variables in an EXE from a DLL directly. So I am doing the Huge task. Still I think hooking should work as it is working for few of the functions; I will try a little more before leaving hooks.
-
How to access application's extern variable inside a dllThanks Eric, But I don't have exe's code. See my above reply for more details.
-
How to access application's extern variable inside a dllThanks, I agree the way you are saying is right and genuine. But unfortunately I don't have exe's source code :) I have injected a dll into exe's process space and now want to get the data from exe's memory space. I tried with hooking the system level functions like LoadLibrary and TextOut etc but I could not hook GetProfileInt, CString's sprintf, format etc functions. Any way to do so ? I wonder who downvoted my question :D :D
-
How to access application's extern variable inside a dllI have an application which has several extern variables, I need to access them inside dll. Is that possible?
-
TAPI Call programI think you need to take the handle of your headphone. There are 4 or 5 defined steps (function calling) which you should do for establishing a proper communication channel. See this link. http://www.tapi.info/default.aspx/TAPI/PSDKSamples.html[^] Most of these samples are working perfectly however some may not work. Also make sure you are having bi-direction modem otherwise only one side sound will come. Enjoy TAPI !!!
-
MDI application with CMFCVisualManager, can dialog have the themes?I have an MDI application which is using CMFCVisualManager and showing nice themes :) It also has some dialogs for example About dialog which is not using this theme. Can I apply this them on that? How? I have VS 2008 + MFC featured pack with some service pack.
-
Can we create multiple message maps in a Dialog?Actually each row has a "trading-share or stock-share" in it so when data comes from servers I have to update the rows containing the old data. As there are thousands of share available in market, user can have hundreds of share in market watch grid to keep an eye with their prices and other details. As there may be 80 or more rows but the visible are can show only 60 rows so to see remaining he has to scroll down. It's not like chatting application where first row is the oldest row and bottom row is the newest row. Each row has a "stock name" and when it's update comes I have to update it.Currently I am planning to reduce the refresh rate and doing a batch update of multiple rows.
-
Can we create multiple message maps in a Dialog?yes I verified that. I wonder how other UI applications work fine when they have to draw a lot of things. For example a video player where it plays hundreds of frames in each second.
-
Can we create multiple message maps in a Dialog?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?