basically my problem is how to get rid of flickering when i use customdraw.
I know about double bufering, bckgnderase and any other solutions, but all of them do not work in my case, because my customdraw is called for each item (when resizing window(mfc behavior)) and for some of them when multiselection happens. CustomDraw is called from OnNotify(need that because i am extending normal tree with columns like in listView - so it look smth like Grid with expandable rows).
Cause of all that behavior that i need, got no idea how to apply double buffering into this, cause there's none notification when to bitblt offscreen bitmap into screen.
There double buffering technique that is fairly trivial to implement and gives reasonable results for any complex drawing
1.) Your draw routines only draw on a memory context, don't draw to the screen at all in those item draw calls.
2.) You use a standard windows timer which will timeout after a set time and you use that to update the screen.
3.) Anytime you draw to the memory context in step 1 you kill the running any timer and restart it
4.) The timer running out posts off a message and if you use that message to transfer the memory DC to screen, you then dispose of the timer.
You should be able to get what happens that each item simply draws itself to the memory DC and will restart the timer. When the last item has been drawn the timer will finally hit it's wait timeout and post off the message which will draw all the items together as one big bitblt draw and no flickering.
The requirements 1 memory context (created when window is created), 1 timer which is created and disposed as per above.
You should return true (being a non zero value) otherwise window will remain marked for erasing which somewhere down the track may come back to bite you. Remember the API underworkings aren't fixed you may find an old version of Windows or a new update which decides to use the flag.
In client application I created Private sensor pool using msdn demo code.
and using that code I'm able to open session enroll fingerprints.
But the problems are
1. When tried to enroll same fingerprint again then it causes to stop WbioSrvc so I need to restart my application again.
2. similar thing happening while identifying when trying to identify with random finger function working fine it is returning unknown identity. But when trying to saved fingerprint instead of identifying it is causing to stop WbioSrvc.
I have tried using Selenium with both the PythonQt and the Python.h libraries. I have a Ubuntu 16.04 platform using QT Creator 4.2.2 with Qt5.8.0. I can get everything setup with either interpreter and call a simple Python class for strings from Qt. However when I try and use Selenium I end up having problems (running py script for Selenium from the prompt works fine). For instance, using python.h When PyObject_GetAttrString(pModule, "browser") is called I get a segmentation fault. I am assuming that I need to load the selenium module or set the python path to it in Qt, but I am not clear on how to do this with multiple modules/paths. This is my python code browser.py:
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
self.driver = None
self.webelement = None
def getbrowser(self, name):
if name == "chrome":
self.driver = webdriver.Chrome()
elif name == "firefox":
self.driver = webdriver.Firefox()
self.webelement = self.driver.find_element_by_name(elementname)
self.webelement.send_keys(search + Keys.RETURN)
""" Following runs fine from prompt, crashes in PythonQt/python.h
browser = webdriver.Firefox()
elem = browser.find_element_by_name('p') # Find the search box
elem.send_keys('seleniumhq' + Keys.RETURN)
"the debugger doesn't tell me anything because this code compiles just fine" - random QA comment
"Facebook is where you tell lies to your friends. Twitter is where you tell the truth to strangers." - chriselst
"I don't drink any more... then again, I don't drink any less." - Mike Mullikins uncle
This is a real baffler sounds real simple just find the right .lib well I did and still
Seems like they moved things around in VS 2015. But I did find the lib legacy_stdio_definitions.lib I even dumpbin /export it and its there. I have it linker->additional dependencies. The folder is C:\Program Files (x86)\Microsoft visual Studio 14.0\VC\lib\AMD64
The printf and scanf family of functions are now defined inline. The definitions of all of the printf and scanf functions have been moved inline into <stdio.h>, <conio.h>, and other CRT headers. This is a breaking change that leads to a linker error (LNK2019, unresolved external symbol) for any programs that declared these functions locally without including the appropriate CRT headers. If possible, you should update the code to include the CRT headers (that is, add #include <stdio.h>) and the inline functions, but if you do not want to modify your code to include these header files, an alternative solution is to add an additional library to your linker input, legacy_stdio_definitions.lib.
Have you tried including the header files?
You may also try to define _NO_CRT_STDIO_INLINE before including any header files.