Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Link

includeing user32.dll in my project, how?

This topic is 5246 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Advertisement
Or add user32.lib to the linker settings in your project''s properties dialog box. (Properties->Linker->Input->Additional Dependencies.

Just so you understand what''s going on, user32.lib is the symbol library for user32.dll. user32.lib basically tells the compiler that the actual code is in user32.dll, so by linking to user32.lib at compile time, user32.dll will be loaded up automatically for use by your executable when you run it.

Share this post


Link to post
Share on other sites
i want use the FlashWindow() function which it is not supported in .NET.
So i want use CWindow::FlashWindow(bool) inside my code.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
There''s nothing lazy about #pragma, it is just not protable since it is compiler specific. But, since user32.lib is pretty non portable, I don''t see any problem. It saves you the headache also of having to setup your linker settings if you lose your workspace.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
for a windows app, VC++ includes the import library for user32.dll by default - you should need to do nothing for that.

When you''re talking about CWindow::FlashWindow(...) I think that you''re using MFC (going by the class name). Obviously it must be an MFC project (I''m not trying to be insulting here...)

Again, you don''t call CWindow::FlashWindow(...) like that, you''ll need to call the function on a particular instanitation (ie m_mainWindow.FlashWindow(TRUE); ).

Or are you trying to do this for a non-MFC app ? in which case the call is:
FlashWindow(hWnd, TRUE);

If this doesn''t help explain what you are trying to do a little better (MFC / non-MFC, it''s not a C# project is it ???, snipet of code arround the area your trying to flash the window etc.)

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!