Print Page | Close Window

an error msg "a required resource is unavailable."

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Syntax Edit
Forum Description: Topics Related to Codejock Syntax Edit
URL: http://forum.codejock.com/forum_posts.asp?TID=21911
Printed Date: 23 November 2024 at 7:22am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: an error msg "a required resource is unavailable."
Posted By: buy_ssd
Subject: an error msg "a required resource is unavailable."
Date Posted: 14 October 2013 at 9:24pm

I'm using XTPSyntaxEditCtrl in my mfc project (Visual studio stype UI, VS2010, WIN7)

Every 60~100 times saving my edit file, it stops working.
All screens in my projects are stopped. No cursor, no mouse pointer, that means project can't be printed on the screen.

So i ran it in debug mode, then i found an error message, "a required resource is unavailable."
I was googling that message, and they said it was result of unreleased DC such as below.
CDC *pDC = CDC::FromHandle(pBookMark->hDC)  line790, XTPSyntaxEditPaintManager.cpp
When function "FromHandle(hCD)" is called, and there's no CDC in its argument, function GetDC might be called.
When function GetDC is called, object from GetDC must be released by function "ReleaseDC" but i couldn't found it in your syntaxedit project.

And I'm not sure that is the only problem.

That is so fatal problem to me and it has to be solved urgently.
After saving 60~100 times, i can't use my project.
no memories for dc, my project is no longer painted correct.
Please let me explain how do i handle this problem
I've spent a lot of time trying to resolve this, but i couldn't.
 
Waiting for help TT_TT
 
Thanks !



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net