|
Hi,
I have developed a dialog based application under W2k using Visual C++ 6.0 to print a table. In W2k and Windows XP professional works well, but it doesn't work in W9x & WMe. I'm using MM_ISOTROPIC map mode because I need to print some graphics. In W9x and WMe, when I print, I haven't obtain any results. I thought, "I'm doing something wrong", so I generate a SDI with Print Preview option and I wrote inside OnDraw(...):
....
pDC->SetMapMode(MM_ISOTROPIC);
pDC->Rectangle(100,-100,300,-300);
then I executed the program, I choose Print Preview from File menu. The Print Preview showed me a sheet with a rectangle. I printed this and i obtained the same results. Everything its Ok under W2k and WXP, but in W9x and WMe it's a disaster.
Can somebody help me!!!!!
Thanks.
Daniel Remedi
ARGENTINA
dremedi@hotmail.com
or
dremedi@cheeseinteractive.com.ar
|
|
|
|
|
What does your print code look like?
Where is your:
cdc.StartDoc(pinfo);
cdc.StartPage();
...
cdc.EndPage();
cdc.EndDoc();
Are you attaching your DC properly? Are you rendering correctly?
- Nitron
"Those that say a task is impossible shouldn't interrupt the ones who are doing it." - Chinese Proverb
|
|
|
|
|
Could someone please help! I dont seem to be able to find anywhere that explains how to use callback functions with in MFC.
Being an MFC novice I'm a bit stuck. I get the idea behind it, but I dont understand how to code it. How are static functions used in callbacks?
Would appreciate some idiot-proof help from someone who understands it all.
Thanks,
|
|
|
|
|
How are static functions used in callbacks?
whole process of MFC is exactly as Win32 story.
key part to develop a lib as MFC is not "How are static functions used in callbacks", but how are classes connected to a cllback function (it is not a class member even it can be static function of a class).
view Windows' creation if interested - pass class pointer as parameter, otherwise just use MFC as it is - callbacks are hidden behind somewhere.
includeh10
|
|
|
|
|
What I'm trying to do is to read in a MIDI file (That works no probs), then during the playback go through each instrument, and create alist of events to be outputted, then call back to a function inside my View class to output the messages. However code that works on the same lines uses callback functions they have written themselves, and I can't seem to find anywhere that really explains whats going on in the code. I've tried writing static functions that deal with the callback, but since I'm not too sure whats going on I get errors.
Really could do with an article that explains how to do the call back syntax.
Does anyone know where I could find one. Can't find much in MSDN.
|
|
|
|
|
For MFC's AfxBeginThread() I recommend a global function.
AfxBeginThread() :: UINT theCallBackFunc(LPVOID lParam);
For C++ thread callback I recommend a static function.
_beginthreadex() :: static unsigned __stdcall theCallback(void *pParam);
Kuphryn
|
|
|
|
|
hi,
I have a formview (in splitter window)
after OnInitialUpdate()
i do a load bitmap, but the size of bitmap is greater than the form
i like to draw scrollbars of the formview
m_static_picture.GetWindowRect(&rect); //beholder of bitmap
GetWindowRect(&rectWindow);
if(rectWindow.bottom < rect.bottom)
{
//to small a scroll bar is needed
int cx = rectWindow.Width();
int cy = rectWindow.Height();
int iDif = rect.bottom - rectWindow.bottom;
cy += iDif;
ScreenToClient(&rectWindow);
SetWindowPos(this, 0, 0, cx, cy, SWP_NOMOVE);
}
i wonder why this code is not working (i see no scollbar)
even if after adding
SCROLLINFO si;
GetScrollInfo(SB_VERT,&si);
si.nMin = 0;
si.nPage = rectWindow.Height();
si.nMax = cy;
si.nPos = 0;
si.nTrackPos = 0;
si.fMask = SIF_ALL;
si.cbSize = sizeof(si);
SetScrollInfo(SB_VERT, &si, TRUE);
ShowScrollBar(SB_VERT, TRUE);
give no result,
any ideas??
dan oudijk
|
|
|
|
|
after you loaded your bmp, if the image dimesion of this bmp is imageWidth x imageHeight, try the following code:
CSize sizeTotal;
sizeTotal.cx = imageWidth;
sizeTotal.cy = imageHeight;
SetScrollSizes(MM_TEXT, sizeTotal);
|
|
|
|
|
Hola,
I'm wondering whether any of you gurus out there have ever come across this problem before.
Our company develops and have been using this data processing software for a while now. However, last week when a sister company tried to run the software, it bombed.
After much testing, we found that the bug was due to the Rich Edit control embeded in a particular view.
Now this is the weired bit. We have used the rich edit control (via loading the RichEd32.dll) with success, but this bug occurs when we try to use the control via the Rich Edit control provided by Visual Studio.
It ran fine on our side, but crashes on there machine! Yes I know of the 'works on my system' headache, but this really is puzzling! :<
Anyone know of any problems or specific requirements why this would happen specifically to the riched control placed on the dialog via the resource editor?
Using VC6. Compiled on Win2k.
one ring to rule them all
|
|
|
|
|
I am not sure what you mean "Rich Edit control provided by Visual Studio", it is still RichEd32.dll is not? "Works for me" usually solved using depends.exe and oleview.exe; make sure that whatever your program depends on is installed on the user's computer. My guess is you just switched to VC7 and forgot to ship new dlls for MFC, CRT, and STL.
|
|
|
|
|
i need to know format of jar file.
i.e. zip file is in a set of structs: local_file_head, central_file_head etc.
jar file should be in a set of structs also, but i can't find any info about it.
any hints and links is wanderful.
thx in advance.
includeh10
|
|
|
|
|
I'd start at java.sun.com . Why do you need to know the format? can't you just use sun's jar tool to unpack it.
#include <beer.h>
|
|
|
|
|
i am a c++ programmer, not just a jar file user.
i need jar info dynamically in coding.
anyway, thx.
includeh10
|
|
|
|
|
Try this link:
http://www.wotsit.org/download.asp?f=jar
regards
modified 12-Sep-18 21:01pm.
|
|
|
|
|
i viewed the site few hrs ago, it is too simple.
hope get more links.
thx
includeh10
|
|
|
|
|
I've been able to rename a .jar file to .zip and all my zip routines work just great on it. I think the only thing different is the presence of some kind of manifest file, but I'm not certain.
Joel Lucsy (jjlucsy@concentric.net)
|
|
|
|
|
I've copied the resource for making the project work both in english and german language.It worked fine in DEBUG version but in RELEASE version its giving application error and it gets closed.
|
|
|
|
|
|
I saw ur article.It was nice.But its something similar to that.I'm following doc-view architecture for my project.When i change the language settings the view needs to be updated with the language settings......But if i refresh the view its not happening and error is raised in RELEASE version.
|
|
|
|
|
I would say it is unlikely any internationalisation code would raise an error, unless of course the resource IDs are not consistent between languages, possibly an ID for a control has been swopped for a string resource.
As a test I would suggest you copy your default language resources to a new language, i.e. English to French, but do NOT change any of the resouces. Run a test changing the language to French is you don't get an exception then check your resource IDs. If you still get an exception then the error is elsewhere.
Hope this helps. Ahh I do remember a bug in Visual C++ I think it was V 6.0 but fixed on sp3 or sp4, but that did not cause an exception, just the language would not change.
If I have seen further it is by standing on the shoulders of Giants. - Isaac Newton 1676
|
|
|
|
|
Intel is no longer offering its IJL jpeg library.
Where i could download it ? Anyone has it, could send it to me ?
|
|
|
|
|
search for IJL in google and you will see many options where you can find IJL. I guess it is also available at intel's site. all the best.
cheers
Himanshu
|
|
|
|
|
How can I write a Program in Visual C, that takes over the Desktop and Mouse-Functions of another
Windows-NT PC in a LAN/WAN (like SMS, or pcAnywhere it does) ?.
Is there an API available, or an example ?
Who knows the answer ??
|
|
|
|
|
Well, I'm hoping you're thinking of remote administration, rather than nasty hacker stuff, but the source code to VNC is freely available http://www.realvnc.com[^] though, tbh, if you just want a free and simple remote admin/control system then I don't see why you'd need to actually modify VNC at all - it works brilliantly as it is
--
Help me! I'm turning into a grapefruit!
|
|
|
|
|
dear all,
i get a warning
D:\Schd\Config.cpp(117) : warning C4172: returning address of local variable or temporary
when i compile this code:-
char *CConfig::InputFilePath ()
{
char *inp;
** inp = new char[MAXCHARS];
int i= GetPrivateProfileString("Paths", "inputfile", "" ,inp, MAXCHARS, IniPath);
CString path(inp);
char filename[11];
int ch = 92;
unsigned int result;
char *pdest;
char iPath[MAXCHARS];
try
{
if ( (path == "") || CConfig::DoesDirectoryExist (inp) == false )
{
path = "";
strcpy(iPath,"");
return iPath;
}
pdest = strrchr( path, ch );
result = pdest - path + 1;
if ( result == strlen(path) )
{
strcpy(filename,"Input.con");
}
else
{
strcpy(filename,"\\Input.con");
}
strcpy(inp,path);
strcpy(inp, strncat( inp, filename,strlen(filename)));
}
catch(...)
{
path = "";
strcpy(iPath,"");
return iPath;
/*strcpy(filename,"\\Input.con");
strcpy(inp, strncat(_getcwd( buffer, _MAX_PATH), filename,strlen(filename)));*/
}
strcpy(iPath,inp);
delete [] inp;
return iPath;
}
also sometimes i get warning :-
detected memory leaks,
Object dump complete,
at location ** in the code
can anyone suggest some solutions!
thanx,
|
|
|
|