Sorry - had to ask:). I think problem is the following void CCtrlView::OnPaint() { // this is done to avoid CView::OnPaint Default(); } Default - is just a call to default winproc, instead of CView call to OnDraw(&dc);
AlexO
Posts
-
OnDraw not getting called -
OnDraw not getting calledis it virtual? What is the signature of CEditorView::OnDraw ?
-
XP Worker Thread File IO Issue::GetLastError == ????? in debug @err, hr = ?????
-
declaring 2 D arrayonly last dimension can be undefined try __int8 stepArray[2][]={{1,2,3,4},{5,6,7,8}}; better yet use std::vector
-
IIsFtpVirtualDir??? How to create a virtual directory(FTP&WEB) in IIS?MSDN articale "IIS Sample ADSI Script to Create FTP Virtual Directories" Q254808
-
Help with timer 8-JSource code might help
-
Visual C++ 6.0 SP5 - Debugger does not respondit could be the application itself. Here is the obvious stupid questions in case you forgot to check something: Do you use any unconventional libraries? Did you try to break the execution by "break all"? Do you use mix of MT(d), MD(d) libraries? Do you have custom version of stl libraries? Could your *.pdb files be out of sink? Is it possible you have several versions of shared DLL's on your computer? Did you install Java from Sun on your computer recently?:) (Rational Rose, Corba, RealTime player) What is your app actually doing at the time of the problem?
-
Access violation only in release build with debug infono, I did not mean address. Imagine that inside that function you have soemthing like int SomeFunction(DWORD* dwSize, char* actualBuffer) { if(*dwSize > 0) { char* pCopy = new char[*dwSize]; ::memcpy(pCopy, actualBuffer, *dwSize);//this is where error will manifest itself if you forgot to initialize dwSize, in release dwSize could be anything, in debug it would probably be zero so we never come here ... } ... } P.S. Real scenario is usually more complex but idea is the same
-
Copying classes between projectsIf you are really lazy like me :) - create intermediate empty solution and add old project and new project to it. In resource view just drug the resource from one project to another, holding Ctrl key.
-
Access violation only in release build with debug infoIt is very common error in debug vs. release. The problem is debug memory allocation it usually initializes memory to 0 or 0xcdcdcdcd. Release memory is not initialized so values are random. Example: DWORD dwSize; //not that is not initialized SomeFunction(&dwSize);//note dwSize is in/out parameter the example above might work in debug but will blow up in release.
-
Access violation only in release build with debug infos_k wrote: __REBARBANDINFO rb; __rb.cbSize=sizeof(REBARBANDINFO); __// THIS IS PROBLEM FUNCTION __RCtrl.GetBandInfo(0,&rb); try _REBARBANDINFO rb; ::ZeroMemory(&rb, sizeof(REBARBANDINFO)); __rb.cbSize=sizeof(REBARBANDINFO);
-
HGLOBAL questionThe topic is advanced, and using that kind of trickery requires skills and most importantly reason. I am not even going to discuss what possible reason you have to write code like this. Lets concentrate on what you actually trying to do: Beer26 wrote: HGLOBAL pexec = GlobalReAlloc(hbytes, size, GMEM_FIXED); I am not completely sure what you expect from the statement above. I assume you want to create a copy of the resource in memory (I do not think GMEM_FIXED is going to be honored in Win32) You might be better off allocating new block of memory, insteadof realloc-ing something that you did not alloc-ed. Beer26 wrote: ptr = (int (__cdecl *)(int, char *[]))pexec; I read the line above as - you assume that recourse you loaded is actually executable code of the function with signature "int (*ptr)(int argc, char* argv[]);" (please confirm). Are you sure that it is a valid executable code? Beer26 wrote: int j = 1; char *strs; (*ptr)(j, &strs); the line above actually try to execute the loaded code. (please confirm). Please note also that strs is not initialized. How did you compile it? How did you put into resource? How are calls "getc" or "printf" going to be resolved ?
-
software and securityCyberizen wrote: anyone can just open up the registry and edit the setting Not anyone, very few people actually understand how to work with registry. Very, very, very few people are capable of hacking into binary encrypted data (assuming that you wright binary encrypted data into the registry). From my experience there is no such thing as absolutely secure system, however RC2 and other encryption algorithms are pretty close.
-
Is it possible to use Manifest file in VC6it is just a resource 24 (usually id 1) if you have the actual manifest file just insert it as a custom resource.
-
How can I use a VB library, in VC++Stdafx.h usually is a good place. In general, it should be treaded as any other include file - you put right before the code that uses it. the actual #import "myvbcode.dll" is substituted at compile time for #include "myvbcode.tlh" #include "myvbcode.tli"
-
Creating un-fragmented filestry instead of od@ananzi.co.za wrote: // Write to file 10 times, (allocatespace/10) bytes at a time write to memory until done (alloc/realloc all you want) dump the memory to the file at once. Otherwise I do not think you have contol over it, unless you want to write kernel driver.
-
setup makerit does not support win installer
-
How can I use a VB library, in VC++P.S. #import "libid:12341234-1234-1234-1234-123412341234" where 12341234-1234-1234-1234-123412341234 is you LIBID, is preferable. This way you do not depend on the location of the COM dll during compilation.
-
How can I use a VB library, in VC++use #import "myvbcode.dll" during c++ compilation it would generate myvbcode.tlh myvbcode.tli which are automatically included then just select the functionality you need. If you need more help, publish generated .tli file here and example of how you would use it in VB.
-
How can I use a VB library, in VC++You have to covert it to COM library.