|
"help me understand a way to correct this eroneous microsoft control/event handler"
I can try to help you understand, but there is no "correction". This is not erroneous behavior. It is the way its supposed to work (read MSDN). From your description you are using the wrong event. You might want to try LVN_ITEMACTIVATE.
Good Luck,
Bill
|
|
|
|
|
How can I print an image (bitmap) from a file by using gdi+ and visual C++
thank you for help
khaldoun
|
|
|
|
|
Hi,
It's possible to draw text using Himetric ?, Or should I make the conversion LPtoDP to draw the text ? ( I have problems with the DP, because it changes from a printer to the screen, and...).
Thanks, Greetings
Braulio
|
|
|
|
|
You should be able to DrawText in HIMETRIC, but you will need to take into account the different DPI of different devices.
Dave.
|
|
|
|
|
Is there anyone here who's used the monthview control in a dialog based application who can help me out with the problems I'm having (Using "Microsoft MonthView Control 6.0 (SP4)" using MFC and Visual C++ 6)
I'm not sure if either I'm doing something very wrong, or just this control is full of bugs.
Here are my problems:
1) If I display all 12 months, the days in the last month don't get displayed bold (they get set and unset correctly, and if I change the view to display that month anywhere bar the last displayed month it works fine) - My workaround to this is to just display 9 months and make the user flip back and forth to see the whole year (I predict complaints..)
2) The control grabs focus, meaning if I click on a date, then click on a button on the dialog, it just selects that button rather than clicking on it (1 click to deselect the monthview control, and a 2nd to actually click on the button I clicked on)
3) If I call my function that makes the days bold (using SetDayBold) from my OnInitDialog, the days don't get set bold. If I call it from a mouse click event then it works fine.
I've searched MSDN and found a VB workaround to problem 2, but it wasn't much help to me using C++
Any help will be much appreciated
--
Help me! I'm turning into a grapefruit!
|
|
|
|
|
hello people,please read carefully.
I have a situation with someclasses : X,M,S,E and some structures : A,B,C like this.
class X is autonomous.(i dont know the correct word)
class E has variables of type class X,structures A,B and C.
class X has an pointer of type E(later becomes an array and still later destroyed)
class M:public X
class S:public X
M has a pointer of type S.(later becomes an array and still later destroyed)
now,
all these mean class M has class E(and hence part of itself and S-so twice itself ) due to inheritence.I have to store class in list.
two questions.
1.is CList safe?
2.where can I possibly leak memory.
-20365 joe
|
|
|
|
|
Uff... you're giving little information to know whether you will encounter memory leaks or not. A distinction has to be made between having (the "had" object is a member variable of the "haver") and owning (the "owner" has a pointer to the "owned"). In the second case, you have to consider what will hapen when objects are copied:
M m1;
...
M m2=m1; Are you duplicating the owned objects of m1 ? If not, then you will probably run into memory problems, as both m1 and m2 think they own the same objects of type S . You got to think out very carefully these issues, as CList implicitly will make copies of objects contained.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Hi,
can I test list-Box Styles (e.g. LBS_OWNERDRAWVARIABLE) and make sure it is set? Thats better then trusting in a user who sets properties in a dialog resource. Where do I handle this?
|
|
|
|
|
I tried CListBox::OnCreate, it is never called. I'm stuck.
|
|
|
|
|
Try PreCreateWindow
Joel Lucsy (jjlucsy@ameritech.net)
|
|
|
|
|
nope, is never called for a CLlistBox derived class
|
|
|
|
|
Hi All, Can anyone help with this? I'm now totally confused by conflicting articles....
I have a 16Bit DLL that I need to call from a VC++ 6.0 32Bit application. The DLL cannot be recompiled (and it will have a short life anyway).
The 32Bit application needs to run on Windows 9x / NT / 2000 /XP. My understanding is that I need to use the Generic Thunk for this - Is this correct? Is so how? I can find lots of examples of 16Bit calling 32Bit but not the other way around (and would'nt that be the more popular thing to do?) - Or is it so obvious that I am missing the point!
The functions in the 16Bit DLL have been declared as below:
int FAR PASCAL __export files_pack( char *, char *, unsigned, unsigned *, long );
int FAR PASCAL __export files_unpack( char *, char * );
int FAR PASCAL __export split_pack( char *, char *, unsigned *, long );
Does it make any difference because they use the PASCAL calling convention?
HELP PLEASE BEFORE I EXPLODE!
Regards
Kevin.
|
|
|
|
|
|
Thanks, but my confusion continues....
Accoriding to this....
http://support.microsoft.com/default.aspx?scid=kb;en-us;Q125710
A generic thunk supports all the platforms I require, and does not require the thunk compiler?
Am I any closer?
Regards,
Kevin.
|
|
|
|
|
A generic thunk is for 16 bits apps calling 32 apps and not the opposite .
Win95/98 supports flat thunks that permits a 32 app call a 16 bits app, this is what you want, I presume ?
Win NT/2000 doesn't not support Flat Thunks at all, so you must devise your form of IPC(Interprocess Communication Mecanism) . For instance doing your stub dll between the 16 bits dll and your code.
Cheers,
Joao Vaz
A person who is nice to you, but rude to the waiter, is not a nice person - Natalie Portman (Padme/Amidala of Star Wars)
|
|
|
|
|
See this article on MSJ
Nerditorium
It explains that the _stdcall aka PASCAL convention used causes some funky code to be used , since with _stdcall , the calle must clean the stack , not the caller when using _cdecl call convention.
HTH
Cheers,
Joao Vaz
A person who is nice to you, but rude to the waiter, is not a nice person - Natalie Portman (Padme/Amidala of Star Wars)
|
|
|
|
|
Thanks Joao, looks like I've been barking up the wrong tree all afternoon, time to start reading the correct artices!
Regards,
Kevin.
|
|
|
|
|
Hi People, so near yet so far.......
Can anyone help me further with this?
I compiled my .ASM modules for the 16Bit DLL, hunted around until I found my MASM disks, compiled the .OBJ, created a 32Bit DLL Stub but now I'm stuck on the linking. Below is the output from the compiler, I assume this has something to do with name mangeling? - Any suggestions?
--------------------Configuration: ThunkDLL2 - Win32 Debug--------------------
Linking...
thk32.obj : warning LNK4033: converting object format from OMF to COFF
ThunkDLL2.obj : error LNK2001: unresolved external symbol "int __stdcall pack_ThunkConnect32(char *,char *,void *,unsigned long)" (?pack_ThunkConnect32@@YGHPAD0PAXK@Z)
Debug/ThunkDLL2.dll : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.
ThunkDLL2.dll - 2 error(s), 1 warning(s)
|
|
|
|
|
_stdcall mangles names , so normally prefixes a underscore to the functions adds a @ and puts in the name the total bytes of the arguments , and something more e.g :
pack_ThunkConnect32 function uses 4 arguments , so it uses 16 bytes(?) so the calle knows the amount of memory that must pop from stack to clean it .
A fast way to see the name is using quickview utility that comes with windows , and view the mangled name on the exports table ?
Cheers,
Joao Vaz
A person who is nice to you, but rude to the waiter, is not a nice person - Natalie Portman (Padme/Amidala of Star Wars)
|
|
|
|
|
If you used also c++ to do your dll you didn't forgot Extern "C" { ?
And here is the sample code to call stdcall ...
Assembly samples
Cheers,
Joao Vaz
A person who is nice to you, but rude to the waiter, is not a nice person - Natalie Portman (Padme/Amidala of Star Wars)
|
|
|
|
|
Hello,
I have a list view type MDI, I also have a MM Timer with in the CMainFrame. I am trying to assign a pointer to my list control from CMainFrame to get the number of items in the list control (inside the MM timer function). When I run the following code it crashes my app..
int count;
CListView* pList = (CListView*)(MDIGetActive()->GetActiveView());
count = pList->GetListCtrl().GetItemCount();
Is there a better way to get a pointer to CListView that wont crash my app?
|
|
|
|
|
Never mind.. I just moved the MM Timer to my CListView derived class and everything is working fine.. tnx anyways
|
|
|
|
|
hi,
how exactly is an ascii code converted into a character on the VDU?
If it is hardware embedded then how are japanese and chinese characters displayed even in dos?
-very curious
|
|
|
|
|
It is not hardware embedded. VDUs are raster-based, much the same as your TV: the OS basically draws the characters according to the font selected.
In the old days, so called ASCII terminals did the presentation internally --in those situations one could have problems displaying foreign characters.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
I have a CPropertySheet which has two property pages in Wizard mode. In my OnWizardFinish handler on the second page I do an EndDialog(IDOK). I then call another modal dialog, dialogB. The wizard dialog does not go away until dialogB is dismissed and the return from the OnWizardFinish is executed.
- Is there anyway to make the wizard dialog go away immediatly, the EndDialog does not seem to do it?
- I've unchecked the System Menu resource from the wizard dialog. The CPropertySheet puts the system close button (X) in the upper right corner. Is there a way to remove it?
Thanks in advance,
Bob
|
|
|
|