|
What i would do:
- Create a bitmap of a car.
- define rectangles where the user may click on. Save those rectangles (origins and sizes) in an array or file
- run the program and measure its screen-size
- calculate the difference in size of the screen and the bitmap in a ratio
- read in the bitmap and put it on screen. Stretch it when needed (use StretchBlt() ?)
- read in the rectangles
- When stretched multiply all coords of the rectangles with the ratio.
- program the actions
- Monitor the mouse up messages: when the mouse is in one of the rectangles, invoke the corresponding action.
ready...
If you still have time over:
- take the bitmap and cut out every rectangle, colorize it a bit and save it as a new bitmap. Now every rectangle has a (sub)bitmap that can be displayed while the mouse hoovers over the rectangle (you'll need to monitor mouse moves also) ..
Rozis
modified on Wednesday, April 28, 2010 8:38 PM
|
|
|
|
|
Is there any approach to write unit test cases for GUI based applications (VC++ applications).
It's my client's requirement to write test cases for it.
|
|
|
|
|
If necessary to test the GUI, I would rather use QTP or some kind of automation software to test my GUI.
If you seperate your business/data logic from the presentation layer, you should be able to write unit test against the business/data layer.
For GUI testing, you can take a look at Fitnesse[^]. I haven't tried it, but have seen some demos and heard it could really work for GUI applications.
|
|
|
|
|
How do I disable resizing through WM_SIZE Message? Thanks.
|
|
|
|
|
Either remove the resizing borders, or handle the message and return 0 .
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Man who follows car will be exhausted." - Confucius
|
|
|
|
|
|
How can i get List view Column header name
is there any macro avaliable
|
|
|
|
|
|
thanks code-o-mat
but still its giving me some head ache
when i drag drop my column.. i m not able to get the column names as per the current arrangement....
|
|
|
|
|
Elaborate that a bit, please, i!m not sure what you mean...
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Sometimes you just have to hate coding to do it well. <
|
|
|
|
|
actually i have three columns in my list view
column1 column2 column3
when i drag the first column(column1) to second column(column2)
second coloum will be in first columns position and first columns position .
position will get changed to below format
column2 column1 column3
so when i get the column details using
TCHAR szBuf[256];
LVCOLUMN column;
column.mask = LVCF_TEXT;
column.pszText = szBuf;
column.cchTextMax = sizeof(szBuf) / sizeof(TCHAR);
for(int i=0;i<g_ncColumns;i++)
{
ListView_GetColumn(GetDlgItem(hDlg,LV_NOTATIONS), i, &column);
at the first run of for loop i m expecting the szBuf as column2
but its stil giving as column1
|
|
|
|
|
Could CListCtrl::GetColumnOrderArray[^] help?
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Sometimes you just have to hate coding to do it well. <
|
|
|
|
|
Hiho
I would like to increase the size of the window showing the month, that appears if you click on the dropdown-icon. The problem is, I don't have a clue how to do that, because it is drag and drop from the tools. I would be happy about any sugestions.
Thx
Jan
|
|
|
|
|
Xerantes wrote: I would like to increase the size of the window...
At design time or run time?
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Man who follows car will be exhausted." - Confucius
|
|
|
|
|
Good Question. At Design would be sufficient for me.
|
|
|
|
|
After you add a control to the dialog template, just grab the resizing handles (of the control) to size/move accordingly.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Man who follows car will be exhausted." - Confucius
|
|
|
|
|
I don't know if i made myself completly clear. I want to change the size of the window, that is only visible at run time. You can only resize the dropdownbar, when you add it to the dialog and not the window showing the selection area for the date.
http://msdn.microsoft.com/de-de/library/4xyy1csh.aspx
|
|
|
|
|
Xerantes wrote: I don't know if i made myself completly clear. I want to change the size of the window, that is only visible at run time.
Point taken. At this time, all I know is that the (month) control is a SysMonthCal32 window. You might have to handle the clicking of the down arrow.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Man who follows car will be exhausted." - Confucius
|
|
|
|
|
Thx. I will take a look in that direction.
|
|
|
|
|
Hello friends, I'm Luisa, and I'm a MFC developer. For the first time I'm using CDatabase with a UDL file. But I don't if it's possible. Normally, I'm using MDB file. Can someone help me??
Kisses
Luisa
|
|
|
|
|
I have not used this myself but there is some useful information here[^] on MSDN.
It's time for a new signature.
|
|
|
|
|
The CDatabase class makes ODBC connections to a database. Depending upon what ODBC driver you are using it may or may not take a UDL file as the connection string. You may be able to call
CDatabase myDB;
myDB.OpenEx(File=C:\MyConnectionString.UDL);
, but it really would depend upon the driver being used.
Chris Meech
I am Canadian. [heard in a local bar]
In theory there is no difference between theory and practice. In practice there is. [Yogi Berra]
|
|
|
|
|
Thanks for your help. I have a right udl file (I can connect to my server executing the connection test) but using the string "File=C:\MyConnectionString.UDL" it cannot work. I don't know why, but it's not working. How and where can be something wrong?
TuxOnHumax Team
|
|
|
|
|
Undici77 wrote: "File=C:\MyConnectionString.UDL"
Your string should look like "File=C:\\MyConnectionString.UDL" ; the '\' character is an escape character in strings and needs to be specified twice.
It's time for a new signature.
|
|
|
|
|
Yes... Unfortunately this was clear.. I have tried:
"File Name=C:\\Conn.udl;"
"File=C:\\Conn.udl;"
It's not working...
TuxOnHumax Team
|
|
|
|