|
'_type_code' is redefined , Use another function name!
Everyone is my teacher!
|
|
|
|
|
Hello, I was wondering what is required of a bitmap for it to displayed with a
transparent background when used as a toolbar button. I have two bitmaps, and when used in the same code, one yields transparent button backgrounds and the other doesn't. The bitmap that yields transparent backgrounds was used in a project I did three years ago, but I can't see anything special with it. Both got black background. I know the bitmap that will yield transparent background, but that is because that it was part of a larger toolbar bitmap in an unconventional size that I reduced to a size of 16*15 (using the resource editor).
I am putting the entire project on the following url if anyone wants to take a look.
http://www-und.ida.liu.se/~mikas493/code.zip
Please! This is driving me crazy!
|
|
|
|
|
CToolBarCtrl uses image lists so according to MSDN:
An image list may also include a monochrome bitmap that contains masks used to draw images transparently (icon style).
HTH
"An expert is someone who has made all the mistakes in his or her field" - Niels Bohr
|
|
|
|
|
Hi,
I really really desperately need to learn how to get the amount the listview control has scrolled of. Like 10 pixels up or 40 pixels down... I cannot find it anywhere... Thanks
|
|
|
|
|
Just a guess
UINT nScrollPos = GetScrollPos(SB_VERT)
"An expert is someone who has made all the mistakes in his or her field" - Niels Bohr
|
|
|
|
|
yeah, but that gives me the position instead of the amount of pixel scrolled. Even if I keep the last position and calculate it then, then how will I get the result if it it the first time I request the position and have no previous one... Okay, ,aybe I can assume it was 0... and can I assume it is position = scroll amount in pixels?
Thanks
|
|
|
|
|
If GetScrollBar () is retuning the index of the top most item in the list...multiply this number by the height of each individual item. This value I think can be retreived via CListCtrl::GetItemRect()
That calculation will return scroll position in pixels...i think...
HTH
cheers
"An expert is someone who has made all the mistakes in his or her field" - Niels Bohr
|
|
|
|
|
I have created modal dialog and I passed pointer to my View class to it.
Now I need to get input from the dialog and update my List control in View class in real time.
Is there any way to overwrite modal stage of the view only for input a then reset it back.
|
|
|
|
|
pepevejlupek wrote:
Is there any way to overwrite modal stage of the view only for input a then reset it back.
What do you mean by that?
If you just need to get the data from the dialog and update the view class; just get the data in the part that you call the modal dialog. Then pass this data to your View class using either messaging or calling the functions of the view directly.
Mustafa Demirhan
http://www.macroangel.com
Sonork ID 100.9935:zoltrix
<nobr>They say I'm lazy but it takes all my time
|
|
|
|
|
thanks i found my problem. it had nothing to do with modal dialog.
|
|
|
|
|
Hello there,
Please introduce good book for learning VC++ .NET ...
I want to learn about .NET, writing webservers and etc by MC++ managed code ...
Regards,
My month article: Game programming by DirectX by Lan Mader.
Please visit in: www.geocities.com/hadi_rezaie/index.html
Hadi Rezaie
|
|
|
|
|
Can't go wrong with books from MSPress. Try here[^]
Paul Lyons
Certified Code Project Lurker
|
|
|
|
|
I have a map <cstring, cstring=""> which gets filled in with keys and values chosen by the user. My question is, can the user leave the editbox that holds the value blank? So that that key has a NULL value? Will that mess up my map? Since a NULL is not a CString, there will be some sort of problem right? Yet I do want to use a Map and I do want a user to be able to enter no value at all....
Thanks,
ns
Related question:
If I have an editbox with no entry, what will GetWindowText return in its argument?
|
|
|
|
|
what are you using for the key, a char * or a CString ?
-c
Though the cough, hough and hiccough so unsought would plough me through,
enough that I o'er life's dark lough my thorough course pursue.
--Stuart Kidd
|
|
|
|
|
A CString for key and for the value too. Incidentally I added another question to my initial one..
|
|
|
|
|
if you're using a CString, then NULL is not an issue. you will just have an empty CString as a key in that case, not a NULL.
Though the cough, hough and hiccough so unsought would plough me through,
enough that I o'er life's dark lough my thorough course pursue.
--Stuart Kidd
|
|
|
|
|
Except theres a complication: This map key and value eventually have to be converted to char* because thats the way Access takes them in as records.
|
|
|
|
|
Do you put CString's in your map? If so, NULL is automatically be converted to CString object with no contents. So no problem
Mustafa Demirhan
http://www.macroangel.com
Sonork ID 100.9935:zoltrix
<nobr>They say I'm lazy but it takes all my time
|
|
|
|
|
ns wrote:
If I have an editbox with no entry, what will GetWindowText return in its argument?
Depends on which GetWindowText you use.
<br />
int GetWindowText( LPTSTR lpszStringBuf, int nMaxCount ) const;<br />
<br />
void GetWindowText( CString& rString ) const;<br />
If you use it with LPTSTR, the first character in the array will be set to '\0'. If you use CString, it will be a CString object with a "" in it
Mustafa Demirhan
http://www.macroangel.com
Sonork ID 100.9935:zoltrix
<nobr>They say I'm lazy but it takes all my time
|
|
|
|
|
Thats great. But I forgot to add that eventually these friendly CStrings get converted into char*s because I have to put them into a database as rs->fields(key0)->Value = value0
where I strcopied my CStrings key and value over into the corsep key0 and value0. The database didnt like the empty string at all, and didnt put in the record...
Thank you for answering.
ns
|
|
|
|
|
Is it by any chance that this field shouldnt be NULL in the DB?
Papa
Murex Co.
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
I created that db field as nullable which in databasey according to docs means(for access) a blank string. SO it shouldnt be upset about that. I get no error msg, just that nothing gets added to the whole record if one fields value is left blank.
|
|
|
|
|
i had once the same prob in access, i didnt solve it, i just replaced a blank string with _ !
Microsofts
Papa
Murex Co.
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
I like that solution. So if getwindowtext gives me back a cstring "", I'll just replace it with _, and vice versa when retrieving it. Great idea!
Thanks,
ns
|
|
|
|
|
Asalam mualaekuum?
|
|
|
|