|
Hi
I have a dialog based application that uses many popup windows to display data. I changed the icon for these popups and it shows in the popup window and the task bar.
My prob is the new icon will not display (on the 'switch-to-program popup' window) when I press Atl-tab to swap between windows. What do I need to do for it to show up.
<br />
CMyWnd * mywnd = new CMyWnd (this);<br />
mywnd->Create(IDD_MYICON,GetDesktopWindow());<br />
HICON icon = AfxGetApp()->LoadIcon(IDI_MYICON);<br />
mywnd->SetIcon(icon);<br />
thanks
---
|
|
|
|
|
You need to change the large (32x32) icon also.
/ravi
Let's put "civil" back in "civilization"
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
Hello all,
I am currently trying to develop an application using Visual C++. This application uses two different existing libraries, one of which (DirectShow) is compiled using the __stdcall naming convention, the other and SGI library is compiled using the __cdecl naming convention. The problem is that I need to use both these libraries in developing my filter, when I compile using __stdcall I get link errors in resolving the SGI library methods. When I compile using __cdecl I get errors in resolving the DirectShow methods.
Both libraries are C++ libraries, neither library is small enough to directly specify the function/class names, they require inclusion of numerous header files. The SGI library header are improperly declared (not specified as __cdecl in the headers).
Does anybody have any suggestions??
|
|
|
|
|
There's an easy way to force functions to be __cdecl. Just do this
extern "C" {
#include <sgi_headers.h>
}
Then just compile using __stdcall, and it should work.
|
|
|
|
|
Thanks for replying, I already tried that and it gives me loads of errors (102 of them) such as
C:\PROGRAM FILES\SILICON GRAPHICS\SDK\INCLUDE\ocs/ox/corba.h(699) : error C2733: second C linkage of overloaded function '_type_code' not allowed
C:\PROGRAM FILES\SILICON GRAPHICS\SDK\INCLUDE\ocs/ox/corba.h(699) : see declaration of '_type_code'
C:\PROGRAM FILES\SILICON GRAPHICS\SDK\INCLUDE\ocs/ox/corba.h(703) : error C2733: second C linkage of overloaded function '_type_code' not allowed
C:\PROGRAM FILES\SILICON GRAPHICS\SDK\INCLUDE\ocs/ox/corba.h(703) : see declaration of '_type_code'
C:\PROGRAM FILES\SILICON GRAPHICS\SDK\INCLUDE\ocs/ox/corba.h(707) : error C2733: second C linkage of overloaded function '_type_code' not allowed
C:\PROGRAM FILES\SILICON GRAPHICS\SDK\INCLUDE\ocs/ox/corba.h(707) : see declaration of '_type_code'
....
....
....
what else can I do, this is for my thesis at uni.... and the due date is approaching fast, and I cant even get it compiled!
|
|
|
|
|
'_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
|
|
|
|