|
I had a similar problem trying to use the Microsoft Grid Control. It turns out that in the list of controls, there were two that were available - both appeared to be MS Grid Controls, but one was apparently an old version that was probably installed by some other software at some point.
Of course, I chose the wrong one and got the error message you indicate. After talking to Microsoft, I went into my project and selected the other grid control and all was OK.
Hope that helps.
Karl - WK5M
PP-ASEL-IA (N43CS)
PGP Key: 0xDB02E193
PGP Key Fingerprint: 8F06 5A2E 2735 892B 821C 871A 0411 94EA DB02 E193
|
|
|
|
|
How to change the list of controls.... i mean i dn really know how to change the list of controls
|
|
|
|
|
hi i am using c programming.
i am trying to make a program which compare the user entered date of birth and return how old they are are.
i have already found the nessaccary functions for comparison of datetime thru <time.h>
e.g: time_t t;, difftime()
so currently i am troubles by how i am supposs to input the values the user entered which may be string into the time_t type variable?.
could anyone pls help me.
|
|
|
|
|
Hi,
use mktime() function to populate the value of variable t.
mktime takes time structure to be converted and returns the time_t equivalent to the structure. U can populate the structure by taking inputs from user.
|
|
|
|
|
i read on the description of mk time and it sakys
the mktime() function converts the localtime in time to calendar time, and returns it. if there is an error, -1 is returned.
i am currently not really sure how i am to use it with my t time varable could u show a small example please?
|
|
|
|
|
When I had to do this many years ago, I couldnt find anything to do it and therefore had to use strtok() to break the string into its numeric parts, put them into a struct tm, and use mktime() to convert that into a time_t.
If I had to do the same thing today I would use windows COM functions and the DATE type. VarDateFromStr() takes an OLECHAR* strIn and fills in a DATE* pdateOut.
|
|
|
|
|
Hi I am having some problem with writing binary data using std::wofstream. I am using following code to write a double number but nothing is being written to the file. Am I doing something wrong? I am compling using UNICODE defined and wchar_t is defined as an internal type.
#include <iostream>
#include <fstream>
#include <math.h>
int _tmain(int argc, _TCHAR* argv[])
{
std::wofstream fp("test.txt", std::ios::binary);
double x = sqrt(2.0);
fp.write(reinterpret_cast<const wchar_t*>(&x), sizeof(x));
fp.close();
return 0;
}
-Saurabh
-- modified at 0:28 Thursday 15th November, 2007
|
|
|
|
|
Just a question, with that std::wofstream, is it not needed to specify that you create the file to Write or to Read? I mean, you are saying that is binary, but you don't say you want to write to it.
With CFile you must say it.
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
“The First Rule of Program Optimization: Don't do it. The Second Rule of Program Optimization (for experts only!): Don't do it yet.” - Michael A. Jackson
|
|
|
|
|
ofstream is output file stream and wofstream is output file stream for wide characters. For input there are ifstream and wifstream.
-Saurabh
|
|
|
|
|
hi
i want to increase the width of vertical scrollbar.How it is possible.
thank u in advance
malik
|
|
|
|
|
By subclassing and using OWNERDRAW can be one solution. But... why to make it? (If I may ask). List Ctrl is annoying enough to worry about the scrollbars :P
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
“The First Rule of Program Optimization: Don't do it. The Second Rule of Program Optimization (for experts only!): Don't do it yet.” - Michael A. Jackson
|
|
|
|
|
you wrote "By subclassing and using OWNERDRAW can be one solution"
can u give me some light with the help of coding
you wrote Why do we have to worry about
i want to develop an application for touch screen so i need the scroll size same to fingure tip
malik
|
|
|
|
|
Ok, I didn't thought about it. Is a good reason
Sorry, I don't know how to do it, but This article[^] and This article[^] can maybe help you
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
“The First Rule of Program Optimization: Don't do it. The Second Rule of Program Optimization (for experts only!): Don't do it yet.” - Michael A. Jackson
|
|
|
|
|
Nelek wrote: By subclassing and using OWNERDRAW can be one solution
How? ASFAIK Owner draw allows only to draw the Client area of list control. Scroll bar lies in the non client area. So I think it is not possible with the owner draw.
|
|
|
|
|
Is it not possible to override and put a bigger user defined scrollbar over the other one? Then use it as you want?
On the other hand, I have given him the links to two articles, the XListCtrl and the ResizingControlBars of Hans Dietrich. I guess are the best examples to achieve it
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
“The First Rule of Program Optimization: Don't do it. The Second Rule of Program Optimization (for experts only!): Don't do it yet.” - Michael A. Jackson
|
|
|
|
|
Nelek wrote: Is it not possible to override and put a bigger user defined scrollbar over the other one?
Actaully we cannot overide. I check the link you suggested him. In that also they some how hide the original scroll bar and puts our own scroll bar.
When i tried, had a problem that some part of the last column gets under the vertical scroll bar. But this is not a problem if the text in the last column is a little less than the column width.
|
|
|
|
|
I think that this is easily avoidable setting the width of the column higher than the text that is going to contain with LV_COLUMN lvCol; i.e. lvCol.cx = nDesiredWidth; when inserting the items.
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
“The First Rule of Program Optimization: Don't do it. The Second Rule of Program Optimization (for experts only!): Don't do it yet.” - Michael A. Jackson
|
|
|
|
|
No no you didnt understand what I mean. Setting the width of the column is not the pblm here
try this.
Create a list control with a 250 pixel wide
insert a column with width 200 pixel.
Reduce the client area of list control by 100 pixel( using OnNcCalcSize() function)
You can see the effect. Now you can no more reseize the column using the mouse.
|
|
|
|
|
I didn't try the CListCtrl so far to find this issue In my application the CFormView that contains the CListCtrl must not be resized, so I have not that problem
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
“The First Rule of Program Optimization: Don't do it. The Second Rule of Program Optimization (for experts only!): Don't do it yet.” - Michael A. Jackson
|
|
|
|
|
The width can be increased if you enable the flat scroll bar in the list control.
check the LVS_EX_FLATSB style,
FlatSB_EnableScrollBar()
FlatSB_SetScrollProp()
But MSDN says "Flat scroll bar APIs are implemented in Comctl32.dll versions 4.71 through 5.82. Comctl32.dll versions 6.00 and higher do not support flat scroll bars".
|
|
|
|
|
hi
thank u very much i have implimented ur approach,but i also want to color the scrollbar.I use function
FlatSB_setScrollProp(handle,BACKGROUNDMACRO,color,BOOL)
but color is not appear,Am i missing something,please reply
malik
|
|
|
|
|
rajneshmalik wrote: BACKGROUNDMACRO
Where is that flag?
U can chnage only the channel color of the scroll using FlatSB_SetScrollProp().
|
|
|
|
|
Hi,
I am new to Windows programming.
I am trying to uniquely select and double click an item in the list view (SysListView32) in third party software. This task is somewhat similar to MyProgram trying to double click an item in a ControlPanel-like list view.
To accomplish this I am sending a LVM_FINDITEM message to get the item index of the item to be double clicked.
LVFINDINFO lvfi;<br />
ZeroMemory(&lvfi, sizeof(LVFINDINFO));<br />
lvfi.flags = LVFI_STRING;<br />
lvfi.psz = (LPCTSTR)"Item Name";<br />
<br />
int itemIndex = ::SendMessage( aControlHWnd, LVM_FINDITEM, (WPARAM)(int)(iStart), (LPARAM)(const LVFINDINFO *)(&lvfi));
This send message is causing a runtime error. After going through some forums and message boards I found that this is due to one of the message parameter which is a pointer to a structure, as you cannot pass a pointer-to-memory to another process.
Now I would like to know how to custom marshal this message to the other process?
OR
Any alternative solution to uniquely select and double click an item in the list view.
Any idea or solution to this problem is greatly appreciated. Thanks in advance.
|
|
|
|
|
scody wrote: uniquely select and double click an item in the list view.
So you need to get the list view item when the user double clicks, right?
|
|
|
|
|
No, I need to double click a list view item. Sorry, if it is confusing.. For example, if I want to double click an item named "Item Name", I should be able to click it irrespective of wherever it is positioned in the list, so I called it uniquely(that’s an exaggeration!) select.
|
|
|
|